add additional search links in reports, fix order:random for post count=0

This commit is contained in:
r888888888
2015-06-18 17:16:40 -07:00
parent 0239b0077f
commit 29a7b51fcb
3 changed files with 31 additions and 33 deletions

View File

@@ -18,24 +18,22 @@
</tr>
</thead>
<tbody>
<% cache("janitor-trials-report/#{Date.today}") do %>
<% @report.janitors.each do |janitor| %>
<tr>
<td><%= link_to_user janitor.user %></td>
<td data-sort-value="<%= janitor.user.level %>"><%= janitor.user.level_string %></td>
<td><%= link_to janitor.approval_count, posts_path(:tags => "approver:#{janitor.user.name}") %></td>
<td><%= link_to janitor.deleted_count, posts_path(:tags => "approver:#{janitor.user.name} status:deleted") %></td>
<td><%= janitor.percentile_25_score %></td>
<td><%= janitor.percentile_50_score %></td>
<td><%= number_to_percentage janitor.confidence_interval, :precision => 0 %></td>
<td>
<% if CurrentUser.user.is_moderator? && janitor.trial %>
<%= link_to "Promote", promote_janitor_trial_path(janitor.trial), :method => :put, :remote => true %>
| <%= link_to "Demote", demote_janitor_trial_path(janitor.trial), :method => :put, :remote => true %>
<% end %>
</td>
</tr>
<% end %>
<% @report.janitors.each do |janitor| %>
<tr>
<td><%= link_to_user janitor.user %></td>
<td data-sort-value="<%= janitor.user.level %>"><%= janitor.user.level_string %></td>
<td><%= link_to janitor.approval_count, posts_path(:tags => "approver:#{janitor.user.name} order:random", :limit => 300) %></td>
<td><%= link_to janitor.deleted_count, posts_path(:tags => "approver:#{janitor.user.name} status:deleted", :limit => 300) %></td>
<td><%= janitor.percentile_25_score %></td>
<td><%= janitor.percentile_50_score %></td>
<td><%= number_to_percentage janitor.confidence_interval, :precision => 0 %></td>
<td>
<% if CurrentUser.user.is_moderator? && janitor.trial %>
<%= link_to "Promote", promote_janitor_trial_path(janitor.trial), :method => :put, :remote => true %>
| <%= link_to "Demote", demote_janitor_trial_path(janitor.trial), :method => :put, :remote => true %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>