Bug 10936: (prog theme) remove duplicate 'Standard number' option in Advanced search
[koha_fer] / koha-tmpl / opac-tmpl / prog / en / modules / opac-advsearch.tt
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %]
4     catalog › Advanced search
5 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/javascript" language="javascript">//<![CDATA[
7             $(document).ready(function() {
8             $('#advsearches').tabs();
9 });
10     //]]>
11 </script>
12 </head>
13 <body id="advsearch"><div id="doc3" class="yui-t7">
14 <div id="bd">
15 [% INCLUDE 'masthead.inc' %]
16 <div id="yui-main">
17 <form action="/cgi-bin/koha/opac-search.pl" method="get">
18     <div class="yui-g">
19 [% IF ( if_expanded_options_actually_worked ) %]
20         <div id="databases" class="container"> [% IF ( outer_servers_loop ) %]
21         <!-- DATABASES -->
22             <fieldset>
23                 <legend>Select local databases:</legend>
24                 [% FOREACH outer_servers_loo IN outer_servers_loop %]
25                     [% FOREACH inner_servers_loo IN outer_servers_loo.inner_servers_loop %]
26
27 [% IF ( inner_servers_loo.checked ) %]<input type="checkbox" id="[% inner_servers_loo.id %]" name="[% inner_servers_loo.name %]" checked="[% inner_servers_loo.checked %]" value="[% inner_servers_loo.value %]" />[% ELSE %]
28                             <input type="checkbox" id="[% inner_servers_loo.id %]" name="[% inner_servers_loo.name %]"  value="[% inner_servers_loo.value %]" />[% END %]
29                         <label for="[% inner_servers_loo.id %]"><img width="16" height="16" alt="[% inner_servers_loo.id %]" src="[% themelang %]/images/[% inner_servers_loo.icon %]" /> [% inner_servers_loo.label %]</label>
30                     [% END %]
31                 [% END %]
32             </fieldset>
33         <!-- /DATABASES -->
34         [% END %]
35
36         [% IF ( outer_sup_servers_loop ) %]
37             <!-- REMOTE DATABASES -->
38             <fieldset>
39                 <legend>Select remote databases:</legend>
40                 [% FOREACH outer_sup_servers_loo IN outer_sup_servers_loop %]
41                     [% FOREACH inner_sup_servers_loo IN outer_sup_servers_loo.inner_sup_servers_loop %]
42
43 [% IF ( inner_sup_servers_loo.checked ) %]<input type="checkbox" id="[% inner_sup_servers_loo.id %]" name="[% inner_sup_servers_loo.name %]" checked="[% inner_sup_servers_loo.checked %]" value="[% inner_sup_servers_loo.value %]" /><input type="checkbox" id="[% inner_sup_servers_loo.id %]" name="[% inner_sup_servers_loo.name %]" value="[% inner_sup_servers_loo.value %]" />
44 [% END %]
45 <label for="[% inner_sup_servers_loo.id %]"><img alt="[% inner_sup_servers_loo.id %]" src="[% themelang %]/images/[% inner_sup_servers_loo.icon %]" />[% inner_sup_servers_loo.label %]</label>
46                     [% END %]
47                 [% END %]
48             </fieldset>
49             <!-- /REMOTE DATABASES -->
50         [% END %]</div>
51     [% END %]
52
53     <!-- BOOLEAN SEARCH OPTIONS -->
54     <div id="booleansearch" class="container"><fieldset>
55         <legend>Search for:</legend>
56     [% FOREACH search_box IN search_boxes_loop %]
57         <p>
58         [% IF ( expanded_options ) %]
59             [% IF ( search_box.boolean ) %]
60                 <select name="op">
61                     <option value="and" selected="selected">and</option>
62                     <option value="or">or</option>
63                     <option value="not">not</option>
64                 </select>
65             [% END %]
66         [% ELSE %]
67             <label for="search-field_[% loop.index %]">
68                 [% IF loop.index == 0 %]
69                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
70                 [% ELSE %]
71                     and
72                 [% END %]
73             </label>
74             [% END %]
75         [% IF ( expanded_options ) %][% left_content %][% END %] 
76         <select name="idx" id="search-field_[% loop.index %]">
77             <option value="kw">Keyword</option>
78             <option value="su,wrdl">Subject</option>
79 [% IF ( expanded_options ) %]
80             <option value="su,phr">&nbsp;&nbsp;&nbsp;&nbsp; Subject phrase</option>
81             <option value="su-br">&nbsp;&nbsp;&nbsp;&nbsp; Subject and broader terms</option>
82             <option value="su-na">&nbsp;&nbsp;&nbsp;&nbsp; Subject and narrower terms</option>
83             <option value="su-rl">&nbsp;&nbsp;&nbsp;&nbsp; Subject and related terms</option>
84 [% END %]
85             <option value="ti">Title</option>
86 [% IF ( expanded_options ) %]
87             <option value="ti,phr">&nbsp;&nbsp;&nbsp;&nbsp; Title phrase</option>
88             <option value="se,wrdl">Series title</option>
89             [% IF ( numbersphr) %]
90             <option value="callnum,phr">Call number</option>
91             [% ELSE %]
92             <option value="callnum">Call number</option>
93             [% END %]
94             <option value="location">Shelving location</option>
95 [% END %]
96             <option value="au,wrdl">Author</option>
97             
98 [% IF ( expanded_options ) %]
99             <option value="au,phr">&nbsp;&nbsp;&nbsp;&nbsp; Author phrase</option>
100             <option value="cpn,wrdl">&nbsp;&nbsp;&nbsp;&nbsp; Corporate name</option>
101             <option value="cfn,wrdl">&nbsp;&nbsp;&nbsp;&nbsp; Conference name</option>
102             <option value="cfn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Conference name phrase</option>
103             <option value="pn,wrdl">&nbsp;&nbsp;&nbsp;&nbsp; Personal name</option>
104             <option value="pn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Personal name phrase</option>
105 [% END %]
106 [% IF ( expanded_options ) %]
107             <option value="nt">Notes/Comments</option>
108     [% IF (marcflavour != 'UNIMARC') %]
109             <option value="curriculum">Curriculum</option>
110     [% END %]
111 [% END %]
112             <option value="pb,wrdl">Publisher</option>
113             <option value="pl,wrdl">Publisher location</option>
114 [% IF ( expanded_options ) %]
115             [% IF ( numbersphr) %]
116             <option value="sn,phr">Standard number</option>
117             [% ELSE %]
118             <option value="sn">Standard number</option>
119             [% END %]
120             <option value="nb">&nbsp;&nbsp;&nbsp;&nbsp; ISBN</option>
121             <option value="ns">&nbsp;&nbsp;&nbsp;&nbsp; ISSN</option>
122             [% IF ( numbersphr) %]
123             <option value="lcn,phr">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
124             [% ELSE %]
125             <option value="lcn">&nbsp;&nbsp;&nbsp;&nbsp; Call number</option>
126             [% END %]
127 [% ELSE %]
128             <option value="nb">ISBN</option>
129 [% END %]
130             <option value="bc">Barcode</option>
131         </select>
132         <input type="text" size="30" name="q" title="Enter search terms" value="" />
133 [% IF ( expanded_options ) %]
134         <!--   [% IF ( search_box.scan_index ) %]<input type="checkbox" name="scan" id="scan" value="1" /> Scan Indexes[% END %] -->
135         [% IF ( !loop.first ) %]
136             <a class="ButtonPlus" name="ButtonPlus" title="Add another field" href="#">[+]</a>
137             <a class="ButtonLess" title="Remove field" href="#">[-]</a>
138         [% END %]
139 [% END %]
140         </p>
141     [% END %]
142
143     </fieldset></div>
144     </div>
145 <div class="yui-g"><div class="container" style="text-align: center;"><!-- SEARCH BUTTONS -->
146
147     <input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
148     [% IF ( expanded_options ) %]
149         <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0">[Fewer options]</a>
150     [% ELSE %]
151         <a href="/cgi-bin/koha/opac-search.pl?expanded_options=1">[More options]</a>
152     [% END %]
153     <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
154
155 <!-- /SEARCH BUTTONS --></div></div>
156 <div class="yui-g">
157 <div id="pubrange" class="container">
158 <fieldset>
159 <!-- PUB RANGE OPTION -->
160 <legend>Publication date range:</legend>
161 <p>For example:  1999-2001.  You could also use "-1987" for everything published in and before 1987 or "2008-" for everything published in 2008 and after.</p>
162 <input type="text" size="30" name="limit-yr" title="Enter search terms" value="" />
163 </fieldset>
164 <!-- /PUB RANGE OPTION -->
165 </div>
166 </div>
167     <div class="yui-g">
168       <div id="advsearches" class="toptabs">
169       <ul>
170       [% FOREACH advsearchloo IN advancedsearchesloop %]
171         <li id="advsearch-tab-[% advsearchloo.advanced_search_type %]">
172            <a href="#advsearch-[% advsearchloo.advanced_search_type %]">
173            [% IF ( advsearchloo.advanced_search_type == 'itemtypes' ) %]Item type
174            [% ELSIF ( advsearchloo.advanced_search_type == 'ccode' ) %]Collection
175            [% ELSIF ( advsearchloo.advanced_search_type == 'loc' ) %]Shelving location
176            [% ELSE %]Something else
177            [% END %]
178            </a>
179         </li>
180       [% END %]
181       </ul>
182 <!-- /BOOLEAN SEARCH OPTIONS -->
183     [% FOREACH advsearchloo IN advancedsearchesloop %]
184     <div id="advsearch-[% advsearchloo.advanced_search_type %]" class="container advsearch">
185     <fieldset>
186     <legend>Limit to any of the following:</legend>
187     <table>
188         <tr>
189     [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
190         <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 border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]&nbsp;[% END %]
191         [% itemtypeloo.description %]</label></td>
192         [% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
193     [% END %]
194     </table>
195     </fieldset>
196     </div>
197     [% END %]
198     </div>
199     <div id="langfilter">
200     <fieldset><legend>Language</legend>
201     <!-- LANGUAGE LIMIT -->
202                 <p><label for="language-limit">Language: </label>                                        
203                 <select id="language-limit" name="limit">
204                 <option value="">No limit</option>
205                 [% FOREACH search_languages_loo IN search_languages_loop %]
206                     [% IF ( search_languages_loo.selected ) %]
207                         <option value="ln,rtrn:[% search_languages_loo.iso639_2_code %]" selected="selected">[% search_languages_loo.language_description %]</option>
208                     [% ELSE %]
209                         <option value="ln,rtrn:[% search_languages_loo.iso639_2_code %]">[% search_languages_loo.language_description %]</option>
210                     [% END %]
211                 [% END %]
212                 </select></p><!-- <a href="">Show all languages</a>-->
213     <!-- /LANGUAGE LIMIT -->
214     </fieldset>
215     </div>
216 [% IF ( expanded_options ) %]
217     [% IF ( usmarc ) %]
218         <!-- SUBTYPE LIMITS -->
219             <div id="subtypes" class="container"><fieldset>
220             <legend>Subtype limits</legend><select name="limit" class="subtype">
221                 <option value="" selected="selected" class="menuheader">Any audience</option>
222                     <option value="aud:a">Preschool</option>
223                     <option value="aud:b">Primary</option>
224                     <option value="aud:c">Pre-adolescent</option>
225                     <option value="aud:d">Adolescent</option>
226                     <option value="aud:e">Adult</option>
227                     <option value="aud:f">Specialized</option>
228                     <option value="aud:g">General</option>
229                     <option value="aud:j">Juvenile</option>
230                 </select>
231
232             <select name="limit" class="subtype">
233                 <option value="" selected="selected" class="menuheader">Any content</option>
234                     <option value="fic:1">Fiction</option>
235                     <option value="fic:0">Non fiction</option>
236                     <option value="bio:b">Biography</option>
237                     <option value="mus:j">Musical recording</option>
238                     <option value="mus:i">Non-musical recording</option>
239                 </select>
240     
241             
242             <select name="limit" class="subtype">
243                 <option value="" selected="selected" class="menuheader">Any format</option>
244                     <option value="l-format:ta">Regular print</option>
245                     <option value="l-format:tb">Large print</option>
246                     <option value="l-format:fk">Braille</option>
247                     <option value="">-----------</option>
248                     <option value="l-format:sd">CD audio</option>
249                     <option value="l-format:ss">Cassette recording</option>
250                     <option value="l-format:vf">VHS tape / Videocassette</option>
251                     <option value="l-format:vd">DVD video / Videodisc</option>
252                     <option value="l-format:co">CD software</option>
253                     <option value="l-format:cr">Website</option>
254                 </select>
255             
256             <select name="limit" class="subtype">
257                 <option value="">Additional content types for books/printed materials</option>
258                     <option value="ctype:a">Abstracts/summaries</option>
259                     <option value="ctype:b">Bibliographies</option>
260                     <option value="ctype:c">Catalogs</option>
261                     <option value="ctype:d">Dictionaries</option>
262                     <option value="ctype:e">Encyclopedias </option>
263                     <option value="ctype:f">Handbooks</option>
264                     <option value="ctype:g">Legal articles</option>
265                     <option value="ctype:i">Indexes</option>
266                     <option value="ctype:j">Patent document</option>
267                     <option value="ctype:k">Discographies</option>
268                     <option value="ctype:l">Legislation</option>
269                     <option value="ctype:m">Theses</option>
270                     <option value="ctype:n">Surveys</option>
271                     <option value="ctype:o">Reviews</option>
272                     <option value="ctype:p">Programmed texts</option>
273                     <option value="ctype:q">Filmographies</option>
274                     <option value="ctype:r">Directories</option>
275                     <option value="ctype:s">Statistics</option>
276                     <option value="ctype:t">Technical reports</option>
277                     <option value="ctype:v">Legal cases and case notes</option>
278                     <option value="ctype:w">Law reports and digests</option>
279                     <option value="ctype:z">Treaties </option>
280                 </select>
281     
282     </fieldset></div>
283     [% END %]
284     [% IF ( UNIMARC ) %]
285         <div id="subtypes_unimarc" class="container"><!-- SUBTYPE LIMITS -->
286     [% INCLUDE 'subtypes_unimarc.inc' %]</div>
287     [% END %]
288 [% END %]
289         
290 </div>
291 <div class="yui-g">
292
293 <div class="yui-u first">
294 <!-- AVAILABILITY LIMITS -->
295     [% UNLESS ( singleBranchMode ) %]
296     <div id="location" class="container"><fieldset><legend>Location and availability: </legend>
297
298         <label for="branchloop">Library:</label>
299         <select name="limit" id="branchloop">
300         <option value="">All libraries</option>
301         [% FOREACH BranchesLoo IN BranchesLoop %]
302         [% IF ( BranchesLoo.selected ) %]
303         <option value="branch:[% BranchesLoo.value %]" selected="selected">[% BranchesLoo.branchname %]</option>
304         [% ELSE %]    
305         <option value="branch:[% BranchesLoo.value %]">[% BranchesLoo.branchname %]</option>
306         [% END %]    
307         [% END %]
308         </select>
309         [% IF ( searchdomainloop ) %]
310             <p>OR</p> <!-- should addjs to grey out group pulldown if a library is selected. -->
311                 <label for="categoryloop">Groups of libraries</label><select name="multibranchlimit" id="categoryloop">
312                 <option value=""> -- none -- </option>
313                 [% FOREACH searchdomainloo IN searchdomainloop %]
314                 <option value="[% searchdomainloo.categorycode %]">[% searchdomainloo.categoryname %]</option>
315                 [% END %]
316                 </select>
317         [% END %]        
318         <div style="margin-top:.4em"><label for="available-items"><input type="checkbox" id="available-items" name="limit" value="available" /> Only items currently available for loan or reference</label></div>
319     </fieldset></div>
320     [% END %]
321 <!-- /AVAILABILITY LIMITS -->
322 </div>
323 <div class="yui-u">
324 <!-- RANK LIMITS -->
325     <div id="sortby" class="container"><fieldset><legend>Sorting: </legend>
326         <label for="sort_by">Sort by:</label> <select id="sort_by" name="sort_by">
327 [% INCLUDE 'resort_form.inc' %]
328 </select></fieldset></div>
329 <!-- RANK LIMITS -->
330 </div>
331 </div>
332
333 <div class="yui-g"><div class="container" style="text-align: center;"><!-- SEARCH BUTTONS -->
334
335     <input class="submit" type="submit" accesskey="s" name="do" title="Search" value="Search" />
336     [% IF ( expanded_options ) %]
337         <a href="/cgi-bin/koha/opac-search.pl?expanded_options=0">[Fewer options]</a>
338     [% ELSE %]
339         <a href="/cgi-bin/koha/opac-search.pl?expanded_options=1">[More options]</a>
340     [% END %]
341     <a href="/cgi-bin/koha/opac-search.pl?do=Clear">[New search]</a>
342
343 <!-- /SEARCH BUTTONS --></div></div>
344 </form>
345 </div>
346 <script type="text/javascript" language="javascript">
347     /* This function allows to display a new field to search.
348     */
349     $(document).on("click", '.ButtonPlus', function(e) {
350         e.preventDefault();
351         $('.ButtonLess').show();
352         var thisLine = $(this).parent();
353         var newLine = thisLine.clone();
354         newLine.find('input').val('');
355         thisLine.after(newLine);
356     });
357
358     $(document).on("click", '.ButtonLess', function(e) {
359         e.preventDefault();
360         if($(this).parent().siblings().length <= 3 ) {
361            $('.ButtonLess').hide();
362         }
363         $(this).parent().remove();
364     });
365 </script>
366
367 </div>
368 [% INCLUDE 'opac-bottom.inc' %]