|
1 |
| - <%= form_tag @url, method: :get, class: ['d-flex','flex-md-row-reverse','flex-sm-column','w-100'] do %> |
2 |
| - <%= render_hash_as_hidden_fields(@params.except(:q, :search_field, :qt, :page, :utf8, :format, :slug, :site_slug)) %> |
3 |
| - <%= render_hash_as_hidden_fields(search_action_params) %> |
4 |
| - <div class="input-group flex-sm-row flex-md-fill"> |
5 |
| - <%= render pagination_component %> |
6 |
| - <div class="input-group-prepend collapseSearch flex-fill p-0<%= ' collapse' if pagination_component.render?%>" id="collapseQuery"> |
7 |
| - <% unless search_fields.empty? %> |
8 |
| - <span class="input-group-append p-0<%= ' hidden' if search_fields.length == 1 %>"> |
9 |
| - <label for="search_field" class="sr-only"><%= t('blacklight.search.form.search_field.label') %></label> |
10 |
| - <%= select_tag( |
11 |
| - :search_field, |
12 |
| - options_for_select( |
13 |
| - search_fields, |
14 |
| - h(params[:search_field]) |
15 |
| - ), |
16 |
| - title: t('blacklight.search.form.search_field.title'), class: 'btn search-btn btn-primary rounded-0' |
17 |
| - ) |
18 |
| - %> |
19 |
| - <span class="sr-only"><%= t('blacklight.search.form.search_field.post_label') %></span> |
20 |
| - </span> |
21 |
| - <% end %> |
| 1 | +<%= form_tag @url, method: :get, class: ['form-inline','flex-md-row-reverse','flex-sm-column','w-100'] do %> |
| 2 | + <%= render_hash_as_hidden_fields(params_for_new_search) %> |
| 3 | + <%- rendering_pagination = pagination_will_render? -%> |
| 4 | + <div class="input-group flex-fill flex-nowrap align-content-end"> |
| 5 | + <div class="btn-group input-group-prepend btn-group-toggle flex-shrink-0" data-toggle="buttons"> |
| 6 | + <label for="show-search-mode" class="btn btn-secondary border-info rounded-left<%= ' active' unless rendering_pagination %>" onclick="if ($('#collapseQuery').hasClass('show')) return false;"> |
| 7 | + <input type="radio" name="searchpag-mode" id="show-search-mode" aria-label="Show search box" aria-controls="collapseQuery collapsePag" <%= 'disabled ' unless rendering_pagination %>data-toggle="collapse" data-target=".collapseSearch" aria-expanded="false"> |
| 8 | + <i class="previous fa fa-binoculars" title="Show search box" data-toggle="tooltip" data-original-title="Show search box"></i> |
| 9 | + </label> |
| 10 | + <label for="show-pag-mode" class="btn btn-secondary border-info<%= rendering_pagination ? ' active' : ' disabled' %>" onclick="if ($('#collapsePag').hasClass('show')) return false;"> |
| 11 | + <input type="radio" name="searchpag-mode" id="show-pag-mode" aria-label="Navigate results" aria-controls="collapseQuery collapsePag" <%= rendering_pagination ? 'checked ' : ' disabled' %>data-toggle="collapse" data-target=".collapseSearch" aria-expanded="false"> |
| 12 | + <i class="previous fa fa-book-open-reader" title="Navigate results" data-toggle="tooltip" data-original-title="Navigate results"></i> |
| 13 | + </label> |
| 14 | + </div> |
| 15 | + <%= render pagination_component %> |
| 16 | + <div class="input-group-prepend p-0 flex-grow-1 collapseSearch<%= ' collapse' if rendering_pagination %>" id="collapseQuery"> |
| 17 | + <%= render search_fields_component %> |
| 18 | + <div class="flex-fill flex-shrink-1"> |
| 19 | + <input type="hidden" name="search_field" value="all_text_teim"> |
22 | 20 | <label for="q" class="sr-only"><%= t('blacklight.search.form.q') %></label>
|
23 |
| - <%= text_field_tag :q, params[:q], :placeholder => search_placeholder_text, :class => "search_q q flex-fill bg-white", :id => "q" %> |
24 |
| - <div class="input-group-append"> |
25 |
| - <%= link_to '<i class="fa fa-remove"></i>'.html_safe, start_over_path, :title => 'Start Over', :class => 'btn bg-body btn-outline-info reset-btn' if query_has_constraints? %> |
26 |
| - <button class="btn btn-splash" type="submit" aria-label="Submit"> |
27 |
| - <span class="hidden-xs"><%= (current_page?(root_url)? t('blacklight.search.form.submit') : '') %></span> |
28 |
| - <span class="fa fa-search"></span> |
29 |
| - </button> |
30 |
| - </div> |
| 21 | + <%= text_field_tag :q, params[:q], placeholder: search_placeholder_text, class: "search_q q bg-white form-control w-100", id: "q", tabindex: "1" %> |
| 22 | + </div> |
| 23 | + <div class="btn-group input-group-append"> |
| 24 | + <%= render format_filter_component %> |
| 25 | + <%= link_to '<i class="fa fa-remove"></i>'.html_safe, start_over_path, :title => 'Start Over', :class => 'btn btn-secondary reset-btn' if query_has_constraints? %> |
| 26 | + <button class="btn btn-splash" type="submit"> |
| 27 | + <span class="hidden-xs"><%= (current_page?(root_url)? t('blacklight.search.form.submit') : '') %></span> |
| 28 | + <span class="fa fa-search"></span> |
| 29 | + </button> |
31 | 30 | </div>
|
32 | 31 | </div>
|
| 32 | + </div> |
33 | 33 |
|
34 |
| - <% end %> |
| 34 | +<% end %> |
0 commit comments