stubbed in view code from old danbooru; only janitors can lock a wiki page

This commit is contained in:
albert
2011-02-28 14:18:39 -05:00
parent 6d0157265c
commit 9e7efbd295
47 changed files with 1124 additions and 79 deletions

View File

@@ -0,0 +1,30 @@
<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><%= h user.name %></td>
<td><%= h 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>