Plots2: Comment moderation link addition in notify_author_mailer

Created on 5 Aug 2018  Β·  4Comments  Β·  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/comment_mailer/notify_note_author.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 red (and a -) which lines to remove, and in green (and a +) which lines to add:

@@ -19,6 +19,15 @@ Do NOT reply to this email; click this link to respond:

 <hr />

+<p>Look like spam?
+  <% if @user.can_moderate? %>
+    Mark this as <a href="https://<%= ActionMailer::Base.default_url_options[:host] %>/admin/mark_comment_spam/<%= @comment.id %>">Spam</a>
+  <% else %>
+    <a 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/<% if @comment.author %><%= @comment.author.name %><% end %>+Thanks!" title="Flag as spam" class="btn btn-sm btn-default btn-flag-spam-<%= @comment.id %>" >Flag this</a> for moderators
+  <% end%>
+</p>
+
+
 <div style="color:#aaa;">

 <% if @comment.parent.has_power_tag('question') %>
  • [ ] πŸ’Ύ 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 help wanted

Most helpful comment

Hi @qm3, I have updated the PR body with the checklist. Although that checklist is just there for your reference but following that is good practice. Thanks!

All 4 comments

Hello, I would like to work on this issue. I am a first-timer and I'm ready to make my first contribution!

Hi @qm3, you can work on this issue and in case of any doubt feel free to ping here. Thanks ☺️

Hi, thanks for giving me the issue. I have made the code change following the instructions.

Oops, I noticed that I deleted the given format in the PR writing page. Is there a way I can re-create the format and fix this problem?

Hi @qm3, I have updated the PR body with the checklist. Although that checklist is just there for your reference but following that is good practice. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

first-timers[bot] picture first-timers[bot]  Β·  3Comments

noi5e picture noi5e  Β·  3Comments

keshavsethi picture keshavsethi  Β·  3Comments

ebarry picture ebarry  Β·  3Comments

keshavsethi picture keshavsethi  Β·  3Comments