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