66 lines
2.1 KiB
Plaintext
66 lines
2.1 KiB
Plaintext
<div id="c-users">
|
|
<div id="a-index">
|
|
<h1>Users</h1>
|
|
|
|
<% simple_form_for(@search) do |f| %>
|
|
<%= f.input :name_contains, :label => "Name" %>
|
|
<%= f.sort_link "Name", :name %>
|
|
<%= f.sort_link "Date", :created_at_desc %>
|
|
<%= f.button :submit %>
|
|
<% end %>
|
|
|
|
<table width="100%" class="striped">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Name</th>
|
|
<th>Posts</th>
|
|
<th>Deleted</th>
|
|
<th>% Pos</th>
|
|
<th>% Neg</th>
|
|
<th>Notes</th>
|
|
<th>Level</th>
|
|
<th>Joined</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @users.each do |user| %>
|
|
<tr>
|
|
<td>
|
|
<% if CurrentUser.is_admin? %>
|
|
<%= link_to "Edit", edit_admin_user_path(user) %>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<%= link_to user.pretty_name, user_path(user.id) %>
|
|
<% if user.inviter %>
|
|
← <%= link_to user.inviter.name, user_path(user.inviter_id) %>
|
|
<% end %>
|
|
</td>
|
|
<td><%= link_to user.posts.count, posts_path(:tags => "uploader:#{user.name}") %></td>
|
|
<td><%= user.posts.deleted.count %></td>
|
|
<% if user.posts.count > 100 %>
|
|
<td><%= number_to_percentage(100 * user.posts.positive.count.to_f / user.posts.count, :precision => 0) %></td>
|
|
<td><%= number_to_percentage(100 * user.posts.negative.count.to_f / user.posts.count, :precision => 0) %></td>
|
|
<% else %>
|
|
<td></td>
|
|
<td></td>
|
|
<% end %>
|
|
<td><%= link_to user.note_versions.count, note_versions_path(:search => {:updater_id_eq => user.id}) %></td>
|
|
<td><%= user.level_string %></td>
|
|
<td><span title="<%= user.created_at %>"><%= time_ago_in_words user.created_at %> ago</span></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= numbered_paginator(@users) %>
|
|
|
|
<%= render "secondary_links" %>
|
|
</div>
|
|
</div>
|
|
|
|
<% content_for(:page_title) do %>
|
|
Users - <%= Danbooru.config.app_name %>
|
|
<% end %>
|