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