5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Catalog › Advanced search</title>
7 [% INCLUDE 'doc-head-close.inc' %]
10 <body id="catalog_advsearch" class="catalog">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'adv-search.inc' %]
13 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › Advanced search</div>
15 <div class="main container-fluid">
17 <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
19 <form action="search.pl" method="get">
20 <div id="advanced-search">
21 <input type="hidden" name="advsearch" value="1"/>
22 <h1>Advanced search</h1>
24 <a href="/cgi-bin/koha/catalogue/itemsearch.pl">Go to item search</a>
27 <!-- SEARCH BUTTONS -->
28 <div id="toolbar" class="btn-toolbar">
29 <fieldset class="action" id="submit1">
30 <div class="btn-group">
31 <button class="btn btn-default btn-sm" type="submit" accesskey="s"><i class="fa fa-search"></i> Search</button>
33 <div class="btn-group">
34 [% IF ( expanded_options ) %]
35 <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=0" class="btn btn-sm btn-link"><i class="fa fa-search-minus"></i> Fewer options</a>
38 <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=1" class="btn btn-sm btn-link"><i class="fa fa-search-plus"></i> More options</a>
41 <div class="btn-group">
42 <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear&expanded_options=[% expanded_options | uri %]" class="btn btn-sm btn-link"><i class="fa fa-trash"></i> Clear fields</a>
46 <!-- /SEARCH BUTTONS -->
49 [% IF ( outer_servers_loop ) %]
53 <legend>Select local databases</legend>
54 [% FOREACH local_servers_loo IN local_servers_loop %]
55 [% 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 %]
60 [% IF ( outer_servers_loop ) %]
61 <!-- REMOTE DATABASES -->
62 <fieldset id="databases">
63 <legend>Select remote databases</legend>
64 [% FOREACH outer_servers_loo IN outer_servers_loop %]
65 [% 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 %]
66 <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>
69 <!-- /REMOTE DATABASES -->
72 <!-- BOOLEAN SEARCH OPTIONS -->
73 <fieldset id="searchterms">
74 <legend>Search for </legend>
75 [% FOREACH search_box IN search_boxes_loop %]
76 [% IF ( search_boxes_label ) %]<div style="text-indent: 4.5em;">[% ELSE %]<div>[% END %]
77 [% IF ( expanded_options ) %]
78 [% IF ( search_box.boolean ) %]
80 <option value="and" selected="selected">and</option>
81 <option value="or">or</option>
82 <option value="not">not</option>
86 [% INCLUDE 'search_indexes.inc' %]
87 <input type="text" size="30" name="q" title="Enter search terms" value="" />
88 [% IF ( expanded_options ) %]
89 [% IF ( search_box.add_field ) %]
90 <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
92 [% IF ( search_box.scan_index ) %]
93 <label for="scan">Scan indexes:</label> <input type="checkbox" name="scan" id="scan" value="1" />
99 <!-- /BOOLEAN SEARCH OPTIONS -->
102 <!-- MC-TYPE LIMITS -->
103 <div id="advsearches" class="toptabs">
105 [% FOREACH advsearchloo IN advancedsearchesloop %]
106 <li id="advsearch-tab-[% advsearchloo.advanced_search_type | html %]">
107 <a href="#advsearch-[% advsearchloo.advanced_search_type | uri %]">
108 [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]Item type
109 [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]Collection
110 [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]Shelving location
111 [% ELSE %]Something else
117 [% FOREACH advsearchloo IN advancedsearchesloop %]
118 <div id="advsearch-[% advsearchloo.advanced_search_type | html %]" class="advsearch">
119 <h4>Limit to any of the following:</h4>
122 [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
123 <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 ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img src="[% itemtypeloo.imageurl | html %]" alt="[% itemtypeloo.description | html %]" />[% END %] [% END %]
124 [% itemtypeloo.description | html %]</label></td>
125 [% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
130 <!-- /MC-TYPE LIMIT -->
131 [% IF ( expanded_options ) %]
132 <!-- BASIC LIMITS -->
133 <fieldset id="basiclimits">
134 <legend>Limits</legend>
135 <fieldset id="pubrange">
136 <!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options -->
137 <p><label for="limit-yr">Year: </label>
138 <input type="text" size="15" name="limit-yr" id="limit-yr" value=""/> (format: yyyy-yyyy)</p>
139 <!-- /PUB / COPY YEAR LIMIT -->
141 <fieldset id="language">
142 <!-- LANGUAGE LIMIT -->
143 <p><label for="language-limit">Language: </label>
144 <select name="limit" id="language-limit">
145 <option value="">No limit</option>
146 [% FOREACH search_languages_loo IN search_languages_loop %]
147 [% IF ( search_languages_loo.selected ) %]
148 <option value="ln,rtrn:[% search_languages_loo.iso639_2_code | html %]" selected="selected">[% search_languages_loo.language_description | html %]</option>
150 <option value="ln,rtrn:[% search_languages_loo.iso639_2_code | html %]">[% search_languages_loo.language_description | html %]</option>
154 </select></p><!-- <a href="">Show all languages</a>-->
155 <!-- /LANGUAGE LIMIT -->
158 <!-- /BASIC LIMITS -->
163 [% INCLUDE 'subtypes_unimarc.inc' %]
165 <!-- SUBTYPE LIMITS -->
166 <fieldset id="subtype">
167 <legend>Subtype limits</legend><p>
169 <select name="limit" class="subtype">
170 <option value="" selected="selected" class="menuheader">Any audience</option>
171 <option value="aud:a">Preschool</option>
172 <option value="aud:b">Primary</option>
173 <option value="aud:c">Pre-adolescent</option>
174 <option value="aud:d">Adolescent</option>
175 <option value="aud:e">Adult</option>
176 <option value="aud:f">Specialized</option>
177 <option value="aud:g">General</option>
178 <option value="aud:j">Juvenile</option>
181 <select name="limit" class="subtype">
182 <option value="" selected="selected" class="menuheader">Any content</option>
183 <option value="fic:1" >Fiction</option>
184 <option value="fic:0" >Non-fiction</option>
185 <option value="bio:b" >Biography</option>
186 <option value="mus:j" >Musical recording</option>
187 <option value="mus:i" >Non-musical recording</option>
191 <select name="limit" class="subtype">
192 <option value="" selected="selected" class="menuheader">Any format</option>
193 <option value="l-format:ta" >Regular print</option>
194 <option value="l-format:tb" >Large print</option>
195 <option value="l-format:fk" >Braille</option>
196 <option value="" >-----------</option>
197 <option value="l-format:sd" >CD audio</option>
198 <option value="l-format:ss" >Cassette recording</option>
199 <option value="l-format:vf" >VHS tape / Videocassette</option>
200 <option value="l-format:vd" >DVD video / Videodisc</option>
201 <option value="l-format:co" >CD software</option>
202 <option value="l-format:cr" >Website</option>
205 <select name="limit" class="subtype">
206 <option value="" >Additional content types</option>
207 <option value="ctype:a" >Abstracts / Summaries</option>
208 <option value="ctype:b" >Bibliographies</option>
209 <option value="ctype:c" >Catalogs</option>
210 <option value="ctype:d" >Dictionaries</option>
211 <option value="ctype:e" >Encyclopedias </option>
212 <option value="ctype:f" >Handbooks</option>
213 <option value="ctype:g" >Legal articles</option>
214 <option value="ctype:i" >Indexes</option>
215 <option value="ctype:j" >Patent document</option>
216 <option value="ctype:k" >Discographies</option>
217 <option value="ctype:l" >Legislation</option>
218 <option value="ctype:m" >Theses</option>
219 <option value="ctype:n" >Surveys</option>
220 <option value="ctype:o" >Reviews</option>
221 <option value="ctype:p" >Programmed texts</option>
222 <option value="ctype:q" >Filmographies</option>
223 <option value="ctype:r" >Directories</option>
224 <option value="ctype:s" >Statistics</option>
225 <option value="ctype:t" >Technical reports</option>
226 <option value="ctype:v" >Legal cases and case notes</option>
227 <option value="ctype:w" >Law reports and digests</option>
228 <option value="ctype:z" >Treaties </option>
235 <!-- AVAILABILITY LIMITS -->
236 <fieldset id="availability"><legend>Location and availability</legend>
237 <fieldset id="currently-avail">
238 <p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p>
241 <fieldset id="select-libs">
242 <p><label for="branchloop">Individual libraries:</label><select name="limit" id="branchloop">
243 <option value="">All libraries</option>
244 [%# FIXME Should not we filter the libraries displayed? %]
245 [% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( selected => selected_branchcode, unfiltered => 1 ) %]
247 <!-- <input type="hidden" name="limit" value="branch: MAIN" /> -->
248 [% IF search_groups %]
249 <p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
252 <label for="categoryloop">Groups of libraries: </label>
253 <select name="multibranchlimit" id="categoryloop">
254 <option value=""> -- none -- </option>
255 [% FOREACH sg IN search_groups %]
256 [% UNLESS sg.branchcode %]
257 <option value="[% sg.id | html %]">[% sg.title | html %]</option>
265 <!-- /AVAILABILITY LIMITS -->
268 <fieldset id="sortby"><legend>Sorting</legend>
270 <label for="sort_by">Sort by: </label><select id="sort_by" name="sort_by">
271 [% INCLUDE 'resort_form.inc' %]
276 <!-- /RANK LIMITS -->
281 [% MACRO jsinclude BLOCK %]
282 [% Asset.js("lib/hc-sticky.js") | $raw %]
283 <script type="text/JavaScript">
285 * Function add_field();
286 * This function allows to display a new field to search.
288 function add_field() {
289 var ButtonPlus = document.getElementById("ButtonPlus");
290 var line = ButtonPlus.parentNode;
291 var dad = line.parentNode;
292 dad.appendChild(line.cloneNode(true));
293 line.removeChild(ButtonPlus);
296 $(document).ready(function() {
297 $("input[name=q]:eq(0)").focus();
298 $('#advsearches').tabs();
299 Sticky = $("#toolbar");
302 stickyClass: "floating"
304 $("#branchloop").on("change",function(){
305 if( this.value != ""){
306 document.getElementById("categoryloop").disabled=true;
308 document.getElementById("categoryloop").disabled=false;
315 [% INCLUDE 'intranet-bottom.inc' %]