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