-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy path_search.html.erb
More file actions
25 lines (24 loc) · 1.27 KB
/
_search.html.erb
File metadata and controls
25 lines (24 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<%# locals: { search_term } %>
<%= form_tag(paginable_base_url(1), method: :get, remote: remote, class: 'form-inline paginable-action') do %>
<div class="d-inline-flex flex-row mb-2 col-6">
<div class="d-inline-flex input-group col-6">
<span class="input-group-text" id="search-addon">
<span class="fas fa-magnifying-glass" aria-hidden="true"></span>
</span>
<%= text_field_tag(:search, search_term, class: 'form-control', 'aria-labelledby': 'search',
spellcheck: true, 'aria-describedby': 'search-addon', 'aria-required': true) %>
</div>
<div class="d-inline-flex input-group col-6">
<%# @filter_admin is only defined on the users_index page %>
<% unless @filter_admin.nil? %>
<div class="d-inline-flex align-items-center form-check ms-2">
<%= check_box_tag( :filter_admin , "1", @filter_admin, class: 'checkbox')%>
<%= label_tag(:filter_admin, _('Only Show Admins'), class: 'form-check-label') %>
</div>
<% end %>
<%# :f corresponds to the "Published" vs "Unpublished" etc. filters defined on the org_admin/templates pages %>
<%= hidden_field_tag :f, params[:f] if params[:f].present? %>
<%= submit_tag(_('Search'), class: 'btn btn-secondary ms-2') %>
</div>
</div>
<% end %>