fixes #1030
This commit is contained in:
30
app/views/reports/user_promotions.html.erb
Normal file
30
app/views/reports/user_promotions.html.erb
Normal file
@@ -0,0 +1,30 @@
|
||||
<div id="c-reports">
|
||||
<div id="a-user-promotions">
|
||||
<h1>User Promotion Confidence Intervals</h1>
|
||||
|
||||
<p>Binomial proportion confidence interval for how likely a user's uploads will achieve a fav count of at at least n with 95% confidence within the past 30 days.</p>
|
||||
|
||||
<table width="100%" class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
<th>Level</th>
|
||||
<th>score:1+</th>
|
||||
<th>score:5+</th>
|
||||
<th>score:10+</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @report.users.each do |user| %>
|
||||
<tr>
|
||||
<td><%= link_to user.name, user_path(user) %></td>
|
||||
<td><%= user.level_string %></td>
|
||||
<td><%= number_to_percentage Reports::UserPromotions.confidence_interval_for(user, 1), :precision => 0 %></td>
|
||||
<td><%= number_to_percentage Reports::UserPromotions.confidence_interval_for(user, 5), :precision => 0 %></td>
|
||||
<td><%= number_to_percentage Reports::UserPromotions.confidence_interval_for(user, 10), :precision => 0 %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,6 +55,12 @@
|
||||
<li><%= link_to("Listing", pools_path) %></li>
|
||||
<li><%= link_to("Changes", pool_versions_path) %></li>
|
||||
</ul>
|
||||
<% if CurrentUser.user.is_janitor? %>
|
||||
<ul>
|
||||
<li><h1>Reports</h1></li>
|
||||
<li><%= link_to("User Promotions", reports_user_promotions_path) %></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
</section>
|
||||
<section>
|
||||
<ul>
|
||||
|
||||
@@ -14,8 +14,10 @@
|
||||
<th>Name</th>
|
||||
<th>Posts</th>
|
||||
<th>Deleted</th>
|
||||
<th>% Pos</th>
|
||||
<th>% Neg</th>
|
||||
<% if CurrentUser.user.is_janitor? %>
|
||||
<th><abbr title="1+ Favorite(s) Binonimial Confidence Interval">1+ FBCI</abbr></th>
|
||||
<th><abbr title="5+ Favorites Binonimial Confidence Interval">5+ FBCI</abbr></th>
|
||||
<% end %>
|
||||
<th>Notes</th>
|
||||
<th>Level</th>
|
||||
<th>Joined</th>
|
||||
@@ -37,12 +39,9 @@
|
||||
</td>
|
||||
<td><%= link_to user.posts.count, posts_path(:tags => "user:#{user.name}") %></td>
|
||||
<td><%= user.posts.deleted.count %></td>
|
||||
<% if user.posts.count > 100 %>
|
||||
<td><%= number_to_percentage(100 * user.posts.positive.count.to_f / user.posts.count, :precision => 0) %></td>
|
||||
<td><%= number_to_percentage(100 * user.posts.negative.count.to_f / user.posts.count, :precision => 0) %></td>
|
||||
<% else %>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<% if CurrentUser.user.is_janitor? %>
|
||||
<td><%= number_to_percentage Reports::UserPromotions.confidence_interval_for(user, 1), :precision => 0 %></td>
|
||||
<td><%= number_to_percentage Reports::UserPromotions.confidence_interval_for(user, 5), :precision => 0 %></td>
|
||||
<% end %>
|
||||
<td><%= link_to user.note_versions.count, note_versions_path(:search => {:updater_id => user.id}) %></td>
|
||||
<td><%= user.level_string %></td>
|
||||
|
||||
Reference in New Issue
Block a user