Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance...
[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
187 });
188
189
190 [% IF ( query_desc ) %]function highlightOff() {
191     toHighlight.removeHighlight();
192     $(".highlight_toggle").toggle();
193 }
194 function highlightOn() {
195     var x;
196     for (x in q_array) {
197         q_array[x] = q_array[x].toLowerCase();
198         var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
199         if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
200             toHighlight.highlight(q_array[x]);
201         }
202     }
203     $(".highlight_toggle").toggle();
204 }[% END %]
205
206 function selectAll () {
207     $(".selection").attr("checked", "checked");
208 }
209 function clearAll () {
210     $(".selection").removeAttr("checked");
211 }
212 function placeHold () {
213     var checkedItems = $(".selection:checked");
214     if ($(checkedItems).size() == 0) {
215         alert(MSG_NO_ITEM_SELECTED);
216         return false;
217     }
218     var bibs = "";
219     var badBibs = false;
220     $(checkedItems).each(function() {
221         var bib = $(this).val();
222         if ($("#reserve_" + bib).size() == 0) {
223             alert(MSG_NON_RESERVES_SELECTED);
224             badBibs = true;
225             return false;
226         }
227         bibs += bib + "/";
228     });
229     if (badBibs) {
230         return false;
231     }
232     $("#hold_form_biblios").val(bibs);
233     $("#hold_form").submit();
234     return false;
235 }
236
237 function forgetPatron(){
238     $.removeCookie("holdfor", { path: '/' });
239     $(".holdforlink").remove();
240     $("#placeholdc").html("<a class=\"btn btn-mini placehold\" href=\"#\"><i class=\"fa fa-sticky-note-o\"></i> "+_("Place hold")+"</a>");
241 }
242
243 function addToList () {
244     var checkedItems = $(".selection:checked");
245     if ($(checkedItems).size() == 0) {
246         alert(MSG_NO_ITEM_SELECTED);
247         return false;
248     }
249     var bibs = "";
250     $(checkedItems).each(function() {
251         bibs += $(this).val() + "/";
252     });
253
254     var url = "/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumbers=" + bibs;
255         window.open(url, 'Add_to_virtualshelf', 'width=500, height=400, toolbar=false, scrollbars=yes');
256     return false;
257 }
258
259 /* this function open a popup to search on z3950 server.  */
260 function PopupZ3950() {
261     var strQuery = GetZ3950Terms();
262     if(strQuery){
263         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');
264     }
265 }
266 /* provide Z3950 search points */
267 function GetZ3950Terms(){
268         var strQuery="&frameworkcode=";
269         [% FOREACH z3950_search_param IN z3950_search_params %]
270         strQuery += "&" + "[% z3950_search_param.name |uri %]" + "=" + "[% z3950_search_param.value |uri %]";
271         [% END %]
272         return strQuery;
273 }
274
275 var holdFor = function (){
276     $("#holdFor").val("");
277     placeHold();
278 }
279 var holdForPatron = function () {
280     $("#holdFor").val("[% holdfor_cardnumber %]");
281     placeHold();
282 }
283 //]]>
284 </script>
285 </head>
286 <body id="catalog_results" class="catalog">
287 [% INCLUDE 'header.inc' %]
288 [% INCLUDE 'cat-search.inc' %]
289
290 <div id="breadcrumbs">
291          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
292 &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
293 &rsaquo; Search [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc | html %]'[% END %]
294 </div>
295
296 <div id="doc3" class="yui-t1">
297    <div id="bd">
298     <div id="yui-main">
299     <div class="yui-b">
300
301     [% IF ( outer_sup_results_loop ) %]
302     <div class="yui-ge">
303     <div class="yui-u first">
304     [% END %]
305
306     [% IF ( koha_spsuggest ) %]
307         <div style="font-size: 12px;">Did you mean:
308             <ul style="list-style: none;">
309             [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
310             <li>
311                 <a href="/cgi-bin/koha/catalogue/search.pl?q=[% SPELL_SUGGES.spsuggestion %]">[% SPELL_SUGGES.spsuggestion %]</a>
312             </li>
313             [% END %]
314             </ul>
315         </div>
316     [% END %]
317
318     [% IF ( total ) %]
319         <div id="searchheader">
320             <form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="sortbyform">
321                 [% IF ( searchdesc ) %]
322                     [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
323                     <input type="hidden" name="[% QUERY_INPUT.input_name |html %]" value="[% QUERY_INPUT.input_value |html %]"/>
324                     [% END %]
325                     [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
326                     <input type="hidden" name="[% LIMIT_INPUT.input_name |html %]" value="[% LIMIT_INPUT.input_value |html %]"/>
327                     [% END %]
328                 [% END %]
329                 <!-- RE-SORT START -->
330                     <label for="sort_by">Sort By: </label>
331                     <select id="sort_by" name="sort_by">
332                     [% INCLUDE 'resort_form.inc' %]
333                     </select>
334                     <input type="submit" value="Go" />
335                 <!-- RESORT END -->
336             </form>
337             <h3>
338                 [% 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;
339             </h3>
340             <div id="selection_ops" class="cartlist" style="display:none">
341                 <a href="#" onclick="selectAll(); return false;">Select all</a>
342                 |
343                 <a href="#" onclick="clearAll(); return false;">Clear all</a>
344                 |
345                 <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a>
346                 <a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a>
347                 |
348                 <span class="addto"></span>
349                 [% IF ( CAN_user_reserveforothers && DisplayMultiPlaceHold ) %]
350                 [% IF ( holdfor ) %]
351                     <div id="placeholdc" class="btn-group">
352                         <button class="btn btn-mini placehold"><i class="fa fa-sticky-note-o"></i> Place hold</button>
353                         <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">
354                         <span class="caret"></span>
355                         </button>
356                         <ul class="dropdown-menu">
357                             <li><a href="#" class="placehold">Place hold</a></li>
358                             <li><a href="#" class="placeholdfor">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></li>
359                             <li class="divider"></li>
360                             <li><a href="#" id="forgetholdfor">Forget  [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></li>
361                         </ul>
362                     </div>
363                 [% ELSE %]
364                     <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>
365                 [% END %]
366                 [% END %]
367
368                 [% 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 %]
369             </div>
370         </div>
371     [% ELSE %]
372         <div id="searchheader">
373                         <form method="post" name="fz3950" class="fz3950bigrpad">
374                                 <span id="z3950searchc"><input type="button" id="z3950search" value="Z39.50 Search" onclick="PopupZ3950(); return false;" /></span>
375                         </form>
376             <h3>No results found</h3>
377         [% IF ( searchdesc ) %]
378             <p>
379                 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 %].
380             </p>
381         [% ELSE %]
382             <p>You did not specify any search criteria.</p>
383         [% END %]
384                 </div>
385     [% END %]
386
387     [% IF ( query_error ) %]
388         <div class="dialog alert"><p><strong>Error:</strong> [% query_error %]</p></div>
389     [% END %]
390
391     <!-- Search Results Table -->
392     [% IF ( total ) %]
393         [% IF ( scan ) %]
394             <h1>Scan index:</h1>
395             <form action="/cgi-bin/koha/catalogue/search.pl" method="get">
396             <table>
397                 <tr>
398                     <td>
399                         Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="" />
400                     </td>
401                 </tr>
402                 <tr>
403                     <td>
404                         <label for="scan-index">Indexed in:</label>
405                         <select name="idx" id="scan-index">
406                             <option value="">Any word</option>
407                             [% IF ( ms_anycommaphr) %]<option selected="selected" value="any,phr">Any phrase</option>
408                             [% ELSE %]<option value="any,phr">Any phrase</option>[% END %]
409                             [% IF ( ms_ti ) %]<option selected="selected" value="ti">Title</option>
410                             [% ELSE %]<option value="ti">Title</option>[% END %]
411                             [% IF ( ms_ticommaphr ) %]<option selected="selected" value="ti,phr">Title phrase</option>
412                             [% ELSE %]<option value="ti,phr">Title phrase</option>[% END %]
413                             [% IF ( ms_aucommaphr ) %]<option selected="selected" value="au,phr">Author</option>
414                             [% ELSE %]<option value="au,phr">Author</option>[% END %]
415                             [% IF ( ms_su ) %]<option selected="selected" value="su">Subject</option>
416                             [% ELSE %]<option value="su">Subject</option>[% END %]
417                             [% IF ( ms_sucommaphr ) %]<option selected="selected" value="su,phr">Subject phrase</option>
418                             [% ELSE %]<option value="su,phr">Subject phrase</option>[% END %]
419                             [% IF ( ms_se ) %]<option selected="selected" value="se">Series</option>
420                             [% ELSE %]<option value="su">Series</option>[% END %]
421                             [% IF ( ms_pb ) %]<option selected="selected" value="pb">Publisher</option>
422                             [% ELSE %]<option value="pb">Publisher</option>[% END %]
423                             [% IF ( ms_nt ) %]<option selected="selected" value="nt">Notes</option>
424                             [% ELSE %]<option value="nt">Notes</option>[% END %]
425                             [% IF ( ms_sn ) %]<option selected="selected" value="sn">ISBN</option>
426                             [% ELSE %]<option value="sn">ISBN</option>[% END %]
427                             [% IF ( ms_ss ) %]<option selected="selected" value="ss">ISSN</option>
428                             [% ELSE %]<option value="ss">ISSN</option>[% END %]
429                         </select>
430                         <input type="hidden" name="scan" value="1" />
431                     </td>
432                 </tr>
433             </table>
434             </form>
435
436             <form action="/cgi-bin/koha/catalogue/search.pl" method="get">
437             <table>
438                 <tr>
439                     <th>Term/Phrase</th>
440                     <th>Count</th>
441                 </tr>
442                 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
443                     [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
444                         <td>
445                             <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>
446                         </td>
447                         <td>
448                             [% SEARCH_RESULT.author %]
449                         </td>
450                     </tr>
451                 [% END %]
452             </table>
453             </form>
454         [% ELSE %]
455
456             <div id="searchresults">
457                 <form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form">
458                 [% IF ( searchdesc ) %]
459                 [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
460                 <input type="hidden" name="[% QUERY_INPUT.input_name |html %]" value="[% QUERY_INPUT.input_value |html %]"/>
461                 [% END %]
462                 [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
463                 <input type="hidden" name="[% LIMIT_INPUT.input_name |html %]" value="[% LIMIT_INPUT.input_value |html %]"/>
464                 [% END %]
465                 [% END %]
466
467                     <!-- TABLE RESULTS START -->
468                 <table>
469                     <tr>
470                         [% IF ( AmazonCoverImages || LocalCoverImages ) %]<th>&nbsp;</th>[% END %]
471                         <th colspan="2">Results</th>
472                         <th>Location</th>
473                     </tr>
474                         <!-- Actual Search Results -->
475                         [% SET MaxSearchResultsItemsPerRecordStatusCheck = Koha.Preference('MaxSearchResultsItemsPerRecordStatusCheck') %]
476                         [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
477                          [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
478                             [% IF ( AmazonCoverImages || LocalCoverImages ) %]
479                                 <td>
480                                     [% IF ( LocalCoverImages) %]
481                                         <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
482                                         <span title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber %]" id="local-thumbnail[% loop.count %]"></span>
483                                         </a>
484                                     [% END %]
485                                     [% IF ( AmazonCoverImages ) %]
486                                         [% IF ( SEARCH_RESULT.normalized_isbn ) %]
487                                             <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
488                                             <img src="https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />
489                                         [% ELSIF ( !LocalCoverImages ) %]
490                                             <a class="p1 no-amazon-cover" href="/cgi-bin/koha/catalogue/[% DetailPage %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
491                                             <img src="https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif" alt="" class="thumbnail" />
492                                         [% END %]
493                                         </a>
494                                     [% END %]
495                                 </td>
496                             [% END %]
497                             <td>
498                                 <input type="checkbox" class="selection" id="bib[% SEARCH_RESULT.biblionumber %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber %]" style="display:none" />
499                             </td>
500                             <td>
501                             [% IF ( SEARCH_RESULT.XSLTResultsRecord ) %]
502                 [% SEARCH_RESULT.result_number %].
503                                 [% SEARCH_RESULT.XSLTResultsRecord %]
504                             [% ELSE %]
505                                 <p>[% SEARCH_RESULT.result_number %].
506                                  [% biblionumber = SEARCH_RESULT.biblionumber %]
507
508                                 [% INCLUDE 'biblio-default-view.inc' %]
509                                             <b>[% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %]</b>
510                                             </a>
511                                         [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield %][% END %]
512                                         [% IF ( SEARCH_RESULT.seriestitle ) %][% SEARCH_RESULT.seriestitle %][% END %]
513                                         [% IF ( SEARCH_RESULT.volume ) %][% SEARCH_RESULT.volume %][% END %] [% IF ( SEARCH_RESULT.volumeddesc ) %], [% SEARCH_RESULT.volumeddesc %][% END %]
514                                 </p>
515                                 [% IF ( SEARCH_RESULT.summary ) %]
516                                         [% IF ( SEARCH_RESULT.author ) %]
517                                             <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>
518                                         [% ELSE %]
519                                             &nbsp;
520                                         [% END %]
521                                     <p>
522                                     [% UNLESS ( item_level_itypes ) %]
523                                     [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %]
524                                     <img src="[% SEARCH_RESULT.imageurl %]" title="[% SEARCH_RESULT.description %]" style="float: left; margin: .1em;" alt="[% SEARCH_RESULT.description %]" />
525                                     [% END %]
526                                     [% SEARCH_RESULT.description %]
527                                     [% END %]
528                                     [% SEARCH_RESULT.summary %]</p>
529                                 [% ELSE %]
530                                     <p>
531                                     [% UNLESS ( item_level_itypes ) %]
532                                     [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %]
533                                     <img src="[% SEARCH_RESULT.imageurl %]" title="[% SEARCH_RESULT.description %]" style="float: left; margin: .1em;" alt="" />
534                                     [% END %]
535                                     [% END %]
536
537                                         [% IF ( SEARCH_RESULT.author ) %]
538                                             <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>
539                                         [% ELSE %]
540                                             &nbsp;
541                                         [% END %]
542                                         Description:
543                                         <span class="results_imprint">[% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place %] [% END %]
544                                         [% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode %][% END %] [% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %] [% ELSIF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate %][% END %]</span>
545                                                                                 [% IF ( SEARCH_RESULT.edition ) %]<span class="results_edition">Edition: [% SEARCH_RESULT.edition %]</span>[% END %]
546                                         <span class="results_physicaldesc">[% IF ( SEARCH_RESULT.pages ) %]: [% SEARCH_RESULT.pages %][% END %]
547                                         [% 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 %]
548                                         <span class="results_itemtype">[% SEARCH_RESULT.description %]</span>
549                                         [% IF ( SEARCH_RESULT.timestamp ) %] <i>(modified on [% SEARCH_RESULT.timestamp %])</i>[% END %]
550                                         [% 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 %]
551                                     </p>
552                                     [% IF ( SEARCH_RESULT.searchhighlightblob ) %]<p class="searchhighlightblob">[% SEARCH_RESULT.searchhighlightblob %]</p>[% END %]
553
554                                     [% IF ( SEARCH_RESULT.authorised_value_images ) %]
555                                 <p>
556                                   [% FOREACH authorised_value_image IN SEARCH_RESULT.authorised_value_images %]
557                                   <img src="[% authorised_value_image.imageurl %]" alt="[% authorised_value_image.description %]" />
558                                   [% END %]
559                                 </p>
560                                 [% END %]
561
562                                 [% END %]
563                                 [% END %]
564                                   <p class="hold">[% IF ( SEARCH_RESULT.norequests ) %]
565                                   <span class="noholdstext">No holds allowed</span>
566                               [% ELSE %]
567                                   <a id="reserve_[% SEARCH_RESULT.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Holds</a>
568                                   [% 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 %]
569                               [% END %]
570                           [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
571                           | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit record</a>
572                           [% END %]
573                           [% IF ( CAN_user_editcatalogue_edit_items ) %]
574                           | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit items</a>
575                           [% END %]</p>
576                                 </td>
577
578                                 <td><div class="availability">
579                                     [% IF ( SEARCH_RESULT.items_count ) %]
580                                         <strong>
581                                             [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %]
582                                                 <span class="blocker inaccurate-item-statuses" title="Item statuses may be inaccurate. Please view the record details for accurate item statuses">
583                                             [% END %]
584
585                                             [% SEARCH_RESULT.items_count %] [% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %]
586
587                                             [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %]
588                                                 </span>
589                                             [% END %]
590                                         </strong>
591
592                                     [% IF ( SEARCH_RESULT.availablecount ) %]
593                                     <ul>
594                                     [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %]
595
596                                         [% IF item_level_itypes && !noItemTypeImages && available_items_loo.imageurl %]
597                                         <li style="list-style: none; list-style-type: none;">
598                                           <img src="[% available_items_loo.imageurl %]" title="[% available_items_loo.description %]" alt="[% available_items_loo.description %]" />
599                                         [% ELSE %]
600                                         <li>
601                                         [% END %]
602                                         [% IF ( available_items_loo.branchname ) %][% available_items_loo.branchname %][% END %]
603                                         [% IF ( available_items_loo.location ) %][% available_items_loo.location %][% END %]
604                                         [% 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 %]
605                                         ([% available_items_loo.count %])
606                                         [% IF item_level_itypes && available_items_loo.description %]
607                                         <br/>[% available_items_loo.description %]
608                                         [% END %]
609                                         </li>
610                                     [% END %]
611                                     </ul>
612                                     [% END %]
613
614                                    [% IF ( SEARCH_RESULT.onloancount ) %]
615                                    <span class="status">[% SEARCH_RESULT.onloancount %] on loan:</span>
616                                     <ul>
617                                     [% FOREACH onloan_items_loo IN SEARCH_RESULT.onloan_items_loop %]
618                                         [% IF item_level_itypes && !noItemTypeImages && onloan_items_loo.imageurl %]
619                                         <li style="list-style: none; list-style-type: none;">
620                                           <img src="[% onloan_items_loo.imageurl %]" title="[% onloan_items_loo.description %]" alt="[% onloan_items_loo.description %]" />
621                                         [% ELSE %]
622                                         <li>
623                                         [% END %]
624                                         [% IF ( onloan_items_loo.branchname ) %][% onloan_items_loo.branchname %][% END %]
625                                         [% IF ( onloan_items_loo.location ) %][% onloan_items_loo.location %][% END %]
626                                         [% 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 %]
627                                         ([% onloan_items_loo.count %][% IF ( onloan_items_loo.longoverdue ) %], [% onloan_items_loo.longoverdue %] long overdue[% END %]) date due: [% onloan_items_loo.due_date %]
628                                         [% IF item_level_itypes && onloan_items_loo.description %]
629                                         <br/>[% onloan_items_loo.description %]
630                                         [% END %]
631                                         </li>
632                                     [% END %]
633                                     </ul>
634                                     [% END %]
635
636                                     [% IF ( SEARCH_RESULT.othercount ) %]
637                                     <span class="unavailable">[% SEARCH_RESULT.othercount %] unavailable:</span>
638                                     <ul>
639                                     [% FOREACH other_items_loo IN SEARCH_RESULT.other_items_loop %]
640                                         [% IF item_level_itypes && !noItemTypeImages && other_items_loo.imageurl %]
641                                         <li style="list-style: none; list-style-type: none;">
642                                           <img src="[% other_items_loo.imageurl %]" title="[% other_items_loo.description %]" alt="[% other_items_loo.description %]" />
643                                         [% ELSE %]
644                                         <li>
645                                         [% END %]
646                                         [% IF ( other_items_loo.branchname ) %][% other_items_loo.branchname %][% END %]
647                                         [% IF ( other_items_loo.location ) %][% other_items_loo.location %][% END %]
648                                         [% 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 %]
649                                         [% IF ( other_items_loo.withdrawn ) %](Withdrawn)[% END %]
650                                         [% IF ( other_items_loo.itemlost ) %](Lost)[% END %]
651                                         [% IF ( other_items_loo.damaged ) %](Damaged)[% END %]
652                                         [% IF ( other_items_loo.intransit ) %](In transit)[% END %]
653                                         [% IF ( other_items_loo.onhold ) %](On hold)[% END %]
654                                         [% IF ( other_items_loo.notforloan ) %][% other_items_loo.notforloan %][% END %]
655                                         ([% other_items_loo.count %])
656                                         [% IF item_level_itypes && other_items_loo.description %]
657                                         <br/>[% other_items_loo.description %]
658                                         [% END %]
659                                         </li>
660                                     [% END %]
661                                     </ul>
662                                     [% END %]
663                                     [% ELSE %]
664                                     [% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS.count ) %]
665                                     <strong id="altholdings_heading">Other holdings:</strong>
666                                     <ul>
667                                     [% FOREACH ALTERNATEHOLDING IN SEARCH_RESULT.ALTERNATEHOLDINGS %]
668                                     <li id="alternateholdings">[% ALTERNATEHOLDING.holding %]</li>
669                                     [% END %]
670                                     </ul>
671                                     [% ELSE %]
672                                     <span class="unavailable">No items</span>
673                                     [% END %]
674                                     [% END %] <!-- /items count -->
675                                     </div></td>
676
677                             </tr>
678                         [% END %]
679                 </table>
680                 </form>
681                 </div>
682         [% END %]
683         [% INCLUDE 'page-numbers.inc' %]
684     [% ELSE %]
685     <!-- No Results Found -->
686     [% END %]
687 [% IF ( outer_sup_results_loop ) %]
688 </div>
689 <div class="yui-u">
690 [% FOREACH outer_sup_results_loo IN outer_sup_results_loop %]
691 <!-- <div class="yui-b"> -->
692     [% IF ( outer_sup_results_loo.inner_sup_results_loop ) %]
693         [% outer_sup_results_loo.servername %]
694         [% FOREACH inner_sup_results_loo IN outer_sup_results_loo.inner_sup_results_loop %]
695         <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>
696         [% END %]
697     [% END %]
698 <!-- </div> -->
699 [% END %]
700 </div>
701 </div>
702 [% END %]
703
704 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
705     <!-- Value will be set here by placeHold() -->
706     <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
707     <input type="hidden" name="findborrower" id="holdFor" value="" />
708     <input type="hidden" name="multi_hold" value="1"/>
709 </form>
710
711 <form id="list_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
712     <!-- Value will be set here by addToList() -->
713     <input id="list_form_biblios" type="hidden" name="biblionumbers" value="" />
714     <input type="hidden" name="multi_listadd" value="1"/>
715 </form>
716
717 </div>
718 </div>
719 <div class="yui-b">
720 [% INCLUDE 'facets.inc' %]
721 </div>
722 </div>
723 [% INCLUDE 'intranet-bottom.inc' %]