Merge remote-tracking branch 'kc/master' into new/bug_5683
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / advsearch.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Catalog &rsaquo; Advanced Search</title>
3 [% INCLUDE '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 [% INCLUDE 'header.inc' %]
24 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; Advanced Search</div>
25
26 <div id="doc" class="yui-t7">
27    <div id="bd">
28         
29 <form action="search.pl" method="get">
30 <div id="advanced-search">
31 <h1>Advanced Search</h1>
32
33 [% IF ( outer_servers_loop ) %]
34 <!-- DATABASES -->
35
36 <fieldset>
37         <legend>Select local databases</legend>
38                 [% FOREACH local_servers_loo IN local_servers_loop %]
39 [% 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 %]
40 </fieldset>
41 <!-- /DATABASES -->
42 [% END %]
43
44 [% IF ( outer_servers_loop ) %]
45 <!-- REMOTE DATABASES -->
46 <fieldset id="databases">
47     <legend>Select remote databases</legend>
48                 [% FOREACH outer_servers_loo IN outer_servers_loop %]
49                 [% 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 %]
50 <label for="[% outer_servers_loo.id %]"><img alt="[% outer_servers_loo.id %]" src="[% themelang %]/images/[% outer_servers_loo.icon %]" />[% outer_servers_loo.label %]</label>
51                 [% END %]
52     </fieldset>
53 <!-- /REMOTE DATABASES -->
54 [% END %]
55
56 <!-- BOOLEAN SEARCH OPTIONS -->
57     <fieldset id="searchterms">
58     <legend>Search For </legend>
59     [% FOREACH search_box IN search_boxes_loop %]
60         [% IF ( search_boxes_label ) %]<div style="text-indent: 4.5em;">[% ELSE %]<div>[% END %]
61                         [% IF ( expanded_options ) %]
62             [% IF ( search_box.boolean ) %]
63                 <select name="op">
64                     <option value="and" selected="selected">and</option>
65                     <option value="or">or</option>
66                     <option value="not">not</option>
67                 </select>
68             [% END %] 
69                         [% END %]
70                         [% INCLUDE 'search_indexes.inc' %]
71                         <input type="text" size="30" name="q" title="Enter search terms" value="" />
72             [% IF ( expanded_options ) %]
73                 [% IF ( search_box.add_field ) %]
74                     <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
75                                 [% END %]
76               [% IF ( search_box.scan_index ) %]
77                 <label for="scan">Scan Indexes</label> <input type="checkbox" name="scan" id="scan" value="1" />
78               [% END %]
79             [% END %]
80                 </div>
81     [% END %]
82     </fieldset>
83 <!-- /BOOLEAN SEARCH OPTIONS -->
84
85 <!-- SEARCH BUTTONS -->
86             <fieldset class="action" id="submit1"><input class="submit" type="submit" accesskey="s" value="Search" />
87             [% IF ( expanded_options ) %]
88             <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=0">[Fewer Options]</a>
89             [% ELSE %]
90             <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=1">[More options]</a>
91             [% END %]
92             <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear">[New search]</a>
93             </fieldset>
94 <!-- /SEARCH BUTTONS -->
95
96 <!-- ITEMTYPE LIMITS -->
97         <fieldset id="itemtypelist">
98      <legend>Limit to any of the following</legend>
99     <table>
100         <tr>
101       [% FOREACH itemtypeloo IN itemtypeloop %]
102         <td>
103         [% UNLESS ( noItemTypeImages ) %]
104         [% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]
105         [% END %]
106                 <input type="checkbox" id="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]" />&nbsp;
107         <label for="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]">[% itemtypeloo.description %]</label></td>
108         [% UNLESS ( itemtypeloo.count5 ) %]</tr><tr>[% END %]
109       [% END %]
110           <!-- FIXME: for validation, avoid generating empty row -->
111       </tr>
112     </table>
113         </fieldset>
114 <!-- /ITEMTYPE LIMITS -->
115
116 [% IF ( expanded_options ) %]
117 <!-- BASIC LIMITS -->
118  <fieldset id="basiclimits">
119         <legend>Limits</legend>
120 <fieldset id="pubrange">
121 <!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options -->
122         <p><label for="limit-yr">Year: </label>
123                 <input type="text" size="15" name="limit-yr" id="limit-yr" value=""/>&nbsp;&nbsp;(format: yyyy-yyyy)</p>
124 <!-- /PUB / COPY YEAR LIMIT -->
125 </fieldset>
126 <fieldset id="language">
127 <!-- LANGUAGE LIMIT -->
128                 <p><label for="language-limit">Language: </label>                                        
129                 <select name="limit" id="language-limit">
130                 <option value="">No Limit</option>
131                 [% FOREACH search_languages_loo IN search_languages_loop %]
132                 [% IF ( search_languages_loo.selected ) %]
133                 <option value="ln,rtrn:[% search_languages_loo.iso639_2_code %]" selected="selected">[% search_languages_loo.language_description %]</option>
134                 [% ELSE %]
135                 <option value="ln,rtrn:[% search_languages_loo.iso639_2_code %]">[% search_languages_loo.language_description %]</option>
136                 [% END %]
137                 
138                 [% END %]
139                 </select></p><!-- <a href="">Show all languages</a>-->
140 <!-- /LANGUAGE LIMIT -->
141 </fieldset>
142 </fieldset>
143 <!-- /BASIC LIMITS -->
144 [% END %]
145
146
147 [% IF ( UNIMARC ) %]
148 [% INCLUDE 'subtypes_unimarc.inc' %]
149 [% ELSE %]
150 <!-- SUBTYPE LIMITS -->
151         <fieldset id="subtype">
152         <legend>Subtype limits</legend><p>
153         
154         <select name="limit" class="subtype">
155             <option value="" selected="selected" class="menuheader">Any audience</option>
156                         <option value="aud:a">Preschool</option>
157                         <option value="aud:b">Primary</option>
158                         <option value="aud:c">Pre-adolescent</option>
159                         <option value="aud:d">Adolescent</option>
160                         <option value="aud:e">Adult</option>
161                         <option value="aud:f">Specialized</option>
162                         <option value="aud:g">General</option>
163                         <option value="aud:j">Juvenile</option>
164         </select>
165         
166         <select name="limit" class="subtype">
167             <option value="" selected="selected" class="menuheader">Any content</option>
168             <option value="fic:1" >Fiction</option>
169             <option value="fic:0" >Non fiction</option>
170             <option value="bio:b" >Biography</option>
171             <option value="mus:j" >Musical recording</option>
172             <option value="mus:i" >Non-musical recording</option>
173         </select>
174
175         
176         <select name="limit" class="subtype">
177             <option value="" selected="selected" class="menuheader">Any format</option>
178             <option value="l-format:ta" >Regular print</option>
179             <option value="l-format:tb" >Large print</option>
180             <option value="l-format:fk" >Braille</option>
181             <option value="" >-----------</option>
182             <option value="l-format:sd" >CD audio</option>
183             <option value="l-format:ss" >Cassette recording</option>
184             <option value="l-format:vf" >VHS tape / Videocassette</option>
185             <option value="l-format:vd" >DVD video / Videodisc</option>
186             <option value="l-format:co" >CD Software</option>
187             <option value="l-format:cr" >Website</option>
188         </select>
189         
190         <select name="limit" class="subtype">
191             <option value="" >Additional content types</option>
192             <option value="ctype:a" >Abstracts/summaries</option>
193             <option value="ctype:b" >Bibliographies</option>
194             <option value="ctype:c" >Catalogs</option>
195             <option value="ctype:d" >Dictionaries</option>
196             <option value="ctype:e" >Encyclopedias </option>
197             <option value="ctype:f" >Handbooks</option>
198             <option value="ctype:g" >Legal articles</option>
199             <option value="ctype:i" >Indexes</option>
200             <option value="ctype:j" >Patent document</option>
201             <option value="ctype:k" >Discographies</option>
202             <option value="ctype:l" >Legislation</option>
203             <option value="ctype:m" >Theses</option>
204             <option value="ctype:n" >Surveys</option>
205             <option value="ctype:o" >Reviews</option>
206             <option value="ctype:p" >Programmed texts</option>
207             <option value="ctype:q" >Filmographies</option>
208             <option value="ctype:r" >Directories</option>
209             <option value="ctype:s" >Statistics</option>
210             <option value="ctype:t" >Technical reports</option>
211             <option value="ctype:v" >Legal cases and case notes</option>
212             <option value="ctype:w" >Law reports and digests</option>
213             <option value="ctype:z" >Treaties </option>
214         </select>
215        </p>
216
217 </fieldset>
218 [% END %]
219
220 <!-- AVAILABILITY LIMITS -->
221     <fieldset id="availability"><legend>Location and availability</legend>
222 <fieldset id="currently-avail">
223         <p><label for="available-items">Only items currently available</label> <input type="checkbox" id="available-items" name="limit" value="available" /></p>
224 </fieldset>
225
226 <fieldset id="select-libs">
227         <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;}'>
228         <option value="">All Libraries</option>
229         [% FOREACH branchloo IN branchloop %]
230         [% IF ( branchloo.selected ) %]
231         <option value="branch:[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
232         [% ELSE %]
233         <option value="branch:[% branchloo.value %]">[% branchloo.branchname %]</option>
234         [% END %]
235         [% END %]
236         </select></p>
237     <!-- <input type="hidden" name="limit" value="branch: MAIN" /> -->
238         [% IF ( searchdomainloop ) %]
239     <p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
240         <p><label for="categoryloop">Groups of Libraries</label><select name="multibranchlimit" id="categoryloop">
241         <option value=""> -- none -- </option>
242         [% FOREACH searchdomainloo IN searchdomainloop %]
243         <option value="[% searchdomainloo.categorycode %]">[% searchdomainloo.categoryname %]</option>
244         [% END %]
245         </select></p>
246     [% END %]
247 </fieldset>
248     </fieldset>
249 <!-- /AVAILABILITY LIMITS -->
250
251 <!-- RANK LIMITS -->
252 <fieldset id="sortby"><legend>Sorting</legend>
253     <p>
254     <label for="sort_by">Sort by </label><select id="sort_by" name="sort_by">
255   [% INCLUDE 'resort_form.inc' %]
256     </select>
257         </p>
258 </fieldset>
259 <!-- /RANK LIMITS -->
260
261 <!-- SEARCH BUTTONS -->
262             <fieldset class="action" id="submit2"><input class="submit" type="submit" accesskey="s" value="Search" />
263             [% IF ( expanded_options ) %]
264             <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=0">[Fewer Options]</a>
265             [% ELSE %]
266             <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=1">[More options]</a>
267             [% END %]
268             <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear">[New search]</a> 
269             </fieldset>
270 <!-- /SEARCH BUTTONS -->
271 </div>
272 </form>
273 </div>
274
275 [% INCLUDE 'intranet-bottom.inc' %]