Files
danbooru/app/views/reports/contributors.html.erb
2015-08-07 17:29:33 -07:00

46 lines
1.7 KiB
Plaintext

<div id="c-reports">
<div id="a-user-promotions">
<h1>Contributor Report</h1>
<p>Binomial proportion confidence interval for how likely a user's uploads will achieve a score of at at least n with 95% confidence within the past 30 days. Most statistics are not significant unless there are at least 300 uploads.</p>
<table width="100%" class="striped" id="sortable">
<thead>
<tr>
<th data-sort="string">User</th>
<th data-sort="int">Level</th>
<th data-sort="int">Uploads</th>
<th data-sort="int">deletion</th>
</tr>
</thead>
<tbody>
<% @report.users.each do |user| %>
<% if user.confidence_interval_for(3) > -1 %>
<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 => 200) %></td>
<td><%= link_to number_to_percentage(user.deletion_confidence_interval, :precision => 0), posts_path(:tags => "uploader:#{user.name} status:deleted", :limit => 200) %></td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
</div>
</div>
<% content_for(:page_title) do %>
Contributor Report - <%= Danbooru.config.app_name %>
<% end %>
<%= content_for(:html_header) do %>
<%= javascript_include_tag "stupidtable" %>
<script type="text/javascript">
$(function() {
$("#sortable").stupidtable().on("aftertablesort", function() {
$("#sortable tbody tr:even").removeClass("odd").addClass("even");
$("#sortable tbody tr:odd").removeClass("even").addClass("odd");
});
});
</script>
<% end %>