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

@@ -19,21 +19,19 @@
</tr>
</thead>
<tbody>
<% cache("user-promotions-report/#{Date.today}") do %>
<% @report.users.each do |user| %>
<% if user.confidence_interval_for(5) > 0 %>
<tr>
<td><%= link_to_user user.user %></td>
<td data-sort-value="<%= user.level %>"><%= user.level_string %></td>
<td><%= user.post_upload_count %></td>
<td data-sort-value="<%= user.created_at.to_formatted_s(:db) %>"><%= time_ago_in_words user.created_at %></td>
<td><%= number_to_percentage user.confidence_interval_for(3), :precision => 0 %></td>
<td><%= number_to_percentage user.confidence_interval_for(6), :precision => 0 %></td>
<td><%= user.quartile_score %></td>
<td><%= user.median_score %></td>
<td><%= number_to_percentage user.deletion_confidence_interval, :precision => 0 %></td>
</tr>
<% end %>
<% @report.users.each do |user| %>
<% if user.confidence_interval_for(5) > 0 %>
<tr>
<td><%= link_to_user user.user %></td>
<td data-sort-value="<%= user.level %>"><%= user.level_string %></td>
<td><%= link_to user.post_upload_count, posts_path(:tags => "uploader:#{user.name} order:random", :limit => 300) %></td>
<td data-sort-value="<%= user.created_at.to_formatted_s(:db) %>"><%= time_ago_in_words user.created_at %></td>
<td><%= number_to_percentage user.confidence_interval_for(3), :precision => 0 %></td>
<td><%= number_to_percentage user.confidence_interval_for(6), :precision => 0 %></td>
<td><%= user.quartile_score %></td>
<td><%= user.median_score %></td>
<td><%= link_to number_to_percentage(user.deletion_confidence_interval, :precision => 0), posts_path(:tags => "uploader:#{user.name} status:deleted", :limit => 300) %></td>
</tr>
<% end %>
<% end %>
</tbody>