6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Catalog › Advanced search</title>
8 [% INCLUDE 'doc-head-close.inc' %]
11 [%- BLOCK language_limit_select -%]
12 <select name="limit" id="[% ln_id | html %]">
13 <option value="">No limit</option>
14 [% FOREACH ln_loo IN ln_loop %]
15 [% IF ( ln_loo.selected ) %]
16 <option value="[% ln_index | html %],rtrn:[% ln_loo.iso639_2_code | html %]" selected="selected">
17 [% ln_loo.language_description | html %]
20 <option value="[% ln_index | html %],rtrn:[% ln_loo.iso639_2_code | html %]">
21 [% ln_loo.language_description | html %]
28 <body id="catalog_advsearch" class="catalog">
29 [% INCLUDE 'header.inc' %]
30 [% INCLUDE 'adv-search.inc' %]
31 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › Advanced search</div>
33 <div class="main container-fluid">
35 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
37 <form action="search.pl" method="get">
38 <div id="advanced-search">
39 <input type="hidden" name="advsearch" value="1"/>
40 <h1>Advanced search</h1>
42 <a href="/cgi-bin/koha/catalogue/itemsearch.pl">Go to item search</a>
44 <div id="previous_search_link"></div>
48 <!-- SEARCH BUTTONS -->
49 <div id="toolbar" class="btn-toolbar">
50 <fieldset class="action" id="submit1">
51 <div class="btn-group">
52 <button class="btn btn-default" type="submit" accesskey="s"><i class="fa fa-search"></i> Search</button>
54 <div class="btn-group">
55 [% IF ( expanded_options ) %]
56 <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=0" class="btn btn-link"><i class="fa fa-search-minus"></i> Fewer options</a>
59 <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=1" class="btn btn-link"><i class="fa fa-search-plus"></i> More options</a>
62 <div class="btn-group">
63 <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear&expanded_options=[% expanded_options | uri %]" class="btn btn-link"><i class="fa fa-trash"></i> Clear fields</a>
67 <!-- /SEARCH BUTTONS -->
70 [% IF ( outer_servers_loop ) %]
74 <legend>Select local databases</legend>
75 [% FOREACH local_servers_loo IN local_servers_loop %]
76 [% IF ( local_servers_loo.checked ) %]<input type="checkbox" id="[% local_servers_loo.id | html %]" name="[% local_servers_loo.name | html %]" checked="checked" value="[% local_servers_loo.value | html %]" />[% ELSE %]<input type="checkbox" id="[% local_servers_loo.id | html %]" name="[% local_servers_loo.name | html %]" value="[% local_servers_loo.value | html %]" />[% END %]<label for="[% local_servers_loo.id | html %]"><img width="16" height="16" alt="[% local_servers_loo.id | html %]" src="[% themelang | html %]/img/[% local_servers_loo.icon | html %]" /> [% local_servers_loo.label | html %]</label>[% END %]
81 [% IF ( outer_servers_loop ) %]
82 <!-- REMOTE DATABASES -->
83 <fieldset id="databases">
84 <legend>Select remote databases</legend>
85 [% FOREACH outer_servers_loo IN outer_servers_loop %]
86 [% IF ( outer_servers_loo.checked ) %]<input type="checkbox" id="[% outer_servers_loo.id | html %]" name="[% outer_servers_loo.name | html %]" checked="checked" value="[% outer_servers_loo.value | html %]" />[% ELSE %]<input type="checkbox" id="[% outer_servers_loo.id | html %]" name="[% outer_servers_loo.name | html %]" value="[% outer_servers_loo.value | html %]" />[% END %]
87 <label for="[% outer_servers_loo.id | html %]"><img alt="[% outer_servers_loo.id | html %]" src="[% themelang | html %]/images/[% outer_servers_loo.icon | html %]" />[% outer_servers_loo.label | html %]</label>
90 <!-- /REMOTE DATABASES -->
93 <!-- BOOLEAN SEARCH OPTIONS -->
94 <fieldset id="searchterms">
95 <legend>Search for </legend>
96 [% FOREACH search_box IN search_boxes_loop %]
97 [% IF ( search_boxes_label ) %]
98 <div class="search_set" style="text-indent: 4.5em;">
100 <div class="search_set">
102 [% IF ( expanded_options ) %]
103 [% IF ( search_box.boolean ) %]
105 <option value="and" selected="selected">and</option>
106 <option value="or">or</option>
107 <option value="not">not</option>
111 [% INCLUDE 'search_indexes.inc' %]
112 <input type="text" size="30" name="q" title="Enter search terms" value="" />
113 [% IF ( expanded_options ) %]
114 [% IF ( search_box.add_field ) %]
115 <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
117 [% IF ( search_box.scan_index ) %]
118 <label for="scan">Scan indexes:</label> <input type="checkbox" name="scan" id="scan" value="1" />
123 [% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %]
124 [% IF ( expanded_options ) %]
126 [% IF Koha.Preference('ElasticsearchMARCFormat') == 'ARRAY' %]
127 <label><input type="checkbox" name="whole_record" /> Search entire MARC record</label>
129 <span id="weight_search">
130 <label><input type="checkbox" name="weight_search" checked="checked" /> Apply field weights to search</label>
134 <input type="hidden" name="weight_search" value="1" />
138 <!-- /BOOLEAN SEARCH OPTIONS -->
141 <!-- MC-TYPE LIMITS -->
142 <div id="advsearches" class="toptabs">
144 [% FOREACH advsearchloo IN advancedsearchesloop %]
145 <li id="advsearch-tab-[% advsearchloo.advanced_search_type | html %]">
146 <a href="#advsearch-[% advsearchloo.advanced_search_type | uri %]">
147 [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]Item type
148 [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]Collection
149 [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]Shelving location
150 [% ELSE %]Something else
156 [% FOREACH advsearchloo IN advancedsearchesloop %]
157 <div id="advsearch-[% advsearchloo.advanced_search_type | html %]" class="advsearch">
158 <h4>Limit to any of the following:</h4>
161 [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
162 <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 %]
163 [% itemtypeloo.description | html %]</label></td>
164 [% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
169 <!-- /MC-TYPE LIMIT -->
170 [% IF ( expanded_options ) %]
171 <!-- BASIC LIMITS -->
172 <fieldset id="basiclimits">
173 <legend>Limits</legend>
174 <fieldset id="pubrange">
175 <!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options -->
176 <p><label for="limit-yr">Year: </label>
177 <input type="text" size="15" name="limit-yr" id="limit-yr" value=""/> (format: yyyy-yyyy)</p>
178 <!-- /PUB / COPY YEAR LIMIT -->
180 <fieldset id="language">
181 <!-- LANGUAGE LIMIT -->
183 <label for="language-limit">Language: </label>
184 [% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-limit' ln_index='ln' %]
185 <label for="language-original-limit">Language of original: </label>
186 [% PROCESS language_limit_select ln_loop=search_languages_loop ln_id='language-original-limit' ln_index='language-original' %]
188 <!-- /LANGUAGE LIMIT -->
191 <!-- /BASIC LIMITS -->
196 [% INCLUDE 'subtypes_unimarc.inc' %]
198 <!-- SUBTYPE LIMITS -->
199 <fieldset id="subtype">
200 <legend>Subtype limits</legend><p>
202 <select name="limit" class="subtype">
203 <option value="" selected="selected" class="menuheader">Any audience</option>
204 <option value="aud:a">Preschool</option>
205 <option value="aud:b">Primary</option>
206 <option value="aud:c">Pre-adolescent</option>
207 <option value="aud:d">Adolescent</option>
208 <option value="aud:e">Adult</option>
209 <option value="aud:f">Specialized</option>
210 <option value="aud:g">General</option>
211 <option value="aud:j">Juvenile</option>
214 <select name="limit" class="subtype">
215 <option value="" selected="selected" class="menuheader">Any content</option>
216 <option value="fic:1" >Fiction</option>
217 <option value="fic:0" >Non-fiction</option>
218 <option value="bio:b" >Biography</option>
219 <option value="mus:j" >Musical recording</option>
220 <option value="mus:i" >Non-musical recording</option>
224 <select name="limit" class="subtype">
225 <option value="" selected="selected" class="menuheader">Any format</option>
226 <option value="l-format:ta" >Regular print</option>
227 <option value="l-format:tb" >Large print</option>
228 <option value="l-format:tc or l-format:fb">Braille</option>
229 <option value="" >-----------</option>
230 <option value="l-format:sd" >CD audio</option>
231 <option value="l-format:ss" >Cassette recording</option>
232 <option value="l-format:vf" >VHS tape / Videocassette</option>
233 <option value="l-format:vd" >DVD video / Videodisc</option>
234 <option value="l-format:co" >CD software</option>
235 <option value="l-format:cr" >Website</option>
238 <select name="limit" class="subtype">
239 <option value="" >Additional content types</option>
240 <option value="ctype:a" >Abstracts / Summaries</option>
241 <option value="ctype:b" >Bibliographies</option>
242 <option value="ctype:c" >Catalogs</option>
243 <option value="ctype:d" >Dictionaries</option>
244 <option value="ctype:e" >Encyclopedias </option>
245 <option value="ctype:f" >Handbooks</option>
246 <option value="ctype:g" >Legal articles</option>
247 <option value="ctype:i" >Indexes</option>
248 <option value="ctype:j" >Patent document</option>
249 <option value="ctype:k" >Discographies</option>
250 <option value="ctype:l" >Legislation</option>
251 <option value="ctype:m" >Theses</option>
252 <option value="ctype:n" >Surveys</option>
253 <option value="ctype:o" >Reviews</option>
254 <option value="ctype:p" >Programmed texts</option>
255 <option value="ctype:q" >Filmographies</option>
256 <option value="ctype:r" >Directories</option>
257 <option value="ctype:s" >Statistics</option>
258 <option value="ctype:t" >Technical reports</option>
259 <option value="ctype:v" >Legal cases and case notes</option>
260 <option value="ctype:w" >Law reports and digests</option>
261 <option value="ctype:z" >Treaties </option>
268 <!-- AVAILABILITY LIMITS -->
269 <fieldset id="availability"><legend>Location and availability</legend>
270 <fieldset id="currently-avail">
271 <p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p>
274 <fieldset id="select-libs">
275 <p><label for="branchloop">Individual libraries:</label><select name="limit" id="branchloop">
276 <option value="">All libraries</option>
277 [%# FIXME Should not we filter the libraries displayed? %]
278 [% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( selected => selected_branchcode, unfiltered => 1 ) %]
280 <!-- <input type="hidden" name="limit" value="branch: MAIN" /> -->
281 [% IF search_groups %]
282 <p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
285 <label for="categoryloop">Groups of libraries: </label>
286 <select name="multibranchlimit" id="categoryloop">
287 <option value=""> -- none -- </option>
288 [% FOREACH sg IN search_groups %]
289 [% UNLESS sg.branchcode %]
290 <option value="[% sg.id | html %]">[% sg.title | html %]</option>
298 <!-- /AVAILABILITY LIMITS -->
301 <fieldset id="sortby"><legend>Sorting</legend>
303 <label for="sort_by">Sort by: </label><select id="sort_by" name="sort_by">
304 [% INCLUDE 'resort_form.inc' %]
309 <!-- /RANK LIMITS -->
314 [% MACRO jsinclude BLOCK %]
315 [% Asset.js("lib/hc-sticky.js") | $raw %]
316 [% Asset.js("js/browser.js") | $raw %]
319 * Function add_field();
320 * This function allows to display a new field to search.
322 function add_field() {
323 var ButtonPlus = document.getElementById("ButtonPlus");
324 var line = ButtonPlus.parentNode;
325 var dad = line.parentNode;
326 dad.appendChild(line.cloneNode(true));
327 line.removeChild(ButtonPlus);
330 $(document).ready(function() {
331 $("input[name=q]:eq(0)").focus();
332 $('#advsearches').tabs();
333 Sticky = $("#toolbar");
336 stickyClass: "floating"
338 $("#branchloop").on("change",function(){
339 if( this.value != ""){
340 document.getElementById("categoryloop").disabled=true;
342 document.getElementById("categoryloop").disabled=false;
347 browser = KOHA.browser('[% searchid | html %]');
348 browser.show_back_link();
355 [% INCLUDE 'intranet-bottom.inc' %]