Bug 16238: Use .prop() instead of .attr() for 'checked'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / results.tt
blob6e71a4121662456075b6a6d8e2248483be34272c
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 %]
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     });
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');
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     }
73 $(document).ready(function() {
74 $("#cartsubmit").click(function(){
75     cartList();
76     return false;
77 });
78 $("#z3950submit").click(function(){
79     PopupZ3950();
80     return false;
81 });
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 %]
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 %]
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         });
149  $("#tagsel_span").html("<input id=\"tagsel_tag\" class=\"submit\" type=\"submit\" value=\"Tag\"/>");
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 %]
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 %]
185 [% IF LocalCoverImages %]KOHA.LocalCover.LoadResultsCovers();[% END %]
190 [% IF ( query_desc ) %]function highlightOff() {
191     toHighlight.removeHighlight();
192     $(".highlight_toggle").toggle();
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 %]
206 function selectAll () {
207     $(".selection").prop("checked", true);
209 function clearAll () {
210     $(".selection").prop("checked", false);
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;
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>");
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     });
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;
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     }
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;
275 var holdFor = function (){
276     $("#holdFor").val("");
277     placeHold();
279 var holdForPatron = function () {
280     $("#holdFor").val("[% holdfor_cardnumber %]");
281     placeHold();
283 //]]>
284 </script>
285 </head>
286 <body id="catalog_results" class="catalog">
287 [% INCLUDE 'header.inc' %]
288 [% INCLUDE 'cat-search.inc' %]
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>
296 <div id="doc3" class="yui-t1">
297    <div id="bd">
298     <div id="yui-main">
299     <div class="yui-b">
301     [% IF ( outer_sup_results_loop ) %]
302     <div class="yui-ge">
303     <div class="yui-u first">
304     [% END %]
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 %]
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 %]
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                 <button class="btn" type="button" id="z3950submit"><i class="fa fa-search"></i> Z39.50/SRU search</button>
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 %]
387     [% IF ( query_error ) %]
388         <div class="dialog alert"><p><strong>Error:</strong> [% query_error %]</p></div>
389     [% END %]
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>
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                     <tr>
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 %]
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 %]
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                             <tr>
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 %]
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 %]
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 %]
554                                 [% END %]
555                                 [% END %]
556                                   <p class="hold">[% IF ( SEARCH_RESULT.norequests ) %]
557                                   <span class="noholdstext">No holds allowed</span>
558                               [% ELSE %]
559                                   <a id="reserve_[% SEARCH_RESULT.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Holds</a>
560                                   [% 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 %]
561                               [% END %]
562                           [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
563                           | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit record</a>
564                           [% END %]
565                           [% IF ( CAN_user_editcatalogue_edit_items ) %]
566                           | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit items</a>
567                           [% END %]</p>
568                                 </td>
570                                 <td><div class="availability">
571                                     [% IF ( SEARCH_RESULT.items_count ) %]
572                                         <strong>
573                                             [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %]
574                                                 <span class="blocker inaccurate-item-statuses" title="Item statuses may be inaccurate. Please view the record details for accurate item statuses">
575                                             [% END %]
577                                             [% SEARCH_RESULT.items_count %] [% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %]
579                                             [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %]
580                                                 </span>
581                                             [% END %]
582                                         </strong>
584                                     [% IF ( SEARCH_RESULT.availablecount ) %]
585                                     <ul>
586                                     [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %]
588                                         [% IF item_level_itypes && !noItemTypeImages && available_items_loo.imageurl %]
589                                         <li style="list-style: none; list-style-type: none;">
590                                           <img src="[% available_items_loo.imageurl %]" title="[% available_items_loo.description %]" alt="[% available_items_loo.description %]" />
591                                         [% ELSE %]
592                                         <li>
593                                         [% END %]
594                                         [% IF ( available_items_loo.branchname ) %][% available_items_loo.branchname %][% END %]
595                                         [% IF ( available_items_loo.location ) %][% available_items_loo.location %][% END %]
596                                         [% 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 %]
597                                         ([% available_items_loo.count %])
598                                         [% IF item_level_itypes && available_items_loo.description %]
599                                         <br/>[% available_items_loo.description %]
600                                         [% END %]
601                                         </li>
602                                     [% END %]
603                                     </ul>
604                                     [% END %]
606                                    [% IF ( SEARCH_RESULT.onloancount ) %]
607                                    <span class="status">[% SEARCH_RESULT.onloancount %] on loan:</span>
608                                     <ul>
609                                     [% FOREACH onloan_items_loo IN SEARCH_RESULT.onloan_items_loop %]
610                                         [% IF item_level_itypes && !noItemTypeImages && onloan_items_loo.imageurl %]
611                                         <li style="list-style: none; list-style-type: none;">
612                                           <img src="[% onloan_items_loo.imageurl %]" title="[% onloan_items_loo.description %]" alt="[% onloan_items_loo.description %]" />
613                                         [% ELSE %]
614                                         <li>
615                                         [% END %]
616                                         [% IF ( onloan_items_loo.branchname ) %][% onloan_items_loo.branchname %][% END %]
617                                         [% IF ( onloan_items_loo.location ) %][% onloan_items_loo.location %][% END %]
618                                         [% 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 %]
619                                         ([% onloan_items_loo.count %][% IF ( onloan_items_loo.longoverdue ) %], [% onloan_items_loo.longoverdue %] long overdue[% END %]) date due: [% onloan_items_loo.due_date %]
620                                         [% IF item_level_itypes && onloan_items_loo.description %]
621                                         <br/>[% onloan_items_loo.description %]
622                                         [% END %]
623                                         </li>
624                                     [% END %]
625                                     </ul>
626                                     [% END %]
628                                     [% IF ( SEARCH_RESULT.othercount ) %]
629                                     <span class="unavailable">[% SEARCH_RESULT.othercount %] unavailable:</span>
630                                     <ul>
631                                     [% FOREACH other_items_loo IN SEARCH_RESULT.other_items_loop %]
632                                         [% IF item_level_itypes && !noItemTypeImages && other_items_loo.imageurl %]
633                                         <li style="list-style: none; list-style-type: none;">
634                                           <img src="[% other_items_loo.imageurl %]" title="[% other_items_loo.description %]" alt="[% other_items_loo.description %]" />
635                                         [% ELSE %]
636                                         <li>
637                                         [% END %]
638                                         [% IF ( other_items_loo.branchname ) %][% other_items_loo.branchname %][% END %]
639                                         [% IF ( other_items_loo.location ) %][% other_items_loo.location %][% END %]
640                                         [% 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 %]
641                                         [% IF ( other_items_loo.withdrawn ) %](Withdrawn)[% END %]
642                                         [% IF ( other_items_loo.itemlost ) %](Lost)[% END %]
643                                         [% IF ( other_items_loo.damaged ) %](Damaged)[% END %]
644                                         [% IF ( other_items_loo.intransit ) %](In transit)[% END %]
645                                         [% IF ( other_items_loo.onhold ) %](On hold)[% END %]
646                                         [% IF ( other_items_loo.notforloan ) %][% other_items_loo.notforloan %][% END %]
647                                         ([% other_items_loo.count %])
648                                         [% IF item_level_itypes && other_items_loo.description %]
649                                         <br/>[% other_items_loo.description %]
650                                         [% END %]
651                                         </li>
652                                     [% END %]
653                                     </ul>
654                                     [% END %]
655                                     [% ELSE %]
656                                     [% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS.count ) %]
657                                     <strong id="altholdings_heading">Other holdings:</strong>
658                                     <ul>
659                                     [% FOREACH ALTERNATEHOLDING IN SEARCH_RESULT.ALTERNATEHOLDINGS %]
660                                     <li id="alternateholdings">[% ALTERNATEHOLDING.holding %]</li>
661                                     [% END %]
662                                     </ul>
663                                     [% ELSE %]
664                                     <span class="unavailable">No items</span>
665                                     [% END %]
666                                     [% END %] <!-- /items count -->
667                                     </div></td>
669                             </tr>
670                         [% END %]
671                 </table>
672                 </form>
673                 </div>
674         [% END %]
675         [% INCLUDE 'page-numbers.inc' %]
676     [% ELSE %]
677     <!-- No Results Found -->
678     [% END %]
679 [% IF ( outer_sup_results_loop ) %]
680 </div>
681 <div class="yui-u">
682 [% FOREACH outer_sup_results_loo IN outer_sup_results_loop %]
683 <!-- <div class="yui-b"> -->
684     [% IF ( outer_sup_results_loo.inner_sup_results_loop ) %]
685         [% outer_sup_results_loo.servername %]
686         [% FOREACH inner_sup_results_loo IN outer_sup_results_loo.inner_sup_results_loop %]
687         <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>
688         [% END %]
689     [% END %]
690 <!-- </div> -->
691 [% END %]
692 </div>
693 </div>
694 [% END %]
696 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
697     <!-- Value will be set here by placeHold() -->
698     <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
699     <input type="hidden" name="findborrower" id="holdFor" value="" />
700     <input type="hidden" name="multi_hold" value="1"/>
701 </form>
703 <form id="list_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
704     <!-- Value will be set here by addToList() -->
705     <input id="list_form_biblios" type="hidden" name="biblionumbers" value="" />
706     <input type="hidden" name="multi_listadd" value="1"/>
707 </form>
709 </div>
710 </div>
711 <div class="yui-b">
712 [% INCLUDE 'facets.inc' %]
713 </div>
714 </div>
715 [% INCLUDE 'intranet-bottom.inc' %]