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