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"/>
43 <span class="search_catalog_lbl mobile_hide">[% l('Search the Catalog') %]</span>
44 <span class="adv_search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/advanced', {}, expert_search_parms.merge(browse_search_parms, facet_search_parms)) %]"
45 id="home_adv_search_link">[% l('Advanced Search') %]</a></span>
46 <span class="browse_the_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/browse', {}, expert_search_parms.merge(general_search_parms, facet_search_parms, ['fi:has_browse_entry'])) %]">[% l('Browse the Catalog') %]</a></span>
47 [% INCLUDE 'opac/parts/cart.tt2' %]
49 <div class="searchbar">
50 <span class='search_box_wrapper'>
51 [%- # autosuggest breaks accessibility, as the aria-label
52 # attribute is removed when the Dijit is created. :( %]
53 <label id="search_box_label" for="search_box">[% l('Search: ') %]
54 <input type="text" id="search_box" name="query" aria-label="[%
55 l('Enter search query:');
56 %]" value="[% is_advanced ? ctx.naive_query_scrub(ctx.user_query) : CGI.param('query') | html %]"
57 [%- IF use_autosuggest.enabled == "t" %]
58 dojoType="openils.widget.AutoSuggest" type_selector="'qtype'"
59 submitter="this.textbox.form.submit();"
60 [%- IF use_autosuggest.value.search('opac_visible') %]
61 store_args='{"org_unit_getter": function() { return [% ctx.search_ou %]; }}'
62 [%- END # opac_visible -%]
64 [% IF basic_search != "f" %] autofocus [% END %] x-webkit-speech
65 [%- END # autosuggest enabled %] />
68 <label id="search_qtype_label" for="qtype">
71 INCLUDE "opac/parts/qtype_selector.tt2" id="qtype";
74 <label id="search_itype_label" for="search_itype_selector">
77 IF search.basic_config.type == 'attr';
78 INCLUDE "opac/parts/coded_value_selector.tt2"
79 attr=search.basic_config.group none_ok=1
80 id='search_itype_selector'
81 none_label=search.basic_config.none_label;
82 ELSIF search.basic_config.type == 'filter';
83 INCLUDE "opac/parts/filter_group_selector.tt2"
84 filter_group=search.basic_config.group none_ok=1
85 id='search_itype_selector'
86 none_label=search.basic_config.none_label;
90 <label id="search_locg_label" for="search_org_selector">
93 select_lib_label = l("Select search library");
94 INCLUDE build_org_selector arialabel=select_lib_label
95 id='search_org_selector' show_loc_groups=1
99 <input id="detail" type="hidden" name="detail_record_view" value="[% show_detail_view %]"/>
100 <input id='search-submit-go' type="submit" value="[% l('Search') %]" class="opac-button"
101 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)'/>
102 [%- IF ctx.depth_sel_button AND NOT took_care_of_form %]
103 <button id='search-submit-go-depth' type="submit" value="[% ctx.depth_sel_depth %]" name="depth" class="[% ctx.depth_sel_button_class %]"
104 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 %]">[% ctx.depth_sel_button_label | html %]</button>
106 <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") %]'/>
107 [%- IF took_care_of_form && !search.no_highlight %]
108 <label for="no_highlight">
109 <input type="checkbox" id="no_highlight" name="no_highlight" value="1"
110 onchange="search_modifier_onchange('no_highlight', this, true)"
111 [% CGI.param('no_highlight').size ? ' checked="checked"' : '' %] />
112 [% l('Disable Highlighting') %]
118 <div id="search-only-bookbag-container">
119 <input type="checkbox" id="search-only-bookbag" name="bookbag"
120 value="[% ctx.bookbag.id | html %]" checked="checked" />
121 <label for="search-only-bookbag">
122 [% l('Search only within the chosen list') %]
126 [% IF is_advanced || is_special %]
128 <input type="hidden" name="_adv" value="1" />
129 [% IF ctx.processed_search_query OR (NOT is_advanced AND NOT is_special) %]
130 <input name='page' type='hidden' value="0" />
133 FOR p IN CGI.params.keys;
134 NEXT UNLESS p.match('^fi:');
135 NEXT IF p.match('^fi:search_format');
136 FOR pv IN CGI.params.$p;
137 %]<input type="hidden" name="[% p | html %]" value="[% pv | html %]" />[%
142 <input type="hidden" name="_special" value="1" /> [%
143 number_of_expert_rows = CGI.param('tag').list.size;
145 WHILE index < number_of_expert_rows %]
146 <input type="hidden" name="tag" value="[% CGI.param('tag').list.$index | html %]" />
147 <input type="hidden" name="subfield" value="[% CGI.param('subfield').list.$index | html %]" />
148 <input type="hidden" name="term" value="[% CGI.param('term').list.$index | html %]" />
149 [% index = index + 1; %]
154 [% UNLESS took_care_of_form %]
155 [% IF ctx.default_sort %]
156 <input type="hidden" name="sort" value="[% ctx.default_sort %]"/>
161 <div class="refine_search result_block_visible">
162 <span id="filter_hits">[ <a href="#" onclick="getAdvLimits();return false;">[% l('[quant,_1,filter,filters] applied', fcount) %]</a> ]</span>
165 [% IF ctx.query_struct.filters.size > 0 %]
166 [% stuff = INCLUDE 'opac/parts/result/adv_filter.tt2' %]
168 <h3 class="sr-only">[% l('Search Results filters') %]</h3>
169 <div id="adv_filter_results_block" class="adv_filter_results_hide">
170 <span class="adv_filter_results_block_label">[% l('Filtered by:') %]</span>
175 [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %]
176 <div class="refine_search result_block_visible">
177 <span id="refine_search_link">[ <a href="[% mkurl(ctx.opac_root _ '/advanced') %]">[%
178 l('Refine My Original Search')
184 function getAdvLimits() {
185 var AdvLimitsClass = document.getElementById('adv_filter_results_block').classList;
186 if (AdvLimitsClass.contains("adv_filter_results_hide")) {
187 AdvLimitsClass.remove("adv_filter_results_hide");
189 AdvLimitsClass.add("adv_filter_results_hide");
191 if (AdvLimitsClass.contains("adv_filter_results_show")) {
192 AdvLimitsClass.remove("adv_filter_results_show");
194 AdvLimitsClass.add("adv_filter_results_show");
198 <!-- Canonicalized query:
200 [% ctx.canonicalized_query | html %]
204 <div id="breadcrumb">
205 <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> >
208 <div class="clear-both"></div>