Bug 11810: Input fields in OPAC suggestion form are a bit short (Bootstrap)
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-results-grouped.tt
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog ›
4 [% IF ( searchdesc ) %]
5     Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]
6 [% ELSE %]
7     You did not specify any search criteria.
8 [% END %]
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% BLOCK cssinclude %][% END %]
11 <link rel="alternate" type="application/rss+xml" title="Koha - RSS"
12 href="/cgi-bin/koha/opac-rss.pl?[% query_cgi %][% limit_cgi |html %]" />
13
14 </head>
15 <body id="results-grouped">
16 [% INCLUDE 'masthead.inc' %]
17
18     <div class="main">
19         <ul class="breadcrumb">
20             <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
21             <li>
22                 [% IF ( searchdesc ) %]
23                     <a href="#">Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc | html %]'[% END %]</a>
24                 [% ELSE %]
25                     <a href="#">You did not specify any search criteria.</a>
26                 [% END %]
27             </li>
28         </ul>
29
30         [% IF ( query_error ) %]
31             <div class="container-fluid">
32                 <div class="row-fluid">
33                     <div class="span12">
34                         <div class="alert">
35                             <h4>Error:</h4>
36                             <p>[% query_error %]</p>
37                         </div>
38                     </div> <!-- / .span12 -->
39                 </div> <!-- / .row-fluid -->
40             </div> <!-- / .container-fluid -->
41         [% END %]
42
43         <div class="container-fluid">
44             <div class="row-fluid">
45                 [% IF ( opacfacets && total ) %]
46                     <div class="span2">
47                         <div id="facetcontainer">
48                             <!-- FACETS START -->
49                             [% INCLUDE 'opac-facets.inc' %]
50                             <!-- FACETS END -->
51                         </div>
52                     </div>
53                     <div class="span10">
54                 [% ELSE %]
55                     <div class="span12">
56                 [% END %]
57                     <div id="grouped-results">
58                         <!-- Search Results Table -->
59                         [% IF ( total ) %]
60                             [% IF ( scan ) %]
61                                 <h1>Scan index:</h1>
62                                     <form action="/cgi-bin/koha/opac-search.pl" method="get">
63                                         <table>
64                                             <tbody>
65                                                 <tr>
66                                                     <td>
67                                                         Scan index for: <input type="text" name="q" id="scan-index" size="35" value="" />
68                                                     </td>
69                                                 </tr>
70                                                 <tr>
71                                                     <td>
72                                                         <label for="scan-index">Indexed in:</label>
73                                                         <select name="idx" id="scan-index">
74                                                             <option value="">Any word</option>
75                                                             <option value="kw,phr:">Any phrase</option>
76                                                             <option value="ti:">Title</option>
77                                                             <option value="ti,phr:">Title phrase</option>
78                                                             <option value="au,phr:">Author</option>
79                                                             <option value="su:">Subject</option>
80                                                             <option value="su,phr:">Subject phrase</option>
81                                                             <option value="se:">Series</option>
82                                                             <option value="pb:">Publisher</option>
83                                                             <option value="nt:">Notes</option>
84                                                             <option value="se:">Series Title</option>
85                                                             <option value="sn:">ISBN</option>
86                                                             <option value="ss:">ISSN</option>
87                                                         </select>
88                                                         <input type="hidden" name="scan" value="1" />
89                                                     </td>
90                                                 </tr>
91                                             </tbody>
92                                         </table>
93                                     </form>
94
95                                     <form action="/cgi-bin/koha/opac-search.pl" method="get">
96                                         <table>
97                                             <thead>
98                                                 <tr>
99                                                     <th>Term/Phrase</th>
100                                                     <th>Count</th>
101                                                 </tr>
102                                             </thead>
103                                             <tbody>
104                                                 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
105                                                 <tr>
106                                                     <td>
107                                                         <a href="/cgi-bin/koha/opac-search.pl?q=[% SEARCH_RESULT.scan_use |url %]&quot;[% SEARCH_RESULT.title |url %]&quot;">[% SEARCH_RESULT.title |html %]</a>
108                                                     </td>
109                                                     <td>
110                                                         [% FOREACH subtitl IN SEARCH_RESULT.subtitle %]
111                                                             [% subtitl.subfield %]
112                                                         [% END %]
113                                                     </td>
114                                                 </tr>
115                                                 [% END %]
116                                             </thead>
117                                         </table>
118                                     </form>
119                             [% ELSE %]
120
121                                 <div class="searchresults">
122                                     <form action="/cgi-bin/koha/opac-search.pl" method="get" name="bookbag_form" id="bookbag_form">
123                                         [% IF ( searchdesc ) %]
124                                             [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
125                                                 <input type="hidden" name="[% QUERY_INPUT.input_name |html %]" value="[% QUERY_INPUT.input_value |html %]"/>
126                                             [% END %]
127                                             [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
128                                                 <input type="hidden" name="[% LIMIT_INPUT.input_name |html %]" value="[% LIMIT_INPUT.input_value |html %]"/>
129                                             [% END %]
130                                         [% END %]
131
132                                         <!-- TABLE RESULTS START -->
133                                         <table class="table table-striped">
134                                             <tr>
135                                                 <td colspan="3" class="resultscontrol">
136                                                     <div class="resort">
137                                                         <select id="sort_by" name="sort_by"> [% INCLUDE 'resort_form.inc' %] </select>
138                                                         <input type="submit" class="submit clearfix" id="sortsubmit" value="Go" />
139                                                     </div>
140                                                     [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
141                                                         <div class="cartlist"><span class="checkall"></span>
142                                                         <span class="clearall"></span>
143                                                         <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a>
144                                                         <a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a>
145                                                         <span class="addto"></span></div>
146                                                     [% END %]
147                                                 </td>
148                                             </tr>
149                                             <!-- Actual Search Results -->
150                                             [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
151                                                 <tr class="grouplabel"><td colspan="3">[% SEARCH_RESULT.group_label %]</td></tr>
152                                                 [% FOREACH GROUP_RESULT IN SEARCH_RESULT.GROUP_RESULTS %]
153                                                     [% IF ( GROUP_RESULT.even ) %]
154                                                         <tr class="highlight">
155                                                     [% ELSE %]
156                                                         <tr>
157                                                     [% END %]
158                                                         <td>
159                                                             [% IF ( OPACAmazonCoverImages ) %]
160                                                                 <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% GROUP_RESULT.biblionumber |url %]">[% IF ( GROUP_RESULT.isbn ) %]<img src="http://images.amazon.com/images/P/[% GROUP_RESULT.isbn %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />[% ELSE %]<img src="http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif" alt="" class="thumbnail" />[% END %]
161                                                             </a>
162                                                         [% ELSE %]
163                                                             [% UNLESS ( noItemTypeImages ) %]
164                                                                 [% IF ( GROUP_RESULT.imageurl ) %]
165                                                                     <img src="[% GROUP_RESULT.imageurl %]" title="[% GROUP_RESULT.description %]" />
166                                                                 [% END %]
167                                                             [% END %]
168                                                             [% GROUP_RESULT.description %]
169                                                         [% END %]
170                                                         </td>
171                                                         <td>
172                                                             [% GROUP_RESULT.result_number %].
173                                                             [% IF ( GROUP_RESULT.BiblioDefaultViewmarc ) %]
174                                                                 <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% GROUP_RESULT.biblionumber |url %]" title="View details for this title">[% GROUP_RESULT.title %]
175                                                             [% ELSE %]
176                                                                 [% IF ( GROUP_RESULT.BiblioDefaultViewisbd ) %]
177                                                                     <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% GROUP_RESULT.biblionumber |url %]" title="View details for this title">[% GROUP_RESULT.title %]
178                                                                 [% ELSE %]
179                                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% GROUP_RESULT.biblionumber |url %]" title="View details for this title">[% GROUP_RESULT.title %]
180                                                                 [% END %]
181                                                                 [% FOREACH subtitl IN GROUP_RESULT.subtitle %]
182                                                                     [% subtitl.subfield %]
183                                                                 [% END %]
184                                                                 </a>
185                                                             [% END # / IF GROUP_RESULT.BiblioDefaultViewmarc %]
186                                                             [% IF ( GROUP_RESULT.author ) %]
187                                                                 by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% GROUP_RESULT.author |url %]" title="Search for works by this author">[% GROUP_RESULT.author %]</a>
188                                                             [% ELSE %]
189                                                                 &nbsp;
190                                                             [% END %]
191                                                             <p>
192                                                                 [% IF ( GROUP_RESULT.publicationyear ) %] - [% GROUP_RESULT.publicationyear %][% END %]
193                                                                 [% IF ( GROUP_RESULT.publishercode ) %]- [% GROUP_RESULT.publishercode %][% END %]
194                                                                 [% IF ( GROUP_RESULT.place ) %] ; [% GROUP_RESULT.place %][% END %]
195                                                                 [% IF ( GROUP_RESULT.pages ) %] - [% GROUP_RESULT.pages %][% END %]
196                                                                 [% IF ( GROUP_RESULT.notes ) %] : [% GROUP_RESULT.notes %][% END %]
197                                                                 [% IF ( GROUP_RESULT.size ) %] ; [% GROUP_RESULT.size %][% END %]
198                                                                 [% IF ( GROUP_RESULT.timestamp ) %] <i>(modified on [% GROUP_RESULT.timestamp %])</i>[% END %]
199                                                             </p>
200                                                             [% IF ( GROUP_RESULT.searchhighlightblob ) %]
201                                                                 <p class="searchhighlightblob">[% GROUP_RESULT.searchhighlightblob %]</p>
202                                                             [% END %]
203                                                             <p class="availability">
204                                                                 [% IF ( GROUP_RESULT.available_items_loop ) %]
205                                                                     <span class="available"><strong>Items available at:</strong>
206                                                                         [% FOREACH available_items_loo IN GROUP_RESULT.available_items_loop %]
207                                                                             [% IF ( available_items_loo.branchname ) %][% available_items_loo.branchname %][% END %]
208                                                                             [% IF ( OPACItemsResultsDisplay ) %]
209                                                                                 [% IF ( available_items_loo.location ) %][% available_items_loo.location %][% END %]
210                                                                                 [% IF ( available_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/opac-search.pl?q=callnum:[% available_items_loo.itemcallnumber |url %]">[% available_items_loo.itemcallnumber %]</a>][% END %]
211                                                                             [% END %]
212                                                                             ([% available_items_loo.count %]),
213                                                                         [% END # / FOREACH available_items_loo %]
214                                                                     </span>
215                                                                 [% ELSE %]
216                                                                     <span class="unavailable">No items available:</span>
217                                                                 [% END # / IF GROUP_RESULT.available_items_loop %]
218                                                                 <span class="unavailable">
219                                                                     [% IF ( GROUP_RESULT.onloancount ) %] Checked out ([% GROUP_RESULT.onloancount %]), [% END %]
220                                                                     [% IF ( GROUP_RESULT.withdrawncount ) %] Withdrawn ([% GROUP_RESULT.withdrawncount %]), [% END %]
221                                                                     [% IF ( GROUP_RESULT.itemlostcount ) %] Lost ([% GROUP_RESULT.itemlostcount %]),[% END %]
222                                                                     [% IF ( GROUP_RESULT.damagedcount ) %] Damaged ([% GROUP_RESULT.damagedcount %]),[% END %]
223                                                                     [% IF ( GROUP_RESULT.orderedcount ) %] On order ([% GROUP_RESULT.orderedcount %]),[% END %]
224                                                                     [% IF ( GROUP_RESULT.intransitcount ) %] In transit ([% GROUP_RESULT.intransitcount %]),[% END %]
225                                                                 </span>
226                                                             </p>
227                                                             <p>
228                                                                 [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
229                                                                     [% UNLESS ( GROUP_RESULT.norequests ) %]
230                                                                         [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
231                                                                             [% IF ( AllowOnShelfHolds ) %]
232                                                                                 <a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% GROUP_RESULT.biblionumber %]">Place hold</a><!-- add back when available 0 holds in queue-->
233                                                                             [% ELSE %]
234                                                                                 [% IF ( GROUP_RESULT.itemsissued ) %]
235                                                                                     <a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% GROUP_RESULT.biblionumber %]">Place hold</a><!-- add back when available 0 holds in queue-->
236                                                                                 [% END %]
237                                                                             [% END %]
238                                                                         [% END %]
239                                                                     [% END %]
240                                                                 [% END %]
241
242                                                                 [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
243                                                                     <input type="checkbox" name="biblionumber" value="[% GROUP_RESULT.biblionumber %]" title="Click to add to cart" /> <label for="bib[% GROUP_RESULT.biblionumber %]">
244                                                                 [% END %]
245                                                                 <img src="[% themelang %]/images/[% GROUP_RESULT.itemtype %].gif" alt="[% GROUP_RESULT.ccode %]" title="[% GROUP_RESULT.ccode %]" />
246                                                                 [% IF ( ( Koha.Preference( 'opacbookbag' ) = 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]</label>[% END %]
247                                                                 [% IF ( GROUP_RESULT.classification ) %]
248                                                                     <a href="/cgi-bin/koha/opac-search.pl?q=callnum:[% GROUP_RESULT.classification |url %]"> [% GROUP_RESULT.classification %] </a>
249                                                                 [% END %]
250                                                             </p>
251                                                         </td>
252                                                     </tr>
253                                                 [% END # / FOREACH GROUP_RESULT %]
254                                             [% END # / FOREACH SEARCH_RESULTS %]
255                                         </table>
256                                     </form>
257                                 </div> <!-- / .searchresults -->
258                             [% END # /  IF scan %]
259                             [% INCLUDE 'page-numbers.inc' %]
260                         [% END # / IF total %]
261
262                         [% IF Koha.Preference( 'suggestion' ) == 1 %]
263                             [% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
264                                 <div class="suggestion">Not finding what you're looking for?<br />  Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></div>
265                             [% ELSE %]
266                                 [% IF ( loggedinusername ) %]<div class="suggestion">Not finding what you're looking for?<br />  Make a <a href="/cgi-bin/koha/opac-suggestions.pl?op=add">purchase suggestion</a></div>[% END %]
267                             [% END %]
268                         [% END %]
269
270                     </div> <!-- / #grouped-results -->
271                 </div> <!-- /.span10/12 -->
272             </div> <!-- / .row-fluid -->
273         </div> <!-- / .container-fluid -->
274     </div><!-- / .main -->
275
276 [% INCLUDE 'opac-bottom.inc' %]
277 [% BLOCK jsinclude %]
278 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
279 <script type="text/javascript">
280 //<![CDATA[
281
282 var q_array = new Array();  // will hold the search terms, if possible
283
284 $(document).ready(function(){
285     [% IF ( OpacHighlightedWords ) %]
286         $('a.title').each(function() {
287             $(this).attr("href", $(this).attr("href") + "&query_desc=[% query_desc | uri %]");
288         });
289     [% END %]
290
291     $('#sortsubmit').hide();
292     $('#sort_by').change(function() {
293         $('#bookbag_form').submit();
294     });
295     $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">Clear all</a>");
296     $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">Select all</a>");
297     $("span.addto").html("<label for=\"addto\">Add to: </label><select name=\"addto\" id=\"addto\"><option value=\"\"></option>[% IF Koha.Preference( 'opacbookbag' ) == 1 %]<option value=\"addtocart\">Cart</option>[% END %][% IF Koha.Preference( 'virtualshelves' ) == 1 %][% IF ( loggedinusername ) %]<optgroup label=\"Lists:\">[% IF ( barshelves ) %][% FOREACH barshelvesloo IN barshelvesloop %][% IF ( category == 1 ) %]<option id=\"s[% barshelvesloo.shelfnumber %]\" value=\"addtolist\">[% barshelvesloo.shelfname %]</option>[% END %][% END %][% END %]<option value=\"newlist\">[ New list ]</option></optgroup>[% ELSE %]<option value=\"newlist\">List</option>[% END %][% END %]</select> <input type=\"submit\" class=\"submit\" value=\"Save\" />");
298     $("#addto").change(function(){
299         cartList();
300     });
301     $(".addto").find("input:submit").click(function(){
302         cartList();
303         return false;
304     });
305     function cartList(){
306             if($("#addto").find("option:selected").attr("value") == "addtolist"){
307             var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
308             [% IF ( loggedinusername ) %]if (vShelfAdd()) {
309             Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
310             }[% ELSE %] alert(_("You must be logged in to create or add to Lists")); [% END %]
311             return false;
312         } else if($("#addto").find("option:selected").attr("value") == "newlist"){
313             [% IF ( loggedinusername ) %]if (vShelfAdd()) {
314             Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
315             }[% ELSE %] alert(_("You must be logged in to create or add to Lists")); [% END %]
316             return false;
317         }
318         if($("#addto").find("option:selected").attr("value") == "addtocart"){
319             addMultiple();
320             return false;
321          }
322     }
323     $("#CheckAll").click(function(){
324         $("#bookbag_form").checkCheckboxes();
325         return false;
326     });
327     $("#CheckNone").click(function(){
328         $("#bookbag_form").unCheckCheckboxes();
329         return false;
330     });
331     [% IF ( query_desc ) %]
332     var query_desc = "[% query_desc |replace("'", "\'") |replace('\n', '\\n') |replace('\r', '\\r') |html %]";
333     q_array = query_desc.split(" ");
334     // ensure that we don't have "" at the end of the array, which can
335     // break the highlighter
336     while (q_array.length > 0 && q_array[q_array.length-1] == "") {
337         q_array = q_array.splice(0,-1);
338     }
339     highlightOn();
340     $("#highlight_toggle_on" ).hide().click(function() {highlightOn() ;});
341     $("#highlight_toggle_off").show().click(function() {highlightOff();});
342     [% END %]
343 });
344
345 function highlightOff() {
346     $("td").removeHighlight();
347     $(".highlight_toggle").toggle();
348 }
349 function highlightOn() {
350     var x;
351     for (x in q_array) {
352         q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
353         $("td").highlight(q_array[x]);
354     }
355     $(".highlight_toggle").toggle();
356 }
357 //]]>
358 </script>
359 [% END %]