Plots2: Add a button to report answers spams to moderators

Created on 16 May 2018  ยท  13Comments  ยท  Source: publiclab/plots2

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you ๐Ÿ’

If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

๐Ÿค” What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

๐Ÿ“‹ Step by Step

  • [ ] ๐Ÿ™‹ Claim this issue: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!

  • [ ] ๐Ÿ“ Update the file app/views/questions/_answer.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

See this page for some help in taking your first steps!

Below is a "diff" showing in green (and a +) with lines to add after line 16 in file (Remember to be careful with the indentation):

     <div class="navbar-text pull-right">
+       <a rel="tooltip" title="Flag as spam" class="btn btn-sm btn-default btn-flag-spam-<%= comment.id %>" href="mailto:[email protected]?subject=Reporting+spam+on+Public+Lab&body=Hi,+I+found+this+comment+that+looks+like+spam+or+needs+to+be+moderated:+https://publiclab.org/<%= comment.parent.path %>#c<%= comment.cid %>+by+https://publiclab.org/profile/<%= comment.author.username %>+Thanks!">
+         <i class="fa fa-flag"></i>
+       </a>
        <% if current_user && answer.uid == current_user.uid %>
        <a class="btn btn-default btn-sm" href="javascript:void(0)" onClick="$('#c<%= answer.id %>edit').toggle();$('#c<%= answer.id %>show').toggle();setInit(<%= answer.id %>);"><i class="fa fa-pencil"></i></a>
        <% end %>

        <% if current_user && (current_user.role == "admin" || current_user.role == "moderator" || answer.uid == current_user.uid || answer.node.uid == current_user.uid) %>
          <a data-remote="true" data-confirm="Are you sure? <% if current_user && answer.uid != current_user.uid %>Please exercise caution in deleting/moderating others' answer; this cannot be undone.<% end %>" href="/answers/delete/<%= answer.id %>" class="btn btn-default btn-sm" id="a<%= answer.id %>delete-btn"><i class='icon fa fa-trash'></i></a>
        <% end %>
      </div>
  • [ ] ๐Ÿ’พ Commit your changes

  • [ ] ๐Ÿ”€ Start a Pull Request. There are two ways how you can start a pull request:

  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.

  2. You can also edit files directly in your browser and open a pull request from there.

  • [ ] ๐Ÿ Done Ask in comments for a review :)

๐Ÿค”โ“ Questions?

Leave a comment below!

Is someone else already working on this?

We encourage you to link to this issue by mentioning the issue # in your pull request, so we can see if someone's already started on it. If someone seem stuck, offer them some help! Otherwise, take a look at some other issues you can help with. Thanks!

(This issue was created by First-Timers-Bot.)

first-timers-only

Most helpful comment

Hey, i'm new a new programmer and i'd like to knock this one out if you dont mind

All 13 comments

@publiclab/support hey, everyone, how can I add the first-timers-only labels? There is this other Issue #2732 to be labeled too. Thanks!

Hi @stefannibrasil, only members can add the labels. But as you are the participant of RGSoC i think @jywarren will add you as a member. For now i have added the label. ;)
Edited: I just saw you are already a member ๐Ÿ˜….

Ahh, I don't know why I couldn't add them. But thank you so much, @namangupta01 :)

Do you mind if I take a stab? I am newbie here

Hi @aditya-m-shah, that will be awesome. Thanks.

Hi, @stefannibrasil I'll invite you as a reviewer now! Would @milaaraujo also like to? If you'd like to know more about being a reviewer, there's a lot of helpful info at http://publiclab.org/software-outreach -- but if you're already making first-timers-only issues, you're already much of the way there!

Thanks everybody!!! ๐Ÿ‘ ๐ŸŽ‰ ๐ŸŽˆ

Yes, @jywarren!

@aditya-m-shah Are you still working on this, or did you want any help? ๐Ÿ˜„

@aamarill if you want to go ahead on this one, please do!

@jywarren Thanks for getting back to me ๐Ÿ˜„ Unfortunately, I am quite busy at the moment and won't have time to work on this. So, if anyone wants it, go for it!

sounds good! :-)

On Sun, Jun 3, 2018 at 9:40 AM, Adan Amarillas notifications@github.com
wrote:

@jywarren https://github.com/jywarren Thanks for getting back to me ๐Ÿ˜„
Unfortunately, I am quite busy at the moment and won't have time to work on
this. So, if anyone wants it, go for it!

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/2731#issuecomment-394170757,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ_qq43o_wRnEVPqCW5e3mPju5uGPks5t5AOGgaJpZM4UB8dQ
.

Hey, i'm new a new programmer and i'd like to knock this one out if you dont mind

@rtrunkhill Welcome! ๐Ÿ˜„
You can work on this, thanks! ๐Ÿ™

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SidharthBansal picture SidharthBansal  ยท  87Comments

grvsachdeva picture grvsachdeva  ยท  183Comments

cesswairimu picture cesswairimu  ยท  79Comments

SidharthBansal picture SidharthBansal  ยท  142Comments

grvsachdeva picture grvsachdeva  ยท  86Comments