]> git.openstreetmap.org Git - rails.git/blob - app/views/users/lists/show.html.erb
Add search form to the top of the user list view
[rails.git] / app / views / users / lists / show.html.erb
1 <% @title = t(".title") %>
2
3 <% content_for :head do %>
4   <%= javascript_include_tag "user" %>
5 <% end %>
6
7 <% content_for :heading do %>
8   <h1><%= t(".heading") %></h1>
9 <% end %>
10
11 <%= form_tag(users_list_path, :method => :get, :data => { "turbo" => true, "turbo-frame" => "pagination", "turbo-action" => "advance" }) do %>
12   <div class="row gx-1">
13     <div class="mb-3 col-md-auto">
14       <%= select_tag :status,
15                      options_for_select(User.aasm.states.map(&:name).map { |state| [t(".states.#{state}"), state] }, params[:status]),
16                      :include_blank => t(".select_status"),
17                      :data => { :behavior => "category_dropdown" },
18                      :class => "form-select" %>
19     </div>
20     <div class="mb-3 col-md">
21       <%= text_field_tag :ip,
22                          params[:ip],
23                          :placeholder => t(".ip_address"),
24                          :autocomplete => "on",
25                          :class => "form-control" %>
26     </div>
27     <div class="mb-3 col-md-auto">
28       <%= submit_tag t(".search"), :name => nil, :class => "btn btn-primary" %>
29     </div>
30   </div>
31 <% end -%>
32
33 <%= render :partial => "page" %>