stubbed in view code from old danbooru; only janitors can lock a wiki page
This commit is contained in:
30
app/views/report_mailer/moderator_report.html.erb
Normal file
30
app/views/report_mailer/moderator_report.html.erb
Normal 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>
|
||||
Reference in New Issue
Block a user