Fix for Bug 2018 ("Incorrect focus")
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / advsearch.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Catalogue &rsaquo; Advanced Search</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/JavaScript" language="JavaScript">
5         /**
6          *  Function add_field();
7          *  This function allows to display a new field to search.
8          */
9         function add_field() {
10             var ButtonPlus = document.getElementById("ButtonPlus");
11                 var line = ButtonPlus.parentNode;
12                 var dad  = line.parentNode;
13                 dad.appendChild(line.cloneNode(true));
14                 line.removeChild(ButtonPlus);
15         }
16         $(document).ready(function() {
17                 $("input[@name='q']:eq(0)").focus();
18         });
19 </script>
20 </head>
21 <body>
22
23 <!-- TMPL_INCLUDE NAME="header.inc" -->
24
25 <div id="doc" class="yui-t7">
26    <div id="bd">
27         
28 <form action="search.pl" method="get">
29 <div id="advanced-search">
30 <h1>Advanced Search</h1>
31
32 <!-- TMPL_IF NAME="outer_servers_loop" -->
33 <!-- DATABASES -->
34
35 <fieldset>
36         <legend>Select local databases</legend>
37                 <!-- TMPL_LOOP NAME="local_servers_loop" -->
38 <!-- TMPL_IF NAME="checked" --><input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" checked="checked" value="<!-- TMPL_VAR NAME="value" -->" /><!-- TMPL_ELSE --><input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="value" -->" /><!-- /TMPL_IF --><label for="<!-- TMPL_VAR NAME="id" -->"><img width="16" height="16" alt="<!-- TMPL_VAR NAME="id" -->" src="<!-- TMPL_VAR NAME="themelang" -->/img/<!-- TMPL_VAR NAME="icon" -->" /> <!-- TMPL_VAR NAME="label" --></label><!-- /TMPL_LOOP -->
39 </fieldset>
40 <!-- /DATABASES -->
41 <!-- /TMPL_IF -->
42
43 <!-- TMPL_IF NAME="outer_servers_loop" -->
44 <!-- REMOTE DATABASES -->
45 <fieldset>
46     <legend>Select remote databases:</legend>
47                 <!-- TMPL_LOOP NAME="outer_servers_loop" -->
48                 <!-- TMPL_IF NAME="checked" --><input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" checked="checked" value="<!-- TMPL_VAR NAME="value" -->" /><!-- TMPL_ELSE --><input type="checkbox" id="<!-- TMPL_VAR NAME="id" -->" name="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="value" -->" /><!-- /TMPL_IF -->
49 <label for="<!-- TMPL_VAR NAME="id" -->"><img alt="<!-- TMPL_VAR NAME="id" -->" src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="icon" -->" /><!-- TMPL_VAR NAME="label" --></label>
50                 <!-- /TMPL_LOOP -->
51     </fieldset>
52 <!-- /REMOTE DATABASES -->
53 <!-- /TMPL_IF -->
54
55 <!-- BOOLEAN SEARCH OPTIONS -->
56     <fieldset>
57     <legend>Search For: </legend>
58     <!-- TMPL_LOOP NAME="search_boxes_loop" -->
59         <!-- TMPL_IF NAME="search_boxes_label" --><div style="text-indent: 4.5em;"><!-- TMPL_ELSE --><div><!-- /TMPL_IF -->
60                         <!-- TMPL_IF NAME="expanded_options" -->
61             <!-- TMPL_IF NAME="boolean" -->
62                 <select name="op">
63                     <option value="and" selected="selected">and</option>
64                     <option value="or">or</option>
65                     <option value="not">not</option>
66                 </select>
67             <!-- /TMPL_IF --> 
68                         <!-- /TMPL_IF -->
69                         <!-- TMPL_INCLUDE NAME="search_indexes.inc" -->
70                         <input type="text" size="30" name="q" title="Enter search terms" value="" />
71             <!-- TMPL_IF NAME="expanded_options" -->
72                 <!-- TMPL_IF NAME="add_field" -->
73                     <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
74                                 <!-- /TMPL_IF -->
75                 <!-- TMPL_IF NAME="scan_index" -->
76                         <label for="scan">Scan Indexes</label><input type="checkbox" name="scan" id="scan" value="1" />
77                 <!-- /TMPL_IF -->
78             <!-- /TMPL_IF -->
79                 </div>
80     <!-- /TMPL_LOOP -->
81     </fieldset>
82 <!-- /BOOLEAN SEARCH OPTIONS -->
83
84 <!-- ITEMTYPE LIMITS -->
85     <div id="itemtypelist">
86         <fieldset>
87      <legend>Limit type to: match any of the following:</legend>
88     <table>
89         <tr>
90       <!--TMPL_LOOP Name="itemtypeloop"-->
91         <td>
92         <!-- TMPL_IF name="imageurl"--><img border="0" src="<!--TMPL_VAR Name="imageurl" -->" alt="<!--TMPL_VAR Name="description" -->" /><!-- /TMPL_IF -->
93                 <input type="checkbox" id="mc-<!--TMPL_VAR Name="number" -->" name="limit" value="mc:<!--TMPL_VAR Name="code" -->" />&nbsp;
94         <label for="mc-<!--TMPL_VAR Name="number" -->"><!--TMPL_VAR Name="description" --></label></td>
95         <!-- TMPL_UNLESS name="count5" --></tr><tr><!-- /TMPL_UNLESS -->
96       <!--/TMPL_LOOP-->
97           <!-- FIXME: for validation, avoid generating empty row -->
98       </tr>
99     </table>
100         </fieldset>
101     </div>
102 <!-- /ITEMTYPE LIMITS -->
103
104 <!-- TMPL_IF NAME="expanded_options" -->
105 <!-- BASIC LIMITS -->
106  <fieldset>
107         <legend>Limits:</legend>
108 <!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options -->
109         <p><label for="limit-yr">Year: </label>
110                 <input size="15" name="limit-yr" id="" value=""/>&nbsp;&nbsp;(format: yyyy-yyyy)</p>
111 <!-- /PUB / COPY YEAR LIMIT -->
112
113 <!-- LANGUAGE LIMIT -->
114                 <p><label for="language-limit">Language: </label>                                        
115                 <select name="limit">
116                 <option value="">No Limit</option>
117                 <!-- TMPL_LOOP NAME="search_languages_loop" -->
118                 <!-- TMPL_IF NAME="selected" -->
119                 <option value="ln:<!-- TMPL_VAR NAME="iso639_2_code" -->" selected="selected"><!-- TMPL_VAR NAME="language_description" --></option>
120                 <!-- TMPL_ELSE -->
121                 <option value="ln:<!-- TMPL_VAR NAME="iso639_2_code" -->"><!-- TMPL_VAR NAME="language_description" --></option>
122                 <!-- /TMPL_IF -->
123                 
124                 <!-- /TMPL_LOOP -->
125                 </select></p><!-- <a href="">Show all languages</a>-->
126 <!-- /LANGUAGE LIMIT -->
127 </fieldset>
128 <!-- /BASIC LIMITS -->
129 <!-- /TMPL_IF -->
130
131
132 <!-- TMPL_IF NAME="UNIMARC" -->
133 <!-- TMPL_INCLUDE NAME="subtypes_unimarc.inc" -->
134 <!-- TMPL_ELSE -->
135 <!-- SUBTYPE LIMITS -->
136         <fieldset>
137         <legend>Subtype limits:</legend><p>
138         
139         <select name="limit" class="subtype">
140             <option value="" selected="selected" class="menuheader">Any audience</option>
141             <option value="aud:a" >Easy</option>
142             <option value="aud:c" >Juvenile</option>
143             <option value="aud:d" >Young adult</option>
144             <option value="aud:e" >Adult</option>
145         </select>
146         
147         <select name="limit" class="subtype">
148             <option value="" selected="selected" class="menuheader">Any content</option>
149             <option value="fic:1" >Fiction</option>
150             <option value="fic:0" >Non fiction</option>
151             <option value="bio:b" >Biography</option>
152             <option value="mus:j" >Musical recording</option>
153             <option value="mus:i" >Non-musical recording</option>
154         </select>
155
156         
157         <select name="limit" class="subtype">
158             <option value="" selected="selected" class="menuheader">Any format</option>
159             <option value="l-format:ta" >Regular print</option>
160             <option value="l-format:tb" >Large print</option>
161             <option value="l-format:fk" >Braille</option>
162             <option value="" >-----------</option>
163             <option value="l-format:sd" >CD audio</option>
164             <option value="l-format:ss" >Cassette recording</option>
165             <option value="l-format:vf" >VHS tape / Videocassette</option>
166             <option value="l-format:vd" >DVD video / Videodisc</option>
167             <option value="l-format:co" >CD Software</option>
168             <option value="l-format:cr" >Website</option>
169         </select>
170         
171         <select name="limit" class="subtype">
172             <option value="" >Additional content types</option>
173             <option value="ctype:a" >Abstracts/summaries</option>
174             <option value="ctype:b" >Bibliographies</option>
175             <option value="ctype:c" >Catalogs</option>
176             <option value="ctype:d" >Dictionaries</option>
177             <option value="ctype:e" >Encyclopedias </option>
178             <option value="ctype:f" >Handbooks</option>
179             <option value="ctype:g" >Legal articles</option>
180             <option value="ctype:i" >Indexes</option>
181             <option value="ctype:j" >Patent document</option>
182             <option value="ctype:k" >Discographies</option>
183             <option value="ctype:l" >Legislation</option>
184             <option value="ctype:m" >Theses</option>
185             <option value="ctype:n" >Surveys</option>
186             <option value="ctype:o" >Reviews</option>
187             <option value="ctype:p" >Programmed texts</option>
188             <option value="ctype:q" >Filmographies</option>
189             <option value="ctype:r" >Directories</option>
190             <option value="ctype:s" >Statistics</option>
191             <option value="ctype:t" >Technical reports</option>
192             <option value="ctype:v" >Legal cases and case notes</option>
193             <option value="ctype:w" >Law reports and digests</option>
194             <option value="ctype:z" >Treaties </option>
195         </select>
196        </p>
197
198 </fieldset>
199 <!-- /TMPL_IF -->
200
201 <!-- TMPL_IF NAME="template-defined-limits" -->
202 <!-- TYPE LIMITS -->
203     <fieldset>
204
205     <legend>Limit type to: match any of the following</legend>
206     <table class="itemtypes">
207             <tr>
208             <td><input type="checkbox" id="mc-bks" name="limit" value="mc:t" />
209                         <label for="mc-bks" title="Books, Pamphlets, Technical reports, Manuscripts, Legal papers, Theses and dissertations">
210                         <img border="0" src="/intranet-tmpl/prog/img/AF.gif" alt="Books" />Books</label></td>
211                         <td><input type="checkbox" id="mc-vis" name="limit" value="mc:v" />
212                         <label for="mc-vis" title="Motion pictures, Videorecordings, Filmstrips, Slides, Transparencies, Photos, Cards, Charts, Drawings">
213                         <img border="0" src="/intranet-tmpl/prog/en/images/AV Aids.gif" alt="Visual Materials" />Visual Materials</label></td>
214             <td><input type="checkbox" id="mc-sr" name="limit" value="mc-rtype:i" />
215                         <label for="mc-sr" title="Spoken, Books on CD and Cassette">
216                         <img border="0" src="/intranet-tmpl/prog/en/images/AF.gif" alt="Books on Tape" />Books on Tape</label></td>
217             </tr>
218
219             <tr>
220             <td><input type="checkbox" id="mc-cf" name="limit" value="mc:c" />
221                         <label for="mc-cf" title="Computer files, Data, Software">
222                         <img border="0" src="/intranet-tmpl/prog/en/images/CD-ROM software.gif" alt="Computer Files" />Computer Files</label></td>
223             <td><input type="checkbox" id="mc-lh" name="limit" value="mc-collection:LH" />
224                         <label for="mc-lh" title="Local History Materials">
225                         <img border="0" src="/intranet-tmpl/prog/en/images/Local history.gif" alt="Local History Materials" />Local History Materials</label></td>
226             <td><input type="checkbox" id="mc-map" name="limit" value="mc:a" />
227                         <label for="mc-map" title="Maps, Globes">
228                         <img border="0" src="/intranet-tmpl/prog/en/images/PF.gif " alt="Maps" />Maps</label></td>
229             </tr>
230
231             <tr>
232             <td><input type="checkbox" id="mc-mus" name="limit" value="mc-rtype:j" />
233                         <label for="mc-mus" title="Music">
234                         <img border="0" src="/intranet-tmpl/prog/en/images/CDM.gif" alt="Music" />Music</label></td>
235             <td><input type="checkbox" id="mc-kit" name="limit" value="mc-rtype:o" />
236                         <label for="mc-kit" title="Kits"><img border="0" src="/intranet-tmpl/prog/en/images/KIT.gif" alt="Kits" />Kits</label></td>
237             <td><input type="checkbox" id="mc-ref" name="limit" value="mc-collection:REF" />
238                         <label for="mc-ref" title="Reference">
239                         <img border="0" src="/intranet-tmpl/prog/en/images/REF.gif" alt="Reference" />Reference</label></td>
240             </tr>
241             
242             </table>
243 </fieldset>
244 <!-- /TMPL_IF -->
245 <!-- /TYPE LIMITS -->
246
247 <!-- AVAILABILITY LIMITS -->
248     <fieldset><legend>Location and availability: </legend>
249         <p>
250         <label for="available-items">Only items currently available</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p>
251         <p>
252         <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;}'>
253         <option value="">All Libraries</option>
254         <!-- TMPL_LOOP NAME="branchloop" -->
255         <option value="branch:<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
256         <!-- /TMPL_LOOP -->
257         </select>
258     <!-- <input type="hidden" name="limit" value="branch: MAIN" /> -->
259         </p>
260         <!-- TMPL_IF NAME="searchdomainloop" -->
261     <p>OR<p> <!-- should addjs to grey out group pulldown if a library is selected. -->
262     <p>
263         <label for="categoryloop">Groups of Libraries</label><select name="multibranchlimit" id="categoryloop">
264         <option value=""> -- none -- </option>
265         <!-- TMPL_LOOP NAME="searchdomainloop" -->
266         <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="categoryname" --></option>
267         <!-- /TMPL_LOOP -->
268         </select>
269         </p>
270     <!-- /TMPL_IF -->
271     </fieldset>
272 <!-- /AVAILABILITY LIMITS -->
273
274 <!-- RANK LIMITS -->
275
276 <fieldset><legend>Sort by: </legend>
277     <p><select id="sort_by" name="sort_by">
278   <!-- TMPL_INCLUDE NAME="resort_form.inc" -->
279     </select>
280         </p>
281 </fieldset>
282 <!-- RANK LIMITS -->
283
284 </div>
285
286
287 <!-- SEARCH BUTTONS -->
288             <p><input class="submit" type="submit" accesskey="s" value="Search" />
289             <!-- TMPL_IF NAME="expanded_options" -->
290             <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=0">[Fewer Options]</a>
291             <!-- TMPL_ELSE -->
292             <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=1">[More options]</a>
293             <!-- /TMPL_IF -->
294             <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear">[New search]</a> 
295             </p>
296 <!-- /SEARCH BUTTONS -->
297 </form>
298 </div>
299
300 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->