plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Add a button to report answers spams to moderators

Open stefannibrasil opened this issue 8 years ago • 13 comments

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.)

stefannibrasil avatar May 16 '18 20:05 stefannibrasil

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

stefannibrasil avatar May 16 '18 20:05 stefannibrasil

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 😅.

namangupta01 avatar May 16 '18 21:05 namangupta01

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

stefannibrasil avatar May 16 '18 21:05 stefannibrasil

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

aditya-m-shah avatar May 17 '18 11:05 aditya-m-shah

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

grvsachdeva avatar May 17 '18 12:05 grvsachdeva

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!!! 👍 🎉 🎈

jywarren avatar May 19 '18 04:05 jywarren

Yes, @jywarren!

milaaraujo avatar May 20 '18 06:05 milaaraujo

@aditya-m-shah Are you still working on this, or did you want any help? 😄

aamarill avatar May 23 '18 03:05 aamarill

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

jywarren avatar Jun 03 '18 15:06 jywarren

@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!

aamarill avatar Jun 03 '18 15:06 aamarill

sounds good! :-)

On Sun, Jun 3, 2018 at 9:40 AM, Adan Amarillas [email protected] 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 .

jywarren avatar Jun 03 '18 15:06 jywarren

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

rtrunkhill avatar Jun 07 '18 17:06 rtrunkhill

@rtrunkhill Welcome! 😄 You can work on this, thanks! 🙏

aamarill avatar Jun 07 '18 17:06 aamarill