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