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