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