Files
danbooru/app/views/users/index.html.erb
evazion 5c913d8ad1 table builder: fix various incorrect css classes.
Change calling convention to explicitly indicate whether the attributes
are for the <th> element or the <td> element. Fixes various cases where
the two were mixed up.

* Fix .col-expand classes not being set correctly on the /post_versions,
  /pool_versions, and /notes pages.

* Fix .updater and .updated-at classes not being set correctly on the
  /forum_topics page.

* Fix the name param being ignored (noticeable in the post count field
  on the /tags page).

* Don't pass empty string when column has no name.
2020-01-07 02:40:59 -06:00

43 lines
1.3 KiB
Plaintext

<div id="c-users">
<div id="a-index">
<h1>Users</h1>
<%= table_for @users, width: "100%" do |t| %>
<% t.column do |user| %>
<% if CurrentUser.is_admin? %>
<%= link_to "Edit", edit_admin_user_path(user) %>
<% end %>
<% end %>
<% t.column "Name" do |user| %>
<%= link_to_user user %>
<% if user.inviter %>
&larr; <%= link_to_user user.inviter %>
<% end %>
<% end %>
<% t.column "Posts" do |user| %>
<%= link_to user.posts.count, posts_path(:tags => "user:#{user.name}") %>
<% end %>
<% t.column "Deleted" do |user| %>
<%= user.posts.deleted.count %>
<% end %>
<% t.column "Notes" do |user| %>
<%= link_to user.note_versions.count, note_versions_path(:search => {:updater_id => user.id}) %>
<% end %>
<% t.column "Edits" do |user| %>
<%= link_to user.post_update_count, post_versions_path(:search => {:updater_id => user.id}) %>
<% end %>
<% t.column "Level" do |user| %>
<%= user.level_string %>
<% end %>
<% t.column "Joined" do |user| %>
<%= compact_time user.created_at %>
<% end %>
<% end %>
<%= numbered_paginator(@users) %>
</div>
</div>
<%= render "secondary_links" %>