diff options
Diffstat (limited to 'app/views/users/index.html.erb')
-rw-r--r-- | app/views/users/index.html.erb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 8df0fd0..12e80ad 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -1,9 +1,11 @@ -<%= form_tag({controller: "users", action: "search_redirect"}, method: :post, style: "margin:0px;height:40px") do %> - <%= text_field_tag "search", nil, placeholder: "Search for a user", style: "margin:0px;height:40px;width:300px" %> - <%= submit_tag "Go", class: "btn blue", style: "margin:0px;height:40px;width:40px" %> - <%= hidden_field_tag "role", params[:role] %> -<% end %> - +<div class="searchfield"> + <%= form_tag({controller: "users", action: "index"}, method: :get, enforce_utf8: false) do %> + <%= text_field_tag "search", params[:search], placeholder: "Search for a user", style: "width:300px" %> + <%= submit_tag "Go", class: "searchfield btn", style: "width:40px", name: nil %> + <%= hidden_field_tag "role", params[:role] if params[:role] %> + <%= hidden_field_tag "badge", params[:badge] if params[:badge]%> + <% end %> +</div> <h1> <% if params[:role] && !params[:badge] @@ -19,11 +21,10 @@ %> <%= title text %> <% if params[:search] %> - (<%= @users.select {|u| u.name.downcase.include?(params[:search].downcase) || u.ign.downcase.include?(params[:search].downcase) }.size %>) + (<%= @users.total_count %>) <% else %> (<%= @count %>) <% end %> - </h1> <%= link_to "show all", users_path if params[:role] || params[:badge] %> |