stubbed in view code from old danbooru; only janitors can lock a wiki page
This commit is contained in:
66
app/views/report/common.html.erb
Normal file
66
app/views/report/common.html.erb
Normal file
@@ -0,0 +1,66 @@
|
||||
<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 %>
|
||||
40
app/views/report/tag_history.html.erb
Normal file
40
app/views/report/tag_history.html.erb
Normal file
@@ -0,0 +1,40 @@
|
||||
<script language="javascript" type="text/javascript" src="/javascripts/flotr-0.2.0-alpha.js"></script>
|
||||
|
||||
<% form_tag({:action => "tag_history"}, :method => :get) do %>
|
||||
<table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="10%">Tags</th>
|
||||
<td width="90%"><%= text_field_tag "tag", params[:tag], :size => 50 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Start Date</th>
|
||||
<td><%= text_field_tag "start_date", @start_date %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>End Date</th>
|
||||
<td><%= text_field_tag "end_date", @end_date %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><%= submit_tag "Search" %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
<div id="container" style="width: 100%; height: 400px"></div>
|
||||
|
||||
<% if @counts %>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
Flotr.draw(
|
||||
$("container"), [<%= @counts.map {|x| "{data: #{x[1].to_json}, label: #{x[0].to_json}}"}.join(", ") %>],
|
||||
{
|
||||
lines: {show: true},
|
||||
xaxis: {ticks: <%= @ticks.to_json %>},
|
||||
yaxis: {noTicks: 10, tickDecimals: 0},
|
||||
legend: {show: true},
|
||||
shadowSize: 0
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user