Bug 16469 - Remove the use of "onclick" from some catalog pages
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / results.tt
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Catalog &rsaquo; [% IF ( searchdesc ) %]Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc | html %]'[% END %][% ELSE %]You did not specify any search criteria[% END %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% INCLUDE 'browser-strings.inc' %]
6 [% IF BiblioDefaultViewmarc %]
7     [% SET DetailPage="MARCdetail.pl" %]
8 [% ELSIF BiblioDefaultViewlabeled_marc %]
9     [% SET DetailPage="labeledMARCdetail.pl" %]
10 [% ELSIF BiblioDefaultViewisbd %]
11     [% SET DetailPage="ISBDdetail.pl" %]
12 [% ELSE %]
13     [% SET DetailPage="detail.pl" %]
14 [% END %]
15
16 <!--[if lt IE 9]>
17 <script type="text/javascript" src="[% interface %]/lib/shims/json2.min.js"></script>
18 <![endif]-->
19 <script type="text/javascript" src="[% interface %]/js/browser.js"></script>
20 <script type="text/javascript">
21 //<![CDATA[
22 var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
23 var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be placed on hold.");
24 var q_array = new Array();  // will hold search terms, if present
25 [% IF ( AmazonCoverImages ) %]
26 // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
27 function verify_images() {
28     $("img").each(function(i){
29         if ((this.src.indexOf('images-amazon.com') >= 0) || (this.src.indexOf('images.amazon.com') >=0)) {
30             w = this.width;
31             h = this.height;
32             if ((w == 1) || (h == 1)) {
33                 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
34             } else if ((this.complete != null) && (!this.complete)) {
35                 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
36             }
37         }
38     });
39 }
40
41 $(window).load(function() {
42         verify_images();
43      });
44 [% END %]
45 function Dopop(link) {
46         newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes');
47 }
48 function cartList(){
49     var checkboxes = $("#searchresults").find(":checkbox");
50     var vshelf = vShelfAdd(checkboxes);
51     if($("#addto").find("option:selected").attr("value") == "addtolist"){
52         var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
53         if (vshelf) {
54              Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vshelf);
55         }
56         return false;
57     } else if($("#addto").find("option:selected").attr("value") == "newlist"){
58         if (vshelf) {
59             Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vshelf);
60         }
61         return false;
62     } else if($("#addto").find("option:selected").attr("value") == "morelists"){
63         if (vshelf) {
64             Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?' + vshelf);
65         }
66         return false;
67     }
68     if($("#addto").find("option:selected").attr("value") == "addtocart"){
69         addMultiple(checkboxes);
70         return false;
71     }
72 }
73 $(document).ready(function() {
74 $("#cartsubmit").click(function(){
75     cartList();
76     return false;
77 });
78 $("#z3950submit").click(function(){
79     PopupZ3950();
80     return false;
81 });
82
83 $("#searchheader").on("click",".placehold", function(){
84     placeHold();
85     $(".btn-group").removeClass("open");
86     return false;
87 });
88 $(".placeholdfor").click(function(){
89     holdForPatron();
90     $(".btn-group").removeClass("open");
91     return false;
92 });
93 $("#forgetholdfor").click(function(){
94     forgetPatron();
95     $(".btn-group").removeClass("open");
96     return false;
97 });
98 $('#sortbyform').find("input:submit").hide();
99 $('#sort_by').change(function() {
100         $('#sortbyform').submit();
101     });
102         var param1 = "<label for=\"addto\">"+_("Add to:")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>";
103         [% IF ( intranetbookbag ) %]     param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>"; [% END %]
104
105         [% IF Koha.Preference('virtualshelves') %]
106             [% IF add_to_some_private_shelves.count %]
107                 param1 += "<optgroup label=\""+_("Your lists:")+"\">";
108                 [% SET number_of_private_shelves = 0 %]
109                 [% FOREACH s IN add_to_some_private_shelves %]
110                     [% IF shelfnumber != s.shelfnumber %]
111                         param1 += "<option id=\"s[% s.shelfnumber %]\" value=\"addtolist\">[% s.shelfname |html %]<\/option>";
112                         [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
113                         [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
114                     [% END %]
115                 [% END %]
116                 param1 += "<\/optgroup>";
117             [% END %]
118             [% IF add_to_some_public_shelves.count %]
119                 param1 += "<optgroup label=\""+_("Public lists:")+"\">";
120                 [% SET number_of_public_shelves = 0 %]
121                 [% FOREACH s IN add_to_some_public_shelves %]
122                     [% IF shelfnumber != s.shelfnumber %]
123                         param1 += "<option id=\"s[% s.shelfnumber %]\" value=\"addtolist\">[% s.shelfname |html %]<\/option>";
124                         [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
125                         [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
126                     [% END %]
127                 [% END %]
128                 param1 += "<\/optgroup>";
129             [% END %]
130             [% IF add_to_some_private_shelves.count > 10 or add_to_some_public_shelves.count > 10 %]
131                 param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>";
132             [% END %]
133             param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>"
134         [% END %]
135
136         param1 += "<\/select> <input id=\"cartsubmit\" type=\"submit\" class=\"submit\" value=\""+_("Save")+"\" />";
137  $('#sortsubmit').hide();
138         $("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
139         $("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
140         $("span.addto").html(param1);
141         $("#addto").change(function(){
142                 cartList();
143         });
144         $(".addto").find("input:submit").click(function(){
145                 cartList();
146                 return false;
147         });
148
149  $("#tagsel_span").html("<input id=\"tagsel_tag\" class=\"submit\" type=\"submit\" value=\"Tag\"/>");
150
151     $("#selection_ops").show();
152     $(".selection").show();
153     [% IF ( query_desc ) %]
154     toHighlight = $("p,span.results_summary,a.title");
155         var query_desc = "[% query_desc |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]";
156         q_array = query_desc.split(" ");
157         // ensure that we don't have "" at the end of the array, which can
158         // break the highlighter
159         while (q_array.length > 0 && q_array[q_array.length-1] == "") {
160             q_array = q_array.splice(0,-1);
161         }
162         highlightOn();
163         $("#highlight_toggle_on" ).hide().click(function() {highlightOn() ;});
164         $("#highlight_toggle_off").show().click(function() {highlightOff();});
165     [% END %]
166
167     [% IF (SEARCH_RESULTS) %]
168         var newresults = [
169             [%- FOREACH result IN SEARCH_RESULTS -%]
170                 [%- result.biblionumber %],
171             [%- END -%]
172         ];
173         var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
174         browser.create([% SEARCH_RESULTS.first.result_number %], '[% query_cgi %]', '[% limit_cgi | uri %]','[% sort_cgi | uri %]',
175                newresults, '[% total %]');
176     [% END %]
177     [% IF (gotoPage && gotoNumber) %]
178         [% IF (gotoNumber == 'first') %]
179             window.location = '/cgi-bin/koha/catalogue/[% gotoPage %]?biblionumber=' + [% SEARCH_RESULTS.first.biblionumber %] + '&searchid=[% searchid %]';
180         [% ELSIF (gotoNumber == 'last') %]
181             window.location = '/cgi-bin/koha/catalogue/[% gotoPage %]?biblionumber=' + [% SEARCH_RESULTS.last.biblionumber %] + '&searchid=[% searchid %]';
182         [% END %]
183     [% END %]
184
185 [% IF LocalCoverImages %]KOHA.LocalCover.LoadResultsCovers();[% END %]
186     $("#select_all").on("click",function(e){
187         e.preventDefault();
188         selectAll();
189     });
190     $("#clear_all").on("click",function(e){
191         e.preventDefault();
192         clearAll();
193     });
194 });
195
196
197 [% IF ( query_desc ) %]function highlightOff() {
198     toHighlight.removeHighlight();
199     $(".highlight_toggle").toggle();
200 }
201 function highlightOn() {
202     var x;
203     for (x in q_array) {
204         q_array[x] = q_array[x].toLowerCase();
205         var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
206         if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
207             toHighlight.highlight(q_array[x]);
208         }
209     }
210     $(".highlight_toggle").toggle();
211 }[% END %]
212
213 function selectAll () {
214     $(".selection").prop("checked", true);
215 }
216 function clearAll () {
217     $(".selection").prop("checked", false);
218 }
219 function placeHold () {
220     var checkedItems = $(".selection:checked");
221     if ($(checkedItems).size() == 0) {
222         alert(MSG_NO_ITEM_SELECTED);
223         return false;
224     }
225     var bibs = "";
226     var badBibs = false;
227     $(checkedItems).each(function() {
228         var bib = $(this).val();
229         if ($("#reserve_" + bib).size() == 0) {
230             alert(MSG_NON_RESERVES_SELECTED);
231             badBibs = true;
232             return false;
233         }
234         bibs += bib + "/";
235     });
236     if (badBibs) {
237         return false;
238     }
239     $("#hold_form_biblios").val(bibs);
240     $("#hold_form").submit();
241     return false;
242 }
243
244 function forgetPatron(){
245     $.removeCookie("holdfor", { path: '/' });
246     $(".holdforlink").remove();
247     $("#placeholdc").html("<a class=\"btn btn-mini placehold\" href=\"#\"><i class=\"fa fa-sticky-note-o\"></i> "+_("Place hold")+"</a>");
248 }
249
250 function addToList () {
251     var checkedItems = $(".selection:checked");
252     if ($(checkedItems).size() == 0) {
253         alert(MSG_NO_ITEM_SELECTED);
254         return false;
255     }
256     var bibs = "";
257     $(checkedItems).each(function() {
258         bibs += $(this).val() + "/";
259     });
260
261     var url = "/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumbers=" + bibs;
262         window.open(url, 'Add_to_virtualshelf', 'width=500, height=400, toolbar=false, scrollbars=yes');
263     return false;
264 }
265
266 /* this function open a popup to search on z3950 server.  */
267 function PopupZ3950() {
268     var strQuery = GetZ3950Terms();
269     if(strQuery){
270         window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber %]"+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes');
271     }
272 }
273 /* provide Z3950 search points */
274 function GetZ3950Terms(){
275         var strQuery="&frameworkcode=";
276         [% FOREACH z3950_search_param IN z3950_search_params %]
277         strQuery += "&" + "[% z3950_search_param.name |uri %]" + "=" + "[% z3950_search_param.value |uri %]";
278         [% END %]
279         return strQuery;
280 }
281
282 var holdFor = function (){
283     $("#holdFor").val("");
284     placeHold();
285 }
286 var holdForPatron = function () {
287     $("#holdFor").val("[% holdfor_cardnumber %]");
288     placeHold();
289 }
290 //]]>
291 </script>
292 </head>
293 <body id="catalog_results" class="catalog">
294 [% INCLUDE 'header.inc' %]
295 [% INCLUDE 'cat-search.inc' %]
296
297 <div id="breadcrumbs">
298          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
299 &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
300 &rsaquo; Search [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc | html %]'[% END %]
301 </div>
302
303 <div id="doc3" class="yui-t1">
304    <div id="bd">
305     <div id="yui-main">
306     <div class="yui-b">
307
308     [% IF ( outer_sup_results_loop ) %]
309     <div class="yui-ge">
310     <div class="yui-u first">
311     [% END %]
312
313     [% IF ( koha_spsuggest ) %]
314         <div style="font-size: 12px;">Did you mean:
315             <ul style="list-style: none;">
316             [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
317             <li>
318                 <a href="/cgi-bin/koha/catalogue/search.pl?q=[% SPELL_SUGGES.spsuggestion %]">[% SPELL_SUGGES.spsuggestion %]</a>
319             </li>
320             [% END %]
321             </ul>
322         </div>
323     [% END %]
324
325     [% IF ( total ) %]
326         <div id="searchheader">
327             <form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="sortbyform">
328                 [% IF ( searchdesc ) %]
329                     [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
330                     <input type="hidden" name="[% QUERY_INPUT.input_name |html %]" value="[% QUERY_INPUT.input_value |html %]"/>
331                     [% END %]
332                     [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
333                     <input type="hidden" name="[% LIMIT_INPUT.input_name |html %]" value="[% LIMIT_INPUT.input_value |html %]"/>
334                     [% END %]
335                 [% END %]
336                 <!-- RE-SORT START -->
337                     <label for="sort_by">Sort By: </label>
338                     <select id="sort_by" name="sort_by">
339                     [% INCLUDE 'resort_form.inc' %]
340                     </select>
341                     <input type="submit" value="Go" />
342                 <!-- RESORT END -->
343             </form>
344             <h3>
345                 [% total %] result(s) found [% IF ( query_desc ) %]for <span style="font-weight: bold;">'[% query_desc |html %]'</span>[% END %][% IF limit_desc  %]&nbsp;with limit(s): <span style="font-weight: bold;">'[% limit_desc | html %]'</span>[% END %][% IF ( LibraryName ) %] in [% LibraryName %] Catalog[% END %].<br />&nbsp;
346             </h3>
347             <div id="selection_ops" class="cartlist" style="display:none">
348                 <a href="#" id="select_all">Select all</a>
349                 |
350                 <a href="#" id="clear_all">Clear all</a>
351                 |
352                 <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a>
353                 <a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a>
354                 |
355                 <span class="addto"></span>
356                 [% IF ( CAN_user_reserveforothers && DisplayMultiPlaceHold ) %]
357                 [% IF ( holdfor ) %]
358                     <div id="placeholdc" class="btn-group">
359                         <button class="btn btn-mini placehold"><i class="fa fa-sticky-note-o"></i> Place hold</button>
360                         <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">
361                         <span class="caret"></span>
362                         </button>
363                         <ul class="dropdown-menu">
364                             <li><a href="#" class="placehold">Place hold</a></li>
365                             <li><a href="#" class="placeholdfor">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></li>
366                             <li class="divider"></li>
367                             <li><a href="#" id="forgetholdfor">Forget  [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></li>
368                         </ul>
369                     </div>
370                 [% ELSE %]
371                     <div id="placeholdc" class="btn-group"><a class="btn btn-mini placehold" href="#"><i class="fa fa-sticky-note-o"></i> Place hold</a></div>
372                 [% END %]
373                 [% END %]
374
375                 [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] <div class="btn-group"><a class="btn btn-mini" id="z3950submit" href="#"><i class="fa fa-search"></i> Z39.50/SRU search</a></div>[% END %]
376             </div>
377         </div>
378     [% ELSE %]
379         <div id="searchheader">
380                         <form method="post" name="fz3950" class="fz3950bigrpad">
381                 <button class="btn" type="button" id="z3950submit"><i class="fa fa-search"></i> Z39.50/SRU search</button>
382                         </form>
383             <h3>No results found</h3>
384         [% IF ( searchdesc ) %]
385             <p>
386                 No results match your search [% IF ( query_desc ) %]for <span style="font-weight: bold;">'[% query_desc |html %]'</span>[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s): <span style="font-weight: bold;">'[% limit_desc | html %]'</span>[% END %][% IF ( LibraryName ) %] in [% LibraryName %] Catalog[% END %].
387             </p>
388         [% ELSE %]
389             <p>You did not specify any search criteria.</p>
390         [% END %]
391                 </div>
392     [% END %]
393
394     [% IF ( query_error ) %]
395         <div class="dialog alert"><p><strong>Error:</strong> [% query_error %]</p></div>
396     [% END %]
397
398     <!-- Search Results Table -->
399     [% IF ( total ) %]
400         [% IF ( scan ) %]
401             <h1>Scan index:</h1>
402             <form action="/cgi-bin/koha/catalogue/search.pl" method="get">
403             <table>
404                 <tr>
405                     <td>
406                         Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="" />
407                     </td>
408                 </tr>
409                 <tr>
410                     <td>
411                         <label for="scan-index">Indexed in:</label>
412                         <select name="idx" id="scan-index">
413                             <option value="">Any word</option>
414                             [% IF ( ms_anycommaphr) %]<option selected="selected" value="any,phr">Any phrase</option>
415                             [% ELSE %]<option value="any,phr">Any phrase</option>[% END %]
416                             [% IF ( ms_ti ) %]<option selected="selected" value="ti">Title</option>
417                             [% ELSE %]<option value="ti">Title</option>[% END %]
418                             [% IF ( ms_ticommaphr ) %]<option selected="selected" value="ti,phr">Title phrase</option>
419                             [% ELSE %]<option value="ti,phr">Title phrase</option>[% END %]
420                             [% IF ( ms_aucommaphr ) %]<option selected="selected" value="au,phr">Author</option>
421                             [% ELSE %]<option value="au,phr">Author</option>[% END %]
422                             [% IF ( ms_su ) %]<option selected="selected" value="su">Subject</option>
423                             [% ELSE %]<option value="su">Subject</option>[% END %]
424                             [% IF ( ms_sucommaphr ) %]<option selected="selected" value="su,phr">Subject phrase</option>
425                             [% ELSE %]<option value="su,phr">Subject phrase</option>[% END %]
426                             [% IF ( ms_se ) %]<option selected="selected" value="se">Series</option>
427                             [% ELSE %]<option value="su">Series</option>[% END %]
428                             [% IF ( ms_pb ) %]<option selected="selected" value="pb">Publisher</option>
429                             [% ELSE %]<option value="pb">Publisher</option>[% END %]
430                             [% IF ( ms_nt ) %]<option selected="selected" value="nt">Notes</option>
431                             [% ELSE %]<option value="nt">Notes</option>[% END %]
432                             [% IF ( ms_sn ) %]<option selected="selected" value="sn">ISBN</option>
433                             [% ELSE %]<option value="sn">ISBN</option>[% END %]
434                             [% IF ( ms_ss ) %]<option selected="selected" value="ss">ISSN</option>
435                             [% ELSE %]<option value="ss">ISSN</option>[% END %]
436                         </select>
437                         <input type="hidden" name="scan" value="1" />
438                     </td>
439                 </tr>
440             </table>
441             </form>
442
443             <form action="/cgi-bin/koha/catalogue/search.pl" method="get">
444             <table>
445                 <tr>
446                     <th>Term/Phrase</th>
447                     <th>Count</th>
448                 </tr>
449                 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
450                     <tr>
451                         <td>
452                             <a href="/cgi-bin/koha/catalogue/search.pl?idx=[% SEARCH_RESULT.scan_index_to_use %]&amp;q=[% SEARCH_RESULT.scan_use |url %]&quot;[% SEARCH_RESULT.title %]&quot;">[% SEARCH_RESULT.title |html %]</a>
453                         </td>
454                         <td>
455                             [% SEARCH_RESULT.author %]
456                         </td>
457                     </tr>
458                 [% END %]
459             </table>
460             </form>
461         [% ELSE %]
462
463             <div id="searchresults">
464                 <form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form">
465                 [% IF ( searchdesc ) %]
466                 [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
467                 <input type="hidden" name="[% QUERY_INPUT.input_name |html %]" value="[% QUERY_INPUT.input_value |html %]"/>
468                 [% END %]
469                 [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
470                 <input type="hidden" name="[% LIMIT_INPUT.input_name |html %]" value="[% LIMIT_INPUT.input_value |html %]"/>
471                 [% END %]
472                 [% END %]
473
474                     <!-- TABLE RESULTS START -->
475                 <table>
476                     <tr>
477                         [% IF ( AmazonCoverImages || LocalCoverImages ) %]<th>&nbsp;</th>[% END %]
478                         <th colspan="2">Results</th>
479                         <th>Location</th>
480                     </tr>
481                         <!-- Actual Search Results -->
482                         [% SET MaxSearchResultsItemsPerRecordStatusCheck = Koha.Preference('MaxSearchResultsItemsPerRecordStatusCheck') %]
483                         [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
484                             <tr>
485                             [% IF ( AmazonCoverImages || LocalCoverImages ) %]
486                                 <td>
487                                     [% IF ( LocalCoverImages) %]
488                                         <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
489                                         <span title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber %]" id="local-thumbnail[% loop.count %]"></span>
490                                         </a>
491                                     [% END %]
492                                     [% IF ( AmazonCoverImages ) %]
493                                         [% IF ( SEARCH_RESULT.normalized_isbn ) %]
494                                             <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
495                                             <img src="https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />
496                                         [% ELSIF ( !LocalCoverImages ) %]
497                                             <a class="p1 no-amazon-cover" href="/cgi-bin/koha/catalogue/[% DetailPage %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
498                                             <img src="https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif" alt="" class="thumbnail" />
499                                         [% END %]
500                                         </a>
501                                     [% END %]
502                                 </td>
503                             [% END %]
504                             <td>
505                                 <input type="checkbox" class="selection" id="bib[% SEARCH_RESULT.biblionumber %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber %]" style="display:none" />
506                             </td>
507                             <td>
508                             [% IF ( SEARCH_RESULT.XSLTResultsRecord ) %]
509                 [% SEARCH_RESULT.result_number %].
510                                 [% SEARCH_RESULT.XSLTResultsRecord %]
511                             [% ELSE %]
512                                 <p>[% SEARCH_RESULT.result_number %].
513                                  [% biblionumber = SEARCH_RESULT.biblionumber %]
514
515                                 [% INCLUDE 'biblio-default-view.inc' %]
516                                             <b>[% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %]</b>
517                                             </a>
518                                         [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield %][% END %]
519                                         [% IF ( SEARCH_RESULT.seriestitle ) %][% SEARCH_RESULT.seriestitle %][% END %]
520                                         [% IF ( SEARCH_RESULT.volume ) %][% SEARCH_RESULT.volume %][% END %] [% IF ( SEARCH_RESULT.volumeddesc ) %], [% SEARCH_RESULT.volumeddesc %][% END %]
521                                 </p>
522                                 [% IF ( SEARCH_RESULT.summary ) %]
523                                         [% IF ( SEARCH_RESULT.author ) %]
524                                             <a href="/cgi-bin/koha/catalogue/search.pl?idx=au&amp;q=[% SEARCH_RESULT.author |url %]" title="Search for this Author">[% SEARCH_RESULT.author %]</a>
525                                         [% ELSE %]
526                                             &nbsp;
527                                         [% END %]
528                                     <p>
529                                     [% UNLESS ( item_level_itypes ) %]
530                                     [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %]
531                                     <img src="[% SEARCH_RESULT.imageurl %]" title="[% SEARCH_RESULT.description %]" style="float: left; margin: .1em;" alt="[% SEARCH_RESULT.description %]" />
532                                     [% END %]
533                                     [% SEARCH_RESULT.description %]
534                                     [% END %]
535                                     [% SEARCH_RESULT.summary %]</p>
536                                 [% ELSE %]
537                                     <p>
538                                     [% UNLESS ( item_level_itypes ) %]
539                                     [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %]
540                                     <img src="[% SEARCH_RESULT.imageurl %]" title="[% SEARCH_RESULT.description %]" style="float: left; margin: .1em;" alt="" />
541                                     [% END %]
542                                     [% END %]
543
544                                         [% IF ( SEARCH_RESULT.author ) %]
545                                             <a href="/cgi-bin/koha/catalogue/search.pl?idx=au&amp;q=[% SEARCH_RESULT.author |url %]" title="Search for this Author">[% SEARCH_RESULT.author %]</a>
546                                         [% ELSE %]
547                                             &nbsp;
548                                         [% END %]
549                                         Description:
550                                         <span class="results_imprint">[% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place %] [% END %]
551                                         [% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode %][% END %] [% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %] [% ELSIF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate %][% END %]</span>
552                                                                                 [% IF ( SEARCH_RESULT.edition ) %]<span class="results_edition">Edition: [% SEARCH_RESULT.edition %]</span>[% END %]
553                                         <span class="results_physicaldesc">[% IF ( SEARCH_RESULT.pages ) %]: [% SEARCH_RESULT.pages %][% END %]
554                                         [% IF ( SEARCH_RESULT.size ) %] ; [% SEARCH_RESULT.size %][% END %]</span> [% IF ( SEARCH_RESULT.isbn ) %]<span class="results_isbn">ISBN: [% SEARCH_RESULT.isbn | replace('\s\|', ', ')%]</span>[% END %]
555                                         <span class="results_itemtype">[% SEARCH_RESULT.description %]</span>
556                                         [% IF ( SEARCH_RESULT.timestamp ) %] <i>(modified on [% SEARCH_RESULT.timestamp %])</i>[% END %]
557                                         [% IF ( SEARCH_RESULT.cn_class ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% SEARCH_RESULT.cn_class |uri %]%22">[% SEARCH_RESULT.cn_class %]</a>][% END %]
558                                     </p>
559                                     [% IF ( SEARCH_RESULT.searchhighlightblob ) %]<p class="searchhighlightblob">[% SEARCH_RESULT.searchhighlightblob %]</p>[% END %]
560
561                                 [% END %]
562                                 [% END %]
563                                   <p class="hold">[% IF ( SEARCH_RESULT.norequests ) %]
564                                   <span class="noholdstext">No holds allowed</span>
565                               [% ELSE %]
566                                   <a id="reserve_[% SEARCH_RESULT.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Holds</a>
567                                   [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]&amp;findborrower=[% holdfor_cardnumber %]">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %]
568                               [% END %]
569                           [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
570                           | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit record</a>
571                           [% END %]
572                           [% IF ( CAN_user_editcatalogue_edit_items ) %]
573                           | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit items</a>
574                           [% END %]</p>
575                                 </td>
576
577                                 <td><div class="availability">
578                                     [% IF ( SEARCH_RESULT.items_count ) %]
579                                         <strong>
580                                             [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %]
581                                                 <span class="blocker inaccurate-item-statuses" title="Item statuses may be inaccurate. Please view the record details for accurate item statuses">
582                                             [% END %]
583
584                                             [% SEARCH_RESULT.items_count %] [% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %]
585
586                                             [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %]
587                                                 </span>
588                                             [% END %]
589                                         </strong>
590
591                                     [% IF ( SEARCH_RESULT.availablecount ) %]
592                                     <ul>
593                                     [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %]
594
595                                         [% IF item_level_itypes && !noItemTypeImages && available_items_loo.imageurl %]
596                                         <li style="list-style: none; list-style-type: none;">
597                                           <img src="[% available_items_loo.imageurl %]" title="[% available_items_loo.description %]" alt="[% available_items_loo.description %]" />
598                                         [% ELSE %]
599                                         <li>
600                                         [% END %]
601                                         [% IF ( available_items_loo.branchname ) %][% available_items_loo.branchname %][% END %]
602                                         [% IF ( available_items_loo.location ) %][% available_items_loo.location %][% END %]
603                                         [% IF ( available_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% available_items_loo.itemcallnumber |uri %]%22">[% available_items_loo.itemcallnumber %]</a>][% END %]
604                                         ([% available_items_loo.count %])
605                                         [% IF item_level_itypes && available_items_loo.description %]
606                                         <br/>[% available_items_loo.description %]
607                                         [% END %]
608                                         </li>
609                                     [% END %]
610                                     </ul>
611                                     [% END %]
612
613                                    [% IF ( SEARCH_RESULT.onloancount ) %]
614                                    <span class="status">[% SEARCH_RESULT.onloancount %] on loan:</span>
615                                     <ul>
616                                     [% FOREACH onloan_items_loo IN SEARCH_RESULT.onloan_items_loop %]
617                                         [% IF item_level_itypes && !noItemTypeImages && onloan_items_loo.imageurl %]
618                                         <li style="list-style: none; list-style-type: none;">
619                                           <img src="[% onloan_items_loo.imageurl %]" title="[% onloan_items_loo.description %]" alt="[% onloan_items_loo.description %]" />
620                                         [% ELSE %]
621                                         <li>
622                                         [% END %]
623                                         [% IF ( onloan_items_loo.branchname ) %][% onloan_items_loo.branchname %][% END %]
624                                         [% IF ( onloan_items_loo.location ) %][% onloan_items_loo.location %][% END %]
625                                         [% IF ( onloan_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% onloan_items_loo.itemcallnumber |uri %]%22">[% onloan_items_loo.itemcallnumber %]</a>][% END %]
626                                         ([% onloan_items_loo.count %][% IF ( onloan_items_loo.longoverdue ) %], [% onloan_items_loo.longoverdue %] long overdue[% END %]) date due: [% onloan_items_loo.due_date %]
627                                         [% IF item_level_itypes && onloan_items_loo.description %]
628                                         <br/>[% onloan_items_loo.description %]
629                                         [% END %]
630                                         </li>
631                                     [% END %]
632                                     </ul>
633                                     [% END %]
634
635                                     [% IF ( SEARCH_RESULT.othercount ) %]
636                                     <span class="unavailable">[% SEARCH_RESULT.othercount %] unavailable:</span>
637                                     <ul>
638                                     [% FOREACH other_items_loo IN SEARCH_RESULT.other_items_loop %]
639                                         [% IF item_level_itypes && !noItemTypeImages && other_items_loo.imageurl %]
640                                         <li style="list-style: none; list-style-type: none;">
641                                           <img src="[% other_items_loo.imageurl %]" title="[% other_items_loo.description %]" alt="[% other_items_loo.description %]" />
642                                         [% ELSE %]
643                                         <li>
644                                         [% END %]
645                                         [% IF ( other_items_loo.branchname ) %][% other_items_loo.branchname %][% END %]
646                                         [% IF ( other_items_loo.location ) %][% other_items_loo.location %][% END %]
647                                         [% IF ( other_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% other_items_loo.itemcallnumber |uri %]%22">[% other_items_loo.itemcallnumber %]</a>][% END %]
648                                         [% IF ( other_items_loo.withdrawn ) %](Withdrawn)[% END %]
649                                         [% IF ( other_items_loo.itemlost ) %](Lost)[% END %]
650                                         [% IF ( other_items_loo.damaged ) %](Damaged)[% END %]
651                                         [% IF ( other_items_loo.intransit ) %](In transit)[% END %]
652                                         [% IF ( other_items_loo.onhold ) %](On hold)[% END %]
653                                         [% IF ( other_items_loo.notforloan ) %][% other_items_loo.notforloan %][% END %]
654                                         ([% other_items_loo.count %])
655                                         [% IF item_level_itypes && other_items_loo.description %]
656                                         <br/>[% other_items_loo.description %]
657                                         [% END %]
658                                         </li>
659                                     [% END %]
660                                     </ul>
661                                     [% END %]
662                                     [% ELSE %]
663                                     [% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS.count ) %]
664                                     <strong id="altholdings_heading">Other holdings:</strong>
665                                     <ul>
666                                     [% FOREACH ALTERNATEHOLDING IN SEARCH_RESULT.ALTERNATEHOLDINGS %]
667                                     <li id="alternateholdings">[% ALTERNATEHOLDING.holding %]</li>
668                                     [% END %]
669                                     </ul>
670                                     [% ELSE %]
671                                     <span class="unavailable">No items</span>
672                                     [% END %]
673                                     [% END %] <!-- /items count -->
674                                     </div></td>
675
676                             </tr>
677                         [% END %]
678                 </table>
679                 </form>
680                 </div>
681         [% END %]
682         [% INCLUDE 'page-numbers.inc' %]
683     [% ELSE %]
684     <!-- No Results Found -->
685     [% END %]
686 [% IF ( outer_sup_results_loop ) %]
687 </div>
688 <div class="yui-u">
689 [% FOREACH outer_sup_results_loo IN outer_sup_results_loop %]
690 <!-- <div class="yui-b"> -->
691     [% IF ( outer_sup_results_loo.inner_sup_results_loop ) %]
692         [% outer_sup_results_loo.servername %]
693         [% FOREACH inner_sup_results_loo IN outer_sup_results_loo.inner_sup_results_loop %]
694         <div><a href="/cgi-bin/koha/catalogue/search.pl?[% inner_sup_results_loo.query_cgi %][% inner_sup_results_loo.limit_cgi |html %][% inner_sup_results_loo.sort_by %][% inner_sup_results_loo.link %]">[% inner_sup_results_loo.title |html %]</a></div>
695         [% END %]
696     [% END %]
697 <!-- </div> -->
698 [% END %]
699 </div>
700 </div>
701 [% END %]
702
703 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
704     <!-- Value will be set here by placeHold() -->
705     <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
706     <input type="hidden" name="findborrower" id="holdFor" value="" />
707     <input type="hidden" name="multi_hold" value="1"/>
708 </form>
709
710 <form id="list_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
711     <!-- Value will be set here by addToList() -->
712     <input id="list_form_biblios" type="hidden" name="biblionumbers" value="" />
713     <input type="hidden" name="multi_listadd" value="1"/>
714 </form>
715
716 </div>
717 </div>
718 <div class="yui-b">
719 [% INCLUDE 'facets.inc' %]
720 </div>
721 </div>
722 [% INCLUDE 'intranet-bottom.inc' %]