Files
danbooru/app/views/report/common.html.erb

67 lines
2.4 KiB
Plaintext

<h4>Report: <%= @report_title %></h4>
<div>
<div style="margin-bottom: 1em;">
<% form_tag({:action => params[:action]}, :method => :get) do %>
<table width="100%">
<tfoot>
<tr>
<td colspan="2"><%= submit_tag "Search" %></td>
</tr>
</tfoot>
<tbody>
<tr>
<th width="15%"><label for="start_date">Start Date</label></th>
<td width="85%"><%= text_field_tag "start_date", @start_date, :size => 10 %></td>
</tr>
<tr>
<th><label for="end_date">End Date</label></th>
<td><%= text_field_tag "end_date", @end_date, :size => 10 %></td>
</tr>
<tr>
<th><label for="limit">Limit</label></th>
<td><%= text_field_tag "limit", @limit, :size => 5 %></td>
</tr>
<tr>
<td><label for="level">Level</label></td>
<td><%= user_level_select_tag "level", :include_blank => true %></td>
</tr>
</tbody>
</table>
<% end %>
</div>
<div>
<table width="100%" class="highlightable">
<thead>
<tr>
<th width="15%">User</th>
<th width="10%">Changes</th>
<th width="75%">Percentage</th>
</tr>
</thead>
<tfoot>
<td>Total</td>
<td><%= @users[0]["sum"].to_i %></td>
<td></td>
</tfoot>
<tbody>
<% @users.each do |user| %>
<tr class="<%= cycle 'even', 'odd' %>">
<td><%= link_to_unless user["id"].nil?, h(user["name"]), :controller => "user", :action => "show", :id => user["id"] %></td>
<td><%= link_to_unless user["id"].nil?, user["change_count"], @change_params.call(user["id"]) %></td>
<td><%= number_to_percentage 100 * user["change_count"] / user["sum"], :precision => 1 %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
<% content_for("subnavbar") do %>
<li><%= link_to "Tags", :action => "tag_updates", :start_date => @start_date, :end_date => @end_date %></li>
<li><%= link_to "Notes", :action => "note_updates", :start_date => @start_date, :end_date => @end_date %></li>
<li><%= link_to "Wiki", :action => "wiki_updates", :start_date => @start_date, :end_date => @end_date %></li>
<li><%= link_to "Uploads", :action => "post_uploads", :start_date => @start_date, :end_date => @end_date %></li>
<% end %>