Commit ee67a978db0b57131b0df1c5e92e89ca08e1ce76

Authored by Daniela Feitosa
1 parent 92ecbee8

Added title to explain reports on spaminator

Also some enhancements
plugins/spaminator/public/style.css
... ... @@ -4,6 +4,10 @@
4 4 width: 50%;
5 5 }
6 6  
  7 +.action-spaminator_plugin_admin-reports #spaminator-report-table {
  8 + width: 100%;
  9 +}
  10 +
7 11 #spaminator-config-fields {
8 12 float: left;
9 13 width: 50%;
... ...
plugins/spaminator/views/spaminator_plugin/mailer/inactive_person_notification.html.erb
... ... @@ -7,7 +7,7 @@
7 7 <h4><%= _('Hi %s!') % @person.name %></h4>
8 8  
9 9 <p>
10   - <%= _('Due to the recent increase in the number of spams on %s, we decided to deactivate all inactive users on the network. It just happens that you are one of them! But there is no need to worry. Your account is completely preserved and if you want to reactivate it you just need to click on the following link and recover your password (since it was changed to a huge scramble of random characters ^^):') % @environment.name %>
  10 + <%= _('Due to the recent increase in the number of spams on %s, we decided to deactivate all inactive users on the network. It just happens that you are one of them! But there is no need to worry. Your account is completely preserved and if you want to reactivate it you just need to click on the following link and recover your password (since it was changed to a huge scramble of random characters:') % @environment.name %>
11 11 </p>
12 12 <p>
13 13 <%= @url %>
... ...
plugins/spaminator/views/spaminator_plugin_admin/index.rhtml
... ... @@ -3,7 +3,7 @@
3 3 <% form_for(:settings) do |f| %>
4 4  
5 5 <div id="spaminator-config-fields">
6   - <%= labelled_form_field _('Period (days)'), f.text_field(:period, :size => 4) %>
  6 + <%= labelled_form_field _('Period (days) for scanning spammers'), f.text_field(:period, :size => 4) %>
7 7  
8 8 <p id="deploy-status">
9 9 <% if @settings.deployed.nil? %>
... ... @@ -26,8 +26,8 @@
26 26 <% klass = @settings.scanning ? 'disabled' : '' %>
27 27 <%= button(:search, content, {:action => 'scan'}, :class => klass, :disabled => @settings.scanning) %>
28 28 <% if !@settings.scanning %>
29   - <%= button(:right, _('Deploy'), :action => 'deploy') if !@settings.deployed %>
30   - <%= button(:cancel, _('Withhold'), :action => 'withhold') if @settings.deployed %>
  29 + <%= button(:right, _('Deploy'), {:action => 'deploy'}, :title => _('Schedule next scan for the period defined')) if !@settings.deployed %>
  30 + <%= button(:cancel, _('Withhold'), {:action => 'withhold'}, :title => _('Cancel next scheduled scans')) if @settings.deployed %>
31 31 <% end %>
32 32  
33 33 <% button_bar do %>
... ... @@ -44,8 +44,8 @@
44 44 <% @reports.each do |report| %>
45 45 <tr>
46 46 <td><%= report.formated_date %></td>
47   - <td><%= "#{report.spams} / #{report.total_comments}" %></td>
48   - <td><%= "#{report.spammers} / #{report.total_people}" %></td>
  47 + <td title='<%= _('Spam comments found / number of comments verified') %>'><%= "#{report.spams} / #{report.total_comments}" %></td>
  48 + <td title='<%= _('Spammers found / number of users verified') %>'><%= "#{report.spammers} / #{report.total_people}" %></td>
49 49 </tr>
50 50 <% end %>
51 51 <tr id="spaminator-reports-see-all">
... ...
plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb
... ... @@ -2,23 +2,27 @@
2 2  
3 3 <table id="spaminator-report-table">
4 4 <tr>
5   - <th><%= _('Date') %></th>
6   - <th><%= _('Spams by content') %></th>
7   - <th><%= _('Spams by author without network') %></th>
8   - <th><%= _('Total Spams') %></th>
9   - <th><%= _('Spammers by more than 2 spams')%></th>
10   - <th><%= _('Spammers due to no network')%></th>
11   - <th><%= _('Total Spammers')%></th>
  5 + <th rowspan='2'><%= _('Date') %></th>
  6 + <th colspan='3'><%= _('Spams on comments') %></th>
  7 + <th colspan='3'><%= _('Spammers')%></th>
  8 + </tr>
  9 + <tr>
  10 + <th><%= _('On content') %></th>
  11 + <th><%= _('From spammers') %></th>
  12 + <th><%= _('Total') %></th>
  13 + <th><%= _('With spam comments')%></th>
  14 + <th><%= _('With no network')%></th>
  15 + <th><%= _('Total')%></th>
12 16 </tr>
13 17 <% @reports.each do |report| %>
14 18 <tr>
15 19 <td><%= report.created_at.strftime("%Y-%m-%d") %></td>
16   - <td><%= "#{report.spams_by_content} / #{report.processed_comments}" %></td>
17   - <td><%= "#{report.spams_by_no_network} / #{report.processed_comments}" %></td>
18   - <td><%= "#{report.spams} / #{report.total_comments}" %></td>
19   - <td><%= "#{report.spammers_by_comments} / #{report.processed_people}" %></td>
20   - <td><%= "#{report.spammers_by_no_network} / #{report.processed_people}" %></td>
21   - <td><%= "#{report.spammers} / #{report.total_people}" %></td>
  20 + <td title='<%= _('Content of comments checked as spam / number of comments verified') %>'><%= "#{report.spams_by_content} / #{report.processed_comments}" %></td>
  21 + <td title='<%= _('Comments from spammers / number of comments verified') %>'><%= "#{report.spams_by_no_network} / #{report.processed_comments}" %></td>
  22 + <td title='<%= _('Spam comments / total number of comments') %>'><%= "#{report.spams} / #{report.total_comments}" %></td>
  23 + <td title='<%= _('People with more than 2 spam comments / number of people verified') %>'><%= "#{report.spammers_by_comments} / #{report.processed_people}" %></td>
  24 + <td title='<%= _('People who signed up more than one month ago, have no network / number of comments verified') %>'><%= "#{report.spammers_by_no_network} / #{report.processed_people}" %></td>
  25 + <td title='<%= _('Spammers / total number of people') %>'><%= "#{report.spammers} / #{report.total_people}" %></td>
22 26 </tr>
23 27 <% end %>
24 28 </table>
... ...