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">
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-xs-12 col-sm-12 col-lg-6 col-xl-3">
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-lg" 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-xs-12 col-sm-12 col-lg-6 col-xl-2">
68 <label id="search_qtype_label" for="qtype" class="w-100">
71 INCLUDE "opac/parts/qtype_selector.tt2" id="qtype";
77 <div class="col-xs-12 col-sm-12 col-lg-6 col-xl-2">
78 <label id="search_itype_label" for="search_itype_selector" class="w-100">
81 IF search.basic_config.type == 'attr';
82 INCLUDE "opac/parts/coded_value_selector.tt2"
83 attr=search.basic_config.group none_ok=1
84 id='search_itype_selector'
85 none_label=search.basic_config.none_label;
86 ELSIF search.basic_config.type == 'filter';
87 INCLUDE "opac/parts/filter_group_selector.tt2"
88 filter_group=search.basic_config.group none_ok=1
89 id='search_itype_selector'
90 none_label=search.basic_config.none_label;
97 <div class="col-xs-12 col-sm-12 col-lg-6 col-xl-2">
98 <label id="search_locg_label" for="search_org_selector" class="w-100">
101 select_lib_label = l("Select search library");
102 INCLUDE build_org_selector arialabel=select_lib_label
103 id='search_org_selector' show_loc_groups=1
107 <div class="col-xs-12 col-sm-12 col-lg-12 col-xl-3">
108 <div class="vertMid text-center">
109 <input id="detail" type="hidden" name="detail_record_view" value="[% show_detail_view %]"/>
110 <button id='search-submit-go' type="submit" class="btn btn-opac m-2"
111 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"></i> [% l('Search') %]</button>
112 [%- IF ctx.depth_sel_button AND NOT took_care_of_form %]
113 <button id='search-submit-go-depth' type="submit" value="[% ctx.depth_sel_depth %]" name="depth" class="[% #ctx.depth_sel_button_class %] btn btn-opac m-2"
114 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"></i> [% ctx.depth_sel_button_label | html %]</button>
116 <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") %]'/>
131 <div id="search-only-bookbag-container" class="text-center">
132 <input type="checkbox" id="search-only-bookbag" name="bookbag"
133 value="[% ctx.bookbag.id | html %]" checked="checked" />
134 <label for="search-only-bookbag">
135 [% l('Search only within the chosen list') %]
139 [% IF is_advanced || is_special %]
141 <input type="hidden" name="_adv" value="1" />
142 [% IF ctx.processed_search_query OR (NOT is_advanced AND NOT is_special) %]
143 <input name='page' type='hidden' value="0" />
146 FOR p IN CGI.params.keys;
147 NEXT UNLESS p.match('^fi:');
148 NEXT IF p.match('^fi:search_format');
149 FOR pv IN CGI.params.$p;
150 %]<input type="hidden" name="[% p | html %]" value="[% pv | html %]" />[%
155 <input type="hidden" name="_special" value="1" /> [%
156 number_of_expert_rows = CGI.param('tag').list.size;
158 WHILE index < number_of_expert_rows %]
159 <input type="hidden" name="tag" value="[% CGI.param('tag').list.$index | html %]" />
160 <input type="hidden" name="subfield" value="[% CGI.param('subfield').list.$index | html %]" />
161 <input type="hidden" name="term" value="[% CGI.param('term').list.$index | html %]" />
162 [% index = index + 1; %]
167 [% UNLESS took_care_of_form %]
168 [% IF ctx.default_sort %]
169 <input type="hidden" name="sort" value="[% ctx.default_sort %]"/>
174 <div class="refine_search result_block_visible">
175 <span id="filter_hits">[ <a href="#" onclick="getAdvLimits();return false;">[% l('[quant,_1,filter,filters] applied', fcount) %]</a> ]</span>
178 [% IF ctx.query_struct.filters.size > 0 %]
179 [% stuff = INCLUDE 'opac/parts/result/adv_filter.tt2' %]
181 <h3 class="sr-only">[% l('Search Results filters') %]</h3>
182 <div id="adv_filter_results_block" class="adv_filter_results_hide">
183 <span class="adv_filter_results_block_label">[% l('Filtered by:') %]</span>
191 function getAdvLimits() {
192 var AdvLimitsClass = document.getElementById('adv_filter_results_block').classList;
193 if (AdvLimitsClass.contains("adv_filter_results_hide")) {
194 AdvLimitsClass.remove("adv_filter_results_hide");
196 AdvLimitsClass.add("adv_filter_results_hide");
198 if (AdvLimitsClass.contains("adv_filter_results_show")) {
199 AdvLimitsClass.remove("adv_filter_results_show");
201 AdvLimitsClass.add("adv_filter_results_show");
205 <!-- Canonicalized query:
207 [% ctx.canonicalized_query | html %]
211 <div id="breadcrumb">
212 <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> >