fixes #3007: Eliminate Janitor role
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<% else %>
|
||||
<%= render "listing", :post_versions => @post_versions %>
|
||||
|
||||
<% if params[:lr] && CurrentUser.is_janitor? %>
|
||||
<% if params[:lr] && CurrentUser.is_moderator? %>
|
||||
<p><%= link_to "Revert this user's changes", new_user_revert_path(:user_id => params[:lr]) %></p>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Moderator Report For <%= Date.today %></h1>
|
||||
|
||||
<div style="margin-bottom: 2em;">
|
||||
<table width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="15%" style="text-align: left;">Name</th>
|
||||
<th width="10%" style="text-align: left;">Level</th>
|
||||
<th width="10%" style="text-align: right;" title="Number of posts approved in past day">Appr 1</th>
|
||||
<th width="10%" style="text-align: right;" title="Number of posts approved in past seven days">Appr 7</th>
|
||||
<th width="10%" style="text-align: right;" title="Number of posts approved in past fourteen days">Appr 14</th>
|
||||
<th width="10%" style="text-align: right;" title="Number of comments posted in past seven days">Comm</th>
|
||||
<th width="35%" style="text-align: right;" title="Number of forum posts posted in past seven days">Forum</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% User.find(:all, :conditions => ["level >= ?", CONFIG["user_levels"]["Test Janitor"]], :order => "level, name").each do |user| %>
|
||||
<tr>
|
||||
<td><%= link_to user.name, user_path(user, :host => Danbooru.config.hostname, :only_path => false) %></td>
|
||||
<td><%= user.pretty_level %></td>
|
||||
<td style="text-align: right;"><%= Post.count(:conditions => ["created_at >= ? AND approver_id = ?", 1.days.ago, user.id]) %>/<%= Post.count(:conditions => ["created_at >= ? AND (approver_id IS NOT NULL OR status = 'pending')", 1.days.ago]) %></td>
|
||||
<td style="text-align: right;"><%= Post.count(:conditions => ["created_at >= ? AND approver_id = ?", 7.days.ago, user.id]) %>/<%= Post.count(:conditions => ["created_at >= ? AND (approver_id IS NOT NULL OR status = 'pending')", 7.days.ago]) %></td>
|
||||
<td style="text-align: right;"><%= Post.count(:conditions => ["created_at >= ? AND approver_id = ?", 14.days.ago, user.id]) %>/<%= Post.count(:conditions => ["created_at >= ? AND (approver_id IS NOT NULL OR status = 'pending')", 14.days.ago]) %></td>
|
||||
<td style="text-align: right;"><%= Comment.count(:conditions => ["created_at >= ? AND user_id = ?", 7.days.ago, user.id]) %></td>
|
||||
<td style="text-align: right;"><%= ForumPost.count(:conditions => ["created_at >= ? AND creator_id = ?", 7.days.ago, user.id]) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<ul>
|
||||
<% @super_voters.each do |super_voter| %>
|
||||
<li><%= link_to_if CurrentUser.user.is_janitor?, super_voter.user.name, posts_path(tags: "upvote:#{super_voter.user.name}") %></li>
|
||||
<li><%= link_to_if CurrentUser.user.is_moderator?, super_voter.user.name, posts_path(tags: "upvote:#{super_voter.user.name}") %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user