1 <h3 class="sr-only">[% l('Catalog Search') %]</h3>
2 [% PROCESS "opac/parts/org_selector.tt2";
4 # We need to ignore some filters in our count
6 fignore = ['location_groups','site','core_limit','limit','badge_orgs','badges','estimation_strategy','depth'];
8 FOR f IN ctx.query_struct.filters;
9 IF fignore.grep('^' _ f.name _ '$').size;
15 # don't display a box for the search_format filter,
16 # as that's got its own widget
17 ignore_filters = ['search_format'];
20 FOR filter IN ctx.query_struct.filters;
22 IF ignore_filters.grep('^' _ fname _ '$').size;
25 trimmed_filters.push(filter);
28 ctx.query_struct.filters = trimmed_filters;
32 <div id="search-wrapper" class="container-fluid">
33 [% UNLESS took_care_of_form -%]
34 <form action="[% ctx.opac_root %]/results" method="get">
36 [% IF ctx.page == 'rresult' && ctx.metarecord && search.metarecord_default %]
37 <input type="hidden" name="modifier" value="metabib"/>
39 [% IF (ctx.page == 'place_hold' || ctx.page == 'myopac' || ctx.page == 'home' || ctx.page == 'record') && search.metarecord_default %]
40 <input type="hidden" name="modifier" value="metabib"/>
45 <div class="col-sm-12 col-md">
46 <span class='search_box_wrapper'>
47 [%- # autosuggest breaks accessibility, as the aria-label
48 # attribute is removed when the Dijit is created. :( %]
49 <label id="search_box_label" for="search_box" class="w-100">[% l('Search: ') %]
50 <input class="form-control form-control-sm" type="text" id="search_box" name="query" aria-label="[%
51 l('Enter search query:');
52 %]" value="[% is_advanced ? ctx.naive_query_scrub(ctx.user_query) : CGI.param('query') | html %]"
53 [%- IF use_autosuggest.enabled == "t" %]
54 dojoType="openils.widget.AutoSuggest" type_selector="'qtype'"
55 submitter="this.textbox.form.submit();"
56 [%- IF use_autosuggest.value.search('opac_visible') %]
57 store_args='{"org_unit_getter": function() { return [% ctx.search_ou %]; }}'
58 [%- END # opac_visible -%]
60 [% IF basic_search != "f" AND is_home_page%] autofocus [% END %]
61 [%- END # autosuggest enabled %] />
67 <div class="col-sm-12 col-md">
68 <label id="search_qtype_label" for="qtype" class="w-100">
71 INCLUDE "opac/parts/qtype_selector.tt2" id="qtype";
77 <!-- Force next columns to break to new line below md breakpoint -->
78 <div class="w-100 d-block d-md-none"></div>
81 <div class="col-sm-12 col-md">
82 <label id="search_itype_label" for="search_itype_selector" class="w-100">
85 IF search.basic_config.type == 'attr';
86 INCLUDE "opac/parts/coded_value_selector.tt2"
87 attr=search.basic_config.group none_ok=1
88 id='search_itype_selector'
89 none_label=search.basic_config.none_label;
90 ELSIF search.basic_config.type == 'filter';
91 INCLUDE "opac/parts/filter_group_selector.tt2"
92 filter_group=search.basic_config.group none_ok=1
93 id='search_itype_selector'
94 class='form-control form-control-sm'
95 none_label=search.basic_config.none_label;
102 <div class="col-sm-12 col-md">
103 <label id="search_locg_label" for="search_org_selector" class="w-100">
106 select_lib_label = l("Select search library");
107 INCLUDE build_org_selector arialabel=select_lib_label
108 id='search_org_selector' show_loc_groups=1
113 <!-- Force next columns to break to new line below md breakpoint -->
114 <div class="w-100 d-block d-md-none"></div>
116 <div class="col-auto ml-auto ml-md-1">
117 <input id="detail" type="hidden" name="detail_record_view" value="[% show_detail_view %]"/>
118 <button id='search-submit-go' type="submit" class="btn btn-sm btn-opac"
119 onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden";[% IF ctx.depth_sel_button AND NOT took_care_of_form %] $("search-submit-go-depth").className="hidden";[% END %]}, 2000)'><i class="fas fa-search" aria-hidden="true"></i> [% l('Search') %]</button>
121 [%- IF ctx.depth_sel_button AND NOT took_care_of_form %]
122 <div class="col-auto mr-auto mr-md-1">
123 <button id='search-submit-go-depth' type="submit" value="[% ctx.depth_sel_depth %]" name="depth" class="[% #ctx.depth_sel_button_class %] btn btn-sm btn-opac"
124 onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"; $("search-submit-go-depth").className="hidden";}, 2000)' title="[% ctx.depth_sel_tooltip | html %]"><i class="fas fa-globe" aria-hidden="true"></i> [% ctx.depth_sel_button_label | html %]</button>
126 <img id='search-submit-spinner' src='[% ctx.media_prefix %]/opac/images/progressbar_green.gif[% ctx.cache_key %]' style='height:16px;width:16px;' class='hidden' alt='[% l("Search In Progress") %]'/>
132 <div id="search-only-bookbag-container" class="text-center">
133 <input type="checkbox" id="search-only-bookbag" name="bookbag"
134 value="[% ctx.bookbag.id | html %]" checked="checked" />
135 <label for="search-only-bookbag">
136 [% l('Search only within the chosen list') %]
140 [% IF is_advanced || is_special %]
142 <input type="hidden" name="_adv" value="1" />
143 [% IF ctx.processed_search_query OR (NOT is_advanced AND NOT is_special) %]
144 <input name='page' type='hidden' value="0" />
147 FOR p IN CGI.params.keys;
148 NEXT UNLESS p.match('^fi:');
149 NEXT IF p.match('^fi:search_format');
150 FOR pv IN CGI.params.$p;
151 %]<input type="hidden" name="[% p | html %]" value="[% pv | html %]" />[%
156 <input type="hidden" name="_special" value="1" /> [%
157 number_of_expert_rows = CGI.param('tag').list.size;
159 WHILE index < number_of_expert_rows %]
160 <input type="hidden" name="tag" value="[% CGI.param('tag').list.$index | html %]" />
161 <input type="hidden" name="subfield" value="[% CGI.param('subfield').list.$index | html %]" />
162 <input type="hidden" name="term" value="[% CGI.param('term').list.$index | html %]" />
163 [% index = index + 1; %]
168 [% UNLESS took_care_of_form %]
169 [% IF ctx.default_sort %]
170 <input type="hidden" name="sort" value="[% ctx.default_sort %]"/>
175 <div class="refine_search result_block_visible">
176 <span id="filter_hits">[ <a href="#" onclick="getAdvLimits();return false;">[% l('[quant,_1,filter,filters] applied', fcount) %]</a> ]</span>
179 [% IF ctx.query_struct.filters.size > 0 %]
180 [% stuff = INCLUDE 'opac/parts/result/adv_filter.tt2' %]
182 <h3 class="sr-only">[% l('Search Results filters') %]</h3>
183 <div id="adv_filter_results_block" class="adv_filter_results_hide">
184 <span class="adv_filter_results_block_label">[% l('Filtered by:') %]</span>
192 function getAdvLimits() {
193 var AdvLimitsClass = document.getElementById('adv_filter_results_block').classList;
194 if (AdvLimitsClass.contains("adv_filter_results_hide")) {
195 AdvLimitsClass.remove("adv_filter_results_hide");
197 AdvLimitsClass.add("adv_filter_results_hide");
199 if (AdvLimitsClass.contains("adv_filter_results_show")) {
200 AdvLimitsClass.remove("adv_filter_results_show");
202 AdvLimitsClass.add("adv_filter_results_show");
206 <!-- Canonicalized query:
208 [% ctx.canonicalized_query | html %]
212 <div id="breadcrumb">
213 <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> >