Skip to content

Commit

Permalink
Spam flag changes (#2633)
Browse files Browse the repository at this point in the history
* Spam flag changes

* Update home_controller_test.rb

* Small fix in home_controller_test .

* assert_select syntax changed .
  • Loading branch information
jywarren committed Apr 19, 2018
1 parent 8e71008 commit 6554e37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/views/dashboard/_node_meta.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<span class="hidden-xs hidden-sm">| <i class="fa fa-eye"></i> <%= number_with_delimiter(node.totalviews) %></span>
| <i style="<% if node.likes > 0 %>color:#db4;<% end %>" class="fa fa-star-o"></i> <%= node.likes %>
<% if params[:mod] %>| <a href="#"><i class="fa fa-ban"></i></a><% end %>
<a rel="tooltip" title="Flag as spam." class="btn btn-sm btn-default" href="mailto:moderators@publiclab.org?subject=Reporting+spam+on+Public Lab&body=Hi,+I+found+this+item+that+looks+like+spam+or+needs+to+be+moderated:+"<%= node.title.gsub(/ /,'+') %>"%0A%0Ahttps://publiclab.org/n/<%= node.id %>%0Aby+https://publiclab.org/profile/<%= node.author.username %>%0A%0AThanks!">
<i class="far fa-flag"></i>
<a rel="tooltip" title="Flag as spam." class="btn btn-xs btn-default btn-flag-spam-<%= node.id %>" href="mailto:moderators@publiclab.org?subject=Reporting+spam+on+Public+Lab&body=Hi,+I+found+this+item+that+looks+like+spam+or+needs+to+be+moderated:+<%= node.title.gsub(/ /,'+') %>+https://publiclab.org/n/<%= node.id %>+by+https://publiclab.org/profile/<%= node.author.username %>+Thanks!">
<i class="fa fa-flag"></i>
</a>
</span>
6 changes: 1 addition & 5 deletions test/functional/home_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# def home
# def front
# def dashboard
# def nearby

require 'test_helper'
require 'sanitize'

Expand Down Expand Up @@ -50,6 +45,7 @@ def setup
UserSession.create(users(:bob))
get :dashboard
assert_response :success
assert_select 'a[href=?]', "mailto:moderators@publiclab.org?subject=Reporting+spam+on+Public+Lab&body=Hi,+I+found+this+item+that+looks+like+spam+or+needs+to+be+moderated:+Canon+A1200+IR+conversion+at+PLOTS+Barnraising+at+LUMCON+https://publiclab.org/n/1+by+https://publiclab.org/profile/jeff+Thanks!"
end

test 'should show only unmoderated spam' do
Expand Down

0 comments on commit 6554e37

Please sign in to comment.