2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Catalog › Advanced search</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
6 <script type="text/JavaScript" language="JavaScript">
8 * Function add_field();
9 * This function allows to display a new field to search.
11 function add_field() {
12 var ButtonPlus = document.getElementById("ButtonPlus");
13 var line = ButtonPlus.parentNode;
14 var dad = line.parentNode;
15 dad.appendChild(line.cloneNode(true));
16 line.removeChild(ButtonPlus);
18 $(document).ready(function() {
19 $("input[name=q]:eq(0)").focus();
20 $('#advsearches').tabs();
21 $('#toolbar').fixFloat();
25 <body id="catalog_advsearch" class="catalog">
26 [% INCLUDE 'header.inc' %]
27 [% INCLUDE 'adv-search.inc' %]
28 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › Advanced search</div>
30 <div id="doc" class="yui-t7">
33 <form action="search.pl" method="get">
34 <div id="advanced-search">
35 <h1>Advanced search</h1>
37 <a href="/cgi-bin/koha/catalogue/itemsearch.pl">Go to item search</a>
40 <!-- SEARCH BUTTONS -->
41 <div id="toolbar" class="btn-toolbar">
42 <fieldset class="action" id="submit1">
43 <div class="btn-group">
44 <button class="btn btn-default btn-sm" type="submit" accesskey="s"><i class="fa fa-search"></i> Search</button>
46 <div class="btn-group">
47 [% IF ( expanded_options ) %]
48 <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>
51 <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>
54 <div class="btn-group">
55 <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear&expanded_options=[% expanded_options %]" class="btn btn-sm btn-link"><i class="fa fa-trash"></i> Clear fields</a>
59 <!-- /SEARCH BUTTONS -->
62 [% IF ( outer_servers_loop ) %]
66 <legend>Select local databases</legend>
67 [% FOREACH local_servers_loo IN local_servers_loop %]
68 [% IF ( local_servers_loo.checked ) %]<input type="checkbox" id="[% local_servers_loo.id %]" name="[% local_servers_loo.name %]" checked="checked" value="[% local_servers_loo.value %]" />[% ELSE %]<input type="checkbox" id="[% local_servers_loo.id %]" name="[% local_servers_loo.name %]" value="[% local_servers_loo.value %]" />[% END %]<label for="[% local_servers_loo.id %]"><img width="16" height="16" alt="[% local_servers_loo.id %]" src="[% themelang %]/img/[% local_servers_loo.icon %]" /> [% local_servers_loo.label %]</label>[% END %]
73 [% IF ( outer_servers_loop ) %]
74 <!-- REMOTE DATABASES -->
75 <fieldset id="databases">
76 <legend>Select remote databases</legend>
77 [% FOREACH outer_servers_loo IN outer_servers_loop %]
78 [% IF ( outer_servers_loo.checked ) %]<input type="checkbox" id="[% outer_servers_loo.id %]" name="[% outer_servers_loo.name %]" checked="checked" value="[% outer_servers_loo.value %]" />[% ELSE %]<input type="checkbox" id="[% outer_servers_loo.id %]" name="[% outer_servers_loo.name %]" value="[% outer_servers_loo.value %]" />[% END %]
79 <label for="[% outer_servers_loo.id %]"><img alt="[% outer_servers_loo.id %]" src="[% themelang %]/images/[% outer_servers_loo.icon %]" />[% outer_servers_loo.label %]</label>
82 <!-- /REMOTE DATABASES -->
85 <!-- BOOLEAN SEARCH OPTIONS -->
86 <fieldset id="searchterms">
87 <legend>Search for </legend>
88 [% FOREACH search_box IN search_boxes_loop %]
89 [% IF ( search_boxes_label ) %]<div style="text-indent: 4.5em;">[% ELSE %]<div>[% END %]
90 [% IF ( expanded_options ) %]
91 [% IF ( search_box.boolean ) %]
93 <option value="and" selected="selected">and</option>
94 <option value="or">or</option>
95 <option value="not">not</option>
99 [% INCLUDE 'search_indexes.inc' %]
100 <input type="text" size="30" name="q" title="Enter search terms" value="" />
101 [% IF ( expanded_options ) %]
102 [% IF ( search_box.add_field ) %]
103 <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
105 [% IF ( search_box.scan_index ) %]
106 <label for="scan">Scan indexes:</label> <input type="checkbox" name="scan" id="scan" value="1" />
112 <!-- /BOOLEAN SEARCH OPTIONS -->
115 <!-- MC-TYPE LIMITS -->
117 <div id="advsearches" class="toptabs">
119 [% FOREACH advsearchloo IN advancedsearchesloop %]
120 <li id="advsearch-tab-[% advsearchloo.advanced_search_type %]">
121 <a href="#advsearch-[% advsearchloo.advanced_search_type %]">
122 [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]Item type
123 [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]Collection
124 [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]Shelving location
125 [% ELSE %]Something else
131 [% FOREACH advsearchloo IN advancedsearchesloop %]
132 <div id="advsearch-[% advsearchloo.advanced_search_type %]" class="advsearch">
133 <h4>Limit to any of the following:</h4>
136 [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
137 <td><input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %] [% END %]
138 [% itemtypeloo.description %]</label></td>
139 [% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
144 <!-- /MC-TYPE LIMIT -->
145 [% IF ( expanded_options ) %]
146 <!-- BASIC LIMITS -->
147 <fieldset id="basiclimits">
148 <legend>Limits</legend>
149 <fieldset id="pubrange">
150 <!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options -->
151 <p><label for="limit-yr">Year: </label>
152 <input type="text" size="15" name="limit-yr" id="limit-yr" value=""/> (format: yyyy-yyyy)</p>
153 <!-- /PUB / COPY YEAR LIMIT -->
155 <fieldset id="language">
156 <!-- LANGUAGE LIMIT -->
157 <p><label for="language-limit">Language: </label>
158 <select name="limit" id="language-limit">
159 <option value="">No limit</option>
160 [% FOREACH search_languages_loo IN search_languages_loop %]
161 [% IF ( search_languages_loo.selected ) %]
162 <option value="ln,rtrn:[% search_languages_loo.iso639_2_code %]" selected="selected">[% search_languages_loo.language_description %]</option>
164 <option value="ln,rtrn:[% search_languages_loo.iso639_2_code %]">[% search_languages_loo.language_description %]</option>
168 </select></p><!-- <a href="">Show all languages</a>-->
169 <!-- /LANGUAGE LIMIT -->
172 <!-- /BASIC LIMITS -->
177 [% INCLUDE 'subtypes_unimarc.inc' %]
179 <!-- SUBTYPE LIMITS -->
180 <fieldset id="subtype">
181 <legend>Subtype limits</legend><p>
183 <select name="limit" class="subtype">
184 <option value="" selected="selected" class="menuheader">Any audience</option>
185 <option value="aud:a">Preschool</option>
186 <option value="aud:b">Primary</option>
187 <option value="aud:c">Pre-adolescent</option>
188 <option value="aud:d">Adolescent</option>
189 <option value="aud:e">Adult</option>
190 <option value="aud:f">Specialized</option>
191 <option value="aud:g">General</option>
192 <option value="aud:j">Juvenile</option>
195 <select name="limit" class="subtype">
196 <option value="" selected="selected" class="menuheader">Any content</option>
197 <option value="fic:1" >Fiction</option>
198 <option value="fic:0" >Non-fiction</option>
199 <option value="bio:b" >Biography</option>
200 <option value="mus:j" >Musical recording</option>
201 <option value="mus:i" >Non-musical recording</option>
205 <select name="limit" class="subtype">
206 <option value="" selected="selected" class="menuheader">Any format</option>
207 <option value="l-format:ta" >Regular print</option>
208 <option value="l-format:tb" >Large print</option>
209 <option value="l-format:fk" >Braille</option>
210 <option value="" >-----------</option>
211 <option value="l-format:sd" >CD audio</option>
212 <option value="l-format:ss" >Cassette recording</option>
213 <option value="l-format:vf" >VHS tape / Videocassette</option>
214 <option value="l-format:vd" >DVD video / Videodisc</option>
215 <option value="l-format:co" >CD software</option>
216 <option value="l-format:cr" >Website</option>
219 <select name="limit" class="subtype">
220 <option value="" >Additional content types</option>
221 <option value="ctype:a" >Abstracts / Summaries</option>
222 <option value="ctype:b" >Bibliographies</option>
223 <option value="ctype:c" >Catalogs</option>
224 <option value="ctype:d" >Dictionaries</option>
225 <option value="ctype:e" >Encyclopedias </option>
226 <option value="ctype:f" >Handbooks</option>
227 <option value="ctype:g" >Legal articles</option>
228 <option value="ctype:i" >Indexes</option>
229 <option value="ctype:j" >Patent document</option>
230 <option value="ctype:k" >Discographies</option>
231 <option value="ctype:l" >Legislation</option>
232 <option value="ctype:m" >Theses</option>
233 <option value="ctype:n" >Surveys</option>
234 <option value="ctype:o" >Reviews</option>
235 <option value="ctype:p" >Programmed texts</option>
236 <option value="ctype:q" >Filmographies</option>
237 <option value="ctype:r" >Directories</option>
238 <option value="ctype:s" >Statistics</option>
239 <option value="ctype:t" >Technical reports</option>
240 <option value="ctype:v" >Legal cases and case notes</option>
241 <option value="ctype:w" >Law reports and digests</option>
242 <option value="ctype:z" >Treaties </option>
249 <!-- AVAILABILITY LIMITS -->
250 <fieldset id="availability"><legend>Location and availability</legend>
251 <fieldset id="currently-avail">
252 <p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p>
255 <fieldset id="select-libs">
256 <p><label for="branchloop">Individual libraries:</label><select name="limit" id="branchloop" onchange='if(this.value != ""){document.getElementById("categoryloop").disabled=true;} else {document.getElementById("categoryloop").disabled=false;}'>
257 <option value="">All libraries</option>
258 [%# FIXME Should not we filter the libraries displayed? %]
259 [% PROCESS options_for_libraries libraries => Branches.all( selected => selected_branchcode, unfiltered => 1 ) %]
261 <!-- <input type="hidden" name="limit" value="branch: MAIN" /> -->
262 [% IF ( searchdomainloop ) %]
263 <p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
264 <p><label for="categoryloop">Groups of libraries: </label><select name="multibranchlimit" id="categoryloop">
265 <option value=""> -- none -- </option>
266 [% FOREACH searchdomainloo IN searchdomainloop %]
267 <option value="[% searchdomainloo.categorycode %]">[% searchdomainloo.categoryname %]</option>
273 <!-- /AVAILABILITY LIMITS -->
276 <fieldset id="sortby"><legend>Sorting</legend>
278 <label for="sort_by">Sort by: </label><select id="sort_by" name="sort_by">
279 [% INCLUDE 'resort_form.inc' %]
283 <!-- /RANK LIMITS -->
289 [% INCLUDE 'intranet-bottom.inc' %]