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>
36 <a href="/cgi-bin/koha/catalogue/itemsearch.pl">Go to item search</a>
38 <!-- SEARCH BUTTONS -->
39 <div id="toolbar" class="btn-toolbar">
40 <fieldset class="action" id="submit1">
41 <div class="btn-group">
42 <button class="btn btn-small" type="submit" accesskey="s"><i class="fa fa-search"></i> Search</button>
44 <div class="btn-group">
45 [% IF ( expanded_options ) %]
46 <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=0" class="btn-small"><i class="fa fa-search-minus"></i> Fewer options</a>
49 <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=1" class="btn-small"><i class="fa fa-search-plus"></i> More options</a>
52 <div class="btn-group">
53 <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear&expanded_options=[% expanded_options %]" class="btn-small"><i class="fa fa-trash"></i> Clear fields</a>
57 <!-- /SEARCH BUTTONS -->
60 [% IF ( outer_servers_loop ) %]
64 <legend>Select local databases</legend>
65 [% FOREACH local_servers_loo IN local_servers_loop %]
66 [% 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 %]
71 [% IF ( outer_servers_loop ) %]
72 <!-- REMOTE DATABASES -->
73 <fieldset id="databases">
74 <legend>Select remote databases</legend>
75 [% FOREACH outer_servers_loo IN outer_servers_loop %]
76 [% 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 %]
77 <label for="[% outer_servers_loo.id %]"><img alt="[% outer_servers_loo.id %]" src="[% themelang %]/images/[% outer_servers_loo.icon %]" />[% outer_servers_loo.label %]</label>
80 <!-- /REMOTE DATABASES -->
83 <!-- BOOLEAN SEARCH OPTIONS -->
84 <fieldset id="searchterms">
85 <legend>Search for </legend>
86 [% FOREACH search_box IN search_boxes_loop %]
87 [% IF ( search_boxes_label ) %]<div style="text-indent: 4.5em;">[% ELSE %]<div>[% END %]
88 [% IF ( expanded_options ) %]
89 [% IF ( search_box.boolean ) %]
91 <option value="and" selected="selected">and</option>
92 <option value="or">or</option>
93 <option value="not">not</option>
97 [% INCLUDE 'search_indexes.inc' %]
98 <input type="text" size="30" name="q" title="Enter search terms" value="" />
99 [% IF ( expanded_options ) %]
100 [% IF ( search_box.add_field ) %]
101 <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
103 [% IF ( search_box.scan_index ) %]
104 <label for="scan">Scan indexes:</label> <input type="checkbox" name="scan" id="scan" value="1" />
110 <!-- /BOOLEAN SEARCH OPTIONS -->
113 <!-- MC-TYPE LIMITS -->
115 <div id="advsearches" class="toptabs">
117 [% FOREACH advsearchloo IN advancedsearchesloop %]
118 <li id="advsearch-tab-[% advsearchloo.advanced_search_type %]">
119 <a href="#advsearch-[% advsearchloo.advanced_search_type %]">
120 [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]Item type
121 [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]Collection
122 [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]Shelving location
123 [% ELSE %]Something else
129 [% FOREACH advsearchloo IN advancedsearchesloop %]
130 <div id="advsearch-[% advsearchloo.advanced_search_type %]" class="advsearch">
131 <h4>Limit to any of the following:</h4>
134 [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
135 <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 %]
136 [% itemtypeloo.description %]</label></td>
137 [% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
142 <!-- /MC-TYPE LIMIT -->
143 [% IF ( expanded_options ) %]
144 <!-- BASIC LIMITS -->
145 <fieldset id="basiclimits">
146 <legend>Limits</legend>
147 <fieldset id="pubrange">
148 <!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options -->
149 <p><label for="limit-yr">Year: </label>
150 <input type="text" size="15" name="limit-yr" id="limit-yr" value=""/> (format: yyyy-yyyy)</p>
151 <!-- /PUB / COPY YEAR LIMIT -->
153 <fieldset id="language">
154 <!-- LANGUAGE LIMIT -->
155 <p><label for="language-limit">Language: </label>
156 <select name="limit" id="language-limit">
157 <option value="">No limit</option>
158 [% FOREACH search_languages_loo IN search_languages_loop %]
159 [% IF ( search_languages_loo.selected ) %]
160 <option value="ln,rtrn:[% search_languages_loo.iso639_2_code %]" selected="selected">[% search_languages_loo.language_description %]</option>
162 <option value="ln,rtrn:[% search_languages_loo.iso639_2_code %]">[% search_languages_loo.language_description %]</option>
166 </select></p><!-- <a href="">Show all languages</a>-->
167 <!-- /LANGUAGE LIMIT -->
170 <!-- /BASIC LIMITS -->
175 [% INCLUDE 'subtypes_unimarc.inc' %]
177 <!-- SUBTYPE LIMITS -->
178 <fieldset id="subtype">
179 <legend>Subtype limits</legend><p>
181 <select name="limit" class="subtype">
182 <option value="" selected="selected" class="menuheader">Any audience</option>
183 <option value="aud:a">Preschool</option>
184 <option value="aud:b">Primary</option>
185 <option value="aud:c">Pre-adolescent</option>
186 <option value="aud:d">Adolescent</option>
187 <option value="aud:e">Adult</option>
188 <option value="aud:f">Specialized</option>
189 <option value="aud:g">General</option>
190 <option value="aud:j">Juvenile</option>
193 <select name="limit" class="subtype">
194 <option value="" selected="selected" class="menuheader">Any content</option>
195 <option value="fic:1" >Fiction</option>
196 <option value="fic:0" >Non-fiction</option>
197 <option value="bio:b" >Biography</option>
198 <option value="mus:j" >Musical recording</option>
199 <option value="mus:i" >Non-musical recording</option>
203 <select name="limit" class="subtype">
204 <option value="" selected="selected" class="menuheader">Any format</option>
205 <option value="l-format:ta" >Regular print</option>
206 <option value="l-format:tb" >Large print</option>
207 <option value="l-format:fk" >Braille</option>
208 <option value="" >-----------</option>
209 <option value="l-format:sd" >CD audio</option>
210 <option value="l-format:ss" >Cassette recording</option>
211 <option value="l-format:vf" >VHS tape / Videocassette</option>
212 <option value="l-format:vd" >DVD video / Videodisc</option>
213 <option value="l-format:co" >CD software</option>
214 <option value="l-format:cr" >Website</option>
217 <select name="limit" class="subtype">
218 <option value="" >Additional content types</option>
219 <option value="ctype:a" >Abstracts / Summaries</option>
220 <option value="ctype:b" >Bibliographies</option>
221 <option value="ctype:c" >Catalogs</option>
222 <option value="ctype:d" >Dictionaries</option>
223 <option value="ctype:e" >Encyclopedias </option>
224 <option value="ctype:f" >Handbooks</option>
225 <option value="ctype:g" >Legal articles</option>
226 <option value="ctype:i" >Indexes</option>
227 <option value="ctype:j" >Patent document</option>
228 <option value="ctype:k" >Discographies</option>
229 <option value="ctype:l" >Legislation</option>
230 <option value="ctype:m" >Theses</option>
231 <option value="ctype:n" >Surveys</option>
232 <option value="ctype:o" >Reviews</option>
233 <option value="ctype:p" >Programmed texts</option>
234 <option value="ctype:q" >Filmographies</option>
235 <option value="ctype:r" >Directories</option>
236 <option value="ctype:s" >Statistics</option>
237 <option value="ctype:t" >Technical reports</option>
238 <option value="ctype:v" >Legal cases and case notes</option>
239 <option value="ctype:w" >Law reports and digests</option>
240 <option value="ctype:z" >Treaties </option>
247 <!-- AVAILABILITY LIMITS -->
248 <fieldset id="availability"><legend>Location and availability</legend>
249 <fieldset id="currently-avail">
250 <p><label for="available-items">Only items currently available:</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p>
253 <fieldset id="select-libs">
254 <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;}'>
255 <option value="">All libraries</option>
256 [%# FIXME Should not we filter the libraries displayed? %]
257 [% PROCESS options_for_libraries prefix => "branch:" libraries => Branches.all( selected => selected_branchcode, unfiltered => 1 ) %]
259 <!-- <input type="hidden" name="limit" value="branch: MAIN" /> -->
260 [% IF ( searchdomainloop ) %]
261 <p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
262 <p><label for="categoryloop">Groups of libraries: </label><select name="multibranchlimit" id="categoryloop">
263 <option value=""> -- none -- </option>
264 [% FOREACH searchdomainloo IN searchdomainloop %]
265 <option value="[% searchdomainloo.categorycode %]">[% searchdomainloo.categoryname %]</option>
271 <!-- /AVAILABILITY LIMITS -->
274 <fieldset id="sortby"><legend>Sorting</legend>
276 <label for="sort_by">Sort by: </label><select id="sort_by" name="sort_by">
277 [% INCLUDE 'resort_form.inc' %]
281 <!-- /RANK LIMITS -->
287 [% INCLUDE 'intranet-bottom.inc' %]