|
Lines 12-18
Link Here
|
| 12 |
<select name="limit" id="[% ln_id | html %]"> |
12 |
<select name="limit" id="[% ln_id | html %]"> |
| 13 |
<option value="">No limit</option> |
13 |
<option value="">No limit</option> |
| 14 |
[% FOREACH ln_loo IN ln_loop %] |
14 |
[% FOREACH ln_loo IN ln_loop %] |
| 15 |
[% IF ( ln_loo.selected ) %] |
15 |
[% IF ( ln_loo.selected or selected == ln_loo.iso639_2_code ) %] |
| 16 |
<option value="[% ln_index | html %],rtrn:[% ln_loo.iso639_2_code | html %]" selected="selected"> |
16 |
<option value="[% ln_index | html %],rtrn:[% ln_loo.iso639_2_code | html %]" selected="selected"> |
| 17 |
[% ln_loo.language_description | html %] |
17 |
[% ln_loo.language_description | html %] |
| 18 |
</option> |
18 |
</option> |
|
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-201
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> |
| 195 |
<label for="language-limit">Language: </label> |
228 |
<label for="language-limit">Language: </label> |
| 196 |
[% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-limit' ln_index='ln' %] |
229 |
[% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-limit' ln_index='ln' selected = limits.${'ln,rtrn'}.0 %] |
|
|
230 |
[% limits.delete( 'ln,rtrn' ) %] |
| 197 |
<label for="language-original-limit">Language of original: </label> |
231 |
<label for="language-original-limit">Language of original: </label> |
| 198 |
[% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-original-limit' ln_index='language-original' %] |
232 |
[% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-original-limit' ln_index='language-original' selected = limits.${'language-original,rtrn'}.0 %] |
|
|
233 |
[% limits.delete( 'language-original,rtrn' ) %] |
| 199 |
</p> |
234 |
</p> |
| 200 |
<!-- /LANGUAGE LIMIT --> |
235 |
<!-- /LANGUAGE LIMIT --> |
| 201 |
</fieldset> |
236 |
</fieldset> |
|
Lines 207-216
Link Here
|
| 207 |
[% IF ( UNIMARC ) %] |
242 |
[% IF ( UNIMARC ) %] |
| 208 |
[% INCLUDE 'subtypes_unimarc.inc' %] |
243 |
[% INCLUDE 'subtypes_unimarc.inc' %] |
| 209 |
[% ELSE %] |
244 |
[% ELSE %] |
|
|
245 |
[% PROCESS 'subtype_limits.inc' %] |
| 210 |
<!-- SUBTYPE LIMITS --> |
246 |
<!-- SUBTYPE LIMITS --> |
| 211 |
<fieldset id="subtype"> |
247 |
<fieldset id="subtype"> |
| 212 |
<legend>Subtype limits</legend><p> |
248 |
<legend>Subtype limits</legend><p> |
| 213 |
|
249 |
|
|
|
250 |
<fieldset id="current_subtype_limits"><legend>Current subtype limits</legend> |
| 251 |
[% FOREACH subtype IN ['aud','fic','bio','ctype','l-format'] %] |
| 252 |
[% FOREACH limit IN limits.$subtype %] |
| 253 |
<span> |
| 254 |
<input name="limit" value="[% subtype | html %]:[% limit | html %]" type="hidden"> |
| 255 |
<label for="subtype_limit_[% loop.index() | html %]">[% PROCESS subtype_limits_description subtype_limit = subtype _':' _ limit %]</label> |
| 256 |
<input type="checkbox" class="toggle_limit" name="subtype_limit_[% loop.index() | html %]" checked="checked"> |
| 257 |
</span> |
| 258 |
[% END %] |
| 259 |
[% limits.delete( subtype ) %] |
| 260 |
[% END %] |
| 261 |
</fieldset> |
| 262 |
|
| 214 |
<select name="limit" class="subtype"> |
263 |
<select name="limit" class="subtype"> |
| 215 |
<option value="" selected="selected" class="menuheader">Any audience</option> |
264 |
<option value="" selected="selected" class="menuheader">Any audience</option> |
| 216 |
<option value="aud:a">Preschool</option> |
265 |
<option value="aud:a">Preschool</option> |
|
Lines 280-293
Link Here
|
| 280 |
<!-- AVAILABILITY LIMITS --> |
329 |
<!-- AVAILABILITY LIMITS --> |
| 281 |
<fieldset id="availability"><legend>Location and availability</legend> |
330 |
<fieldset id="availability"><legend>Location and availability</legend> |
| 282 |
<fieldset id="currently-avail"> |
331 |
<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> |
332 |
[% IF limit_available %] |
|
|
333 |
<p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" checked="checked" /></p> |
| 334 |
[% ELSE %] |
| 335 |
<p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p> |
| 336 |
[% END %] |
| 284 |
</fieldset> |
337 |
</fieldset> |
| 285 |
|
338 |
|
| 286 |
<fieldset id="select-libs"> |
339 |
<fieldset id="select-libs"> |
| 287 |
<p><label for="branchloop">Individual libraries:</label><select name="limit" id="branchloop"> |
340 |
<p><label for="branchloop">Individual libraries:</label><select name="limit" id="branchloop"> |
| 288 |
<option value="">All libraries</option> |
341 |
<option value="">All libraries</option> |
| 289 |
[%# FIXME Should not we filter the libraries displayed? %] |
342 |
[%# 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 ) %] |
343 |
[% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( unfiltered => 1, do_not_select_my_library => 1, selected => limits.branch.0 ) %] |
|
|
344 |
[% limits.delete('branch') %] |
| 291 |
</select></p> |
345 |
</select></p> |
| 292 |
[% IF search_groups %] |
346 |
[% IF search_groups %] |
| 293 |
<p>OR</p> |
347 |
<p>OR</p> |
|
Lines 298-306
Link Here
|
| 298 |
<option value=""> -- none -- </option> |
352 |
<option value=""> -- none -- </option> |
| 299 |
[% FOREACH sg IN search_groups %] |
353 |
[% FOREACH sg IN search_groups %] |
| 300 |
[% UNLESS sg.branchcode %] |
354 |
[% UNLESS sg.branchcode %] |
| 301 |
<option value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option> |
355 |
[% IF limits.multibranchlimit.0 == sg.id %] |
|
|
356 |
<option selected="selected" value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option> |
| 357 |
[% ELSE %] |
| 358 |
<option value="multibranchlimit:[% sg.id | html %]">[% sg.title | html %]</option> |
| 359 |
[% END %] |
| 302 |
[% END %] |
360 |
[% END %] |
| 303 |
[% END %] |
361 |
[% END %] |
|
|
362 |
[% limits.delete('multibranchlimit') %] |
| 304 |
</select> |
363 |
</select> |
| 305 |
</p> |
364 |
</p> |
| 306 |
[% END %] |
365 |
[% END %] |
|
Lines 308-318
Link Here
|
| 308 |
</fieldset> |
367 |
</fieldset> |
| 309 |
<!-- /AVAILABILITY LIMITS --> |
368 |
<!-- /AVAILABILITY LIMITS --> |
| 310 |
|
369 |
|
|
|
370 |
<!-- OTHER LIMITS (facets, etc.) --> |
| 371 |
[% IF limits.size %] |
| 372 |
<fieldset id=""><legend>Other limits</legend> |
| 373 |
<p> |
| 374 |
[% FOREACH key IN limits.keys %] |
| 375 |
[% FOREACH limit IN limits.$key %] |
| 376 |
<span> |
| 377 |
<input type="hidden" name="limit" value="[% key | html %]:[% limit | html %]"> |
| 378 |
<label for="other_[% key _ loop.index() | html %]">[% key | html %]:[% limit | html %]</label> |
| 379 |
<input type="checkbox" class="toggle_limit" name="other_[% key _ loop.index() | html %]" checked="checked"> |
| 380 |
</span> |
| 381 |
[% END %] |
| 382 |
[% END %] |
| 383 |
</p> |
| 384 |
</fieldset> |
| 385 |
[% END %] |
| 386 |
<!-- /OTHER LIMITS (facets, etc.) --> |
| 387 |
|
| 311 |
<!-- RANK LIMITS --> |
388 |
<!-- RANK LIMITS --> |
| 312 |
<fieldset id="sortby"><legend>Sorting</legend> |
389 |
<fieldset id="sortby"><legend>Sorting</legend> |
| 313 |
<p> |
390 |
<p> |
| 314 |
<label for="sort_by">Sort by: </label><select id="sort_by" name="sort_by"> |
391 |
<label for="sort_by">Sort by: </label><select id="sort_by" name="sort_by"> |
| 315 |
[% INCLUDE 'resort_form.inc' %] |
392 |
[% INCLUDE 'resort_form.inc' sort_by = sort %] |
| 316 |
</select> |
393 |
</select> |
| 317 |
</p> |
394 |
</p> |
| 318 |
</fieldset> |
395 |
</fieldset> |
|
Lines 366-371
Link Here
|
| 366 |
}); |
443 |
}); |
| 367 |
[% END %] |
444 |
[% END %] |
| 368 |
|
445 |
|
|
|
446 |
if( $("#current_subtype_limits input").length == 0 ){ |
| 447 |
$("#current_subtype_limits").hide(); |
| 448 |
} |
| 449 |
$(".toggle_limit").on('click',function(){ |
| 450 |
$(this).siblings("[type='hidden']").prop('disabled', !this.checked); |
| 451 |
}); |
| 452 |
|
| 369 |
[% IF searchid %] |
453 |
[% IF searchid %] |
| 370 |
browser = KOHA.browser('[% searchid | html %]'); |
454 |
browser = KOHA.browser('[% searchid | html %]'); |
| 371 |
browser.show_back_link(); |
455 |
browser.show_back_link(); |