Lines 105-135
Link Here
|
105 |
<!-- BOOLEAN SEARCH OPTIONS --> |
105 |
<!-- BOOLEAN SEARCH OPTIONS --> |
106 |
<fieldset id="searchterms"> |
106 |
<fieldset id="searchterms"> |
107 |
<legend>Search for </legend> |
107 |
<legend>Search for </legend> |
108 |
[% FOREACH search_box IN search_boxes_loop %] |
108 |
[% FOREACH query IN queries %] |
109 |
[% IF ( search_boxes_label ) %] |
109 |
[% IF ( expanded_options ) %] |
110 |
<div class="search-term-row" style="text-indent: 4.5em;"> |
|
|
111 |
[% ELSE %] |
112 |
<div class="search-term-row"> |
110 |
<div class="search-term-row"> |
113 |
[% END %] |
111 |
[% SET opindex = loop.index - 1 %] |
114 |
[% IF ( expanded_options ) %] |
112 |
<select name="op"> |
115 |
[% IF ( search_box.boolean ) %] |
113 |
[% IF operators.$opindex == 'or' %] |
116 |
<select name="op"> |
114 |
<option value="and">and</option> |
117 |
<option value="and" selected="selected">and</option> |
115 |
<option value="or" selected="selected">or</option> |
118 |
<option value="or">or</option> |
116 |
<option value="not">not</option> |
119 |
<option value="not">not</option> |
117 |
[% ELSIF operators.$opindex == 'not' %] |
120 |
</select> |
118 |
<option value="and">and</option> |
121 |
[% END %] |
119 |
<option value="or">or</option> |
122 |
[% END %] |
120 |
<option value="not" selected="selected">not</option> |
123 |
[% INCLUDE 'search_indexes.inc' %] |
121 |
[% ELSE %] |
124 |
<input type="text" size="30" name="q" title="Enter search terms" value="" /> |
122 |
<option value="and" selected="selected">and</option> |
125 |
[% IF ( expanded_options ) %] |
123 |
<option value="or">or</option> |
126 |
[% IF ( search_box.add_field ) %] |
124 |
<option value="not">not</option> |
127 |
<a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a> |
|
|
128 |
[% END %] |
129 |
[% IF ( search_box.scan_index ) %] |
130 |
<label for="scan">Scan indexes:</label> <input type="checkbox" name="scan" id="scan" value="1" /> |
131 |
[% END %] |
132 |
[% END %] |
125 |
[% END %] |
|
|
126 |
</select> |
127 |
[% ELSE %] |
128 |
<div> |
129 |
[% END %] |
130 |
[% SET preselect = 'ms_' _ indexes.${loop.index}.replace(',','comma') %] |
131 |
[% INCLUDE 'search_indexes.inc' %] |
132 |
<input type="text" size="30" name="q" title="Enter search terms" value="[% query | html %]" /> |
133 |
[% IF ( expanded_options ) %] |
134 |
<a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a> |
135 |
[% IF ( loop.first ) %] |
136 |
<label for="scan">Scan indexes:</label> <input type="checkbox" name="scan" id="scan" value="1" /> |
137 |
[% END %] |
138 |
[% END %] |
133 |
</div> |
139 |
</div> |
134 |
[% END %] |
140 |
[% END %] |
135 |
[% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %] |
141 |
[% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %] |
Lines 171-179
Link Here
|
171 |
<table> |
177 |
<table> |
172 |
<tr> |
178 |
<tr> |
173 |
[% FOREACH itemtypeloo IN advsearchloo.code_loop %] |
179 |
[% FOREACH itemtypeloo IN advsearchloo.code_loop %] |
174 |
<td><input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]" name="limit" value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"/><label for="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]">[% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %][% IF ( itemtypeloo.imageurl ) %]<img src="[% itemtypeloo.imageurl | html %]" alt="[% itemtypeloo.description | html %]" />[% END %] [% END %] |
180 |
<td> |
175 |
[% itemtypeloo.description | html %]</label></td> |
181 |
[% SET limit_key = 'mc-' _ itemtypeloo.ccl _ "_" _ itemtypeloo.code %] |
176 |
[% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %] |
182 |
[% IF limits.$limit_key.defined %] |
|
|
183 |
[% limits.delete( limit_key ) %] |
184 |
<input type="checkbox" checked="checked" id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]" name="limit" value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"/> |
185 |
[% ELSE %] |
186 |
<input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]" name="limit" value="mc-[% itemtypeloo.ccl | html %]:[% itemtypeloo.code | html %]"/> |
187 |
[% END %] |
188 |
<label for="[% itemtypeloo.ccl FILTER remove(',') | html %]-[% itemtypeloo.number | html %]"> |
189 |
[% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %] |
190 |
[% IF ( itemtypeloo.imageurl ) %] |
191 |
<img src="[% itemtypeloo.imageurl | html %]" alt="[% itemtypeloo.description | html %]" /> |
192 |
[% END %] |
193 |
|
194 |
[% END %] |
195 |
[% itemtypeloo.description | html %] |
196 |
</label> |
197 |
</td> |
198 |
[% IF ( loop.last ) %] |
199 |
</tr> |
200 |
[% ELSE %] |
201 |
[% UNLESS ( loop.count % 5 ) %] |
202 |
</tr> |
203 |
<tr> |
204 |
[% END %] |
205 |
[% END %] |
177 |
[% END %] |
206 |
[% END %] |
178 |
</table> |
207 |
</table> |
179 |
</div> |
208 |
</div> |
Lines 186-197
Link Here
|
186 |
<fieldset id="pubrange"> |
215 |
<fieldset id="pubrange"> |
187 |
<!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options --> |
216 |
<!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options --> |
188 |
<p><label for="limit-yr">Year: </label> |
217 |
<p><label for="limit-yr">Year: </label> |
189 |
<input type="text" size="15" name="limit-yr" id="limit-yr" value=""/> (format: yyyy-yyyy)</p> |
218 |
[% SET year_limit_key = 'yr,st-numeric' %] |
|
|
219 |
<input type="text" size="15" name="limit-yr" id="limit-yr" value="[% limits.$year_limit_key.0 | html %]"/> (format: yyyy-yyyy)</p> |
220 |
[% IF limits.$year_limit_key.defined %] |
221 |
[% limits.delete(year_limit_key) %] |
222 |
[% END %] |
190 |
<!-- /PUB / COPY YEAR LIMIT --> |
223 |
<!-- /PUB / COPY YEAR LIMIT --> |
191 |
</fieldset> |
224 |
</fieldset> |
192 |
<fieldset id="language"> |
225 |
<fieldset id="language"> |
193 |
<!-- LANGUAGE LIMIT --> |
226 |
<!-- LANGUAGE LIMIT --> |
194 |
<p> |
227 |
<p> |
|
|
228 |
<fieldset id="current_language_limits"><legend>Current language limits</legend> |
229 |
[% FOREACH langtype IN ['ln,rtrn','language-original,rtrn'] %] |
230 |
[% FOREACH limit IN limits.$langtype %] |
231 |
<span> |
232 |
<input name="limit" value="[% langtype | html %]:[% limit | html %]" type="hidden"> |
233 |
<label for="language_limit_[% loop.index() | html %]"> |
234 |
[% IF langtype == 'ln,rtrn' %]Language: [% ELSE %]Original language: [% END %] |
235 |
[% Languages.GetByISOCode( lang, limit ) | html %] |
236 |
</label> |
237 |
<input type="checkbox" class="toggle_limit" name="language_limit_[% loop.index() | html %]" checked="checked"> |
238 |
</span> |
239 |
[% END %] |
240 |
[% limits.delete( langtype ) %] |
241 |
[% END %] |
242 |
</fieldset> |
195 |
<label for="language-limit">Language: </label> |
243 |
<label for="language-limit">Language: </label> |
196 |
[% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-limit' ln_index='ln' %] |
244 |
[% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-limit' ln_index='ln' %] |
197 |
<label for="language-original-limit">Language of original: </label> |
245 |
<label for="language-original-limit">Language of original: </label> |
Lines 207-216
Link Here
|
207 |
[% IF ( UNIMARC ) %] |
255 |
[% IF ( UNIMARC ) %] |
208 |
[% INCLUDE 'subtypes_unimarc.inc' %] |
256 |
[% INCLUDE 'subtypes_unimarc.inc' %] |
209 |
[% ELSE %] |
257 |
[% ELSE %] |
|
|
258 |
[% PROCESS 'subtype_limits.inc' %] |
210 |
<!-- SUBTYPE LIMITS --> |
259 |
<!-- SUBTYPE LIMITS --> |
211 |
<fieldset id="subtype"> |
260 |
<fieldset id="subtype"> |
212 |
<legend>Subtype limits</legend><p> |
261 |
<legend>Subtype limits</legend><p> |
213 |
|
262 |
|
|
|
263 |
<fieldset id="current_subtype_limits"><legend>Current subtype limits</legend> |
264 |
[% FOREACH subtype IN ['aud','fic','bio','ctype','l-format'] %] |
265 |
[% FOREACH limit IN limits.$subtype %] |
266 |
<span> |
267 |
<input name="limit" value="[% subtype | html %]:[% limit | html %]" type="hidden"> |
268 |
<label for="subtype_limit_[% loop.index() | html %]">[% PROCESS subtype_limits_description subtype_limit = subtype _':' _ limit %]</label> |
269 |
<input type="checkbox" class="toggle_limit" name="subtype_limit_[% loop.index() | html %]" checked="checked"> |
270 |
</span> |
271 |
[% END %] |
272 |
[% limits.delete( subtype ) %] |
273 |
[% END %] |
274 |
</fieldset> |
275 |
|
214 |
<select name="limit" class="subtype"> |
276 |
<select name="limit" class="subtype"> |
215 |
<option value="" selected="selected" class="menuheader">Any audience</option> |
277 |
<option value="" selected="selected" class="menuheader">Any audience</option> |
216 |
<option value="aud:a">Preschool</option> |
278 |
<option value="aud:a">Preschool</option> |
Lines 280-293
Link Here
|
280 |
<!-- AVAILABILITY LIMITS --> |
342 |
<!-- AVAILABILITY LIMITS --> |
281 |
<fieldset id="availability"><legend>Location and availability</legend> |
343 |
<fieldset id="availability"><legend>Location and availability</legend> |
282 |
<fieldset id="currently-avail"> |
344 |
<fieldset id="currently-avail"> |
283 |
<p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p> |
345 |
[% IF limit_available %] |
|
|
346 |
<p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" checked="checked" /></p> |
347 |
[% ELSE %] |
348 |
<p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p> |
349 |
[% END %] |
284 |
</fieldset> |
350 |
</fieldset> |
285 |
|
351 |
|
286 |
<fieldset id="select-libs"> |
352 |
<fieldset id="select-libs"> |
287 |
<p><label for="branchloop">Individual libraries:</label><select name="limit" id="branchloop"> |
353 |
<p><label for="branchloop">Individual libraries:</label><select name="limit" id="branchloop"> |
288 |
<option value="">All libraries</option> |
354 |
<option value="">All libraries</option> |
289 |
[%# FIXME Should not we filter the libraries displayed? %] |
355 |
[%# FIXME Should not we filter the libraries displayed? %] |
290 |
[% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( unfiltered => 1, do_not_select_my_library => 1 ) %] |
356 |
[% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( unfiltered => 1, do_not_select_my_library => 1, selected => limits.branch.0 ) %] |
|
|
357 |
[% limits.delete('branch') %] |
291 |
</select></p> |
358 |
</select></p> |
292 |
[% IF search_groups %] |
359 |
[% IF search_groups %] |
293 |
<p>OR</p> |
360 |
<p>OR</p> |
Lines 298-306
Link Here
|
298 |
<option value=""> -- none -- </option> |
365 |
<option value=""> -- none -- </option> |
299 |
[% FOREACH sg IN search_groups %] |
366 |
[% FOREACH sg IN search_groups %] |
300 |
[% UNLESS sg.branchcode %] |
367 |
[% UNLESS sg.branchcode %] |
301 |
<option value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option> |
368 |
[% IF limits.multibranchlimit.0 == sg.id %] |
|
|
369 |
<option selected="selected" value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option> |
370 |
[% ELSE %] |
371 |
<option value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option> |
372 |
[% END %] |
302 |
[% END %] |
373 |
[% END %] |
303 |
[% END %] |
374 |
[% END %] |
|
|
375 |
[% limits.delete('multibranchlimit') %] |
304 |
</select> |
376 |
</select> |
305 |
</p> |
377 |
</p> |
306 |
[% END %] |
378 |
[% END %] |
Lines 308-318
Link Here
|
308 |
</fieldset> |
380 |
</fieldset> |
309 |
<!-- /AVAILABILITY LIMITS --> |
381 |
<!-- /AVAILABILITY LIMITS --> |
310 |
|
382 |
|
|
|
383 |
<!-- OTHER LIMITS (facets, etc.) --> |
384 |
[% IF limits.size %] |
385 |
<fieldset id=""><legend>Other limits</legend> |
386 |
<p> |
387 |
[% FOREACH key IN limits.keys %] |
388 |
[% FOREACH limit IN limits.$key %] |
389 |
<span> |
390 |
<input type="hidden" name="limit" value="[% key | html %]:[% limit | html %]"> |
391 |
<label for="other_[% key _ loop.index() | html %]">[% key | html %]:[% limit | html %]</label> |
392 |
<input type="checkbox" class="toggle_limit" name="other_[% key _ loop.index() | html %]" checked="checked"> |
393 |
</span> |
394 |
[% END %] |
395 |
[% END %] |
396 |
</p> |
397 |
</fieldset> |
398 |
[% END %] |
399 |
<!-- /OTHER LIMITS (facets, etc.) --> |
400 |
|
311 |
<!-- RANK LIMITS --> |
401 |
<!-- RANK LIMITS --> |
312 |
<fieldset id="sortby"><legend>Sorting</legend> |
402 |
<fieldset id="sortby"><legend>Sorting</legend> |
313 |
<p> |
403 |
<p> |
314 |
<label for="sort_by">Sort by: </label><select id="sort_by" name="sort_by"> |
404 |
<label for="sort_by">Sort by: </label><select id="sort_by" name="sort_by"> |
315 |
[% INCLUDE 'resort_form.inc' %] |
405 |
[% INCLUDE 'resort_form.inc' sort_by = sort %] |
316 |
</select> |
406 |
</select> |
317 |
</p> |
407 |
</p> |
318 |
</fieldset> |
408 |
</fieldset> |
Lines 366-371
Link Here
|
366 |
}); |
456 |
}); |
367 |
[% END %] |
457 |
[% END %] |
368 |
|
458 |
|
|
|
459 |
if( $("#current_language_limits input").length == 0 ){ |
460 |
$("#current_language_limits").hide(); |
461 |
} |
462 |
if( $("#current_subtype_limits input").length == 0 ){ |
463 |
$("#current_subtype_limits").hide(); |
464 |
} |
465 |
$(".toggle_limit").on('click',function(){ |
466 |
$(this).siblings("[type='hidden']").prop('disabled', !this.checked); |
467 |
}); |
468 |
|
369 |
[% IF searchid %] |
469 |
[% IF searchid %] |
370 |
browser = KOHA.browser('[% searchid | html %]'); |
470 |
browser = KOHA.browser('[% searchid | html %]'); |
371 |
browser.show_back_link(); |
471 |
browser.show_back_link(); |