users: inline search form on /users index page.
* Add the user search form to the /users page. * Remove the /users/search page.
This commit is contained in:
@@ -2,6 +2,15 @@
|
||||
<div id="a-index">
|
||||
<h1>Users</h1>
|
||||
|
||||
<%= search_form_for(users_path) do |f| %>
|
||||
<%= f.input :name_matches, label: "Name", hint: "Use * for wildcard", input_html: { value: params[:search][:name_matches], data: { autocomplete: "user" } } %>
|
||||
<%= f.input :level, collection: User.level_hash.to_a, include_blank: true, selected: params[:search][:level] %>
|
||||
<%= f.input :can_upload_free, label: "Contributor?", as: :select, include_blank: true, selected: params[:search][:can_upload_free] %>
|
||||
<%= f.input :can_approve_posts, label: "Approver?", as: :select, include_blank: true, selected: params[:search][:can_approve_posts] %>
|
||||
<%= f.input :order, collection: [["Joined", "date"], ["Name", "name"], ["Posts", "post_upload_count"], ["Edits", "post_update_count"], ["Notes", "note_count"]], include_blank: true, selected: params[:search][:order] %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
|
||||
<%= table_for @users, width: "100%" do |t| %>
|
||||
<% t.column column: "control" do |user| %>
|
||||
<% if policy(CurrentUser.user).promote? %>
|
||||
|
||||
Reference in New Issue
Block a user