Bug 766: Use the new plugin to generate sort dropdown list - memberentry
[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 [% IF LocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
153
154 });
155
156
157 [% IF ( query_desc ) %]function highlightOff() {
158     toHighlight.removeHighlight();
159     $(".highlight_toggle").toggle();
160 }
161 function highlightOn() {
162     var x;
163     for (x in q_array) {
164         if ( q_array[x].length > 0 ) {
165             toHighlight.highlight(q_array[x]);
166         }
167     }
168     $(".highlight_toggle").toggle();
169 }[% END %]
170
171 function selectAll () {
172     $(".selection").attr("checked", "checked");
173 }
174 function clearAll () {
175     $(".selection").removeAttr("checked");
176 }
177 function placeHold () {
178     var checkedItems = $(".selection:checked");
179     if ($(checkedItems).size() == 0) {
180         alert(MSG_NO_ITEM_SELECTED);
181         return false;
182     }
183     var bibs = "";
184     var badBibs = false;
185     $(checkedItems).each(function() {
186         var bib = $(this).val();
187         if ($("#reserve_" + bib).size() == 0) {
188             alert(MSG_NON_RESERVES_SELECTED);
189             badBibs = true;
190             return false;
191         }
192         bibs += bib + "/";
193     });
194     if (badBibs) {
195         return false;
196     }
197     $("#hold_form_biblios").val(bibs);
198     $("#hold_form").submit();
199     return false;
200 }
201
202 function forgetPatron(){
203     $.cookie("holdfor",null, { path: "/", expires: 0 });
204     $(".holdforlink").remove();
205     $("#placeholdc").html("<a class=\"btn btn-mini placehold\" href=\"#\"><i class=\"icon-hold\"></i> "+_("Place hold")+"</a>");
206 }
207
208 function addToList () {
209     var checkedItems = $(".selection:checked");
210     if ($(checkedItems).size() == 0) {
211         alert(MSG_NO_ITEM_SELECTED);
212         return false;
213     }
214     var bibs = "";
215     $(checkedItems).each(function() {
216         bibs += $(this).val() + "/";
217     });
218
219     var url = "/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumbers=" + bibs;
220         window.open(url, 'Add_to_virtualshelf', 'width=500, height=400, toolbar=false, scrollbars=yes');
221     return false;
222 }
223
224 /* this function open a popup to search on z3950 server.  */
225 function PopupZ3950() {
226     var strQuery = GetZ3950Terms();
227     if(strQuery){
228         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');
229     }
230 }
231 /* provide Z3950 search points */
232 function GetZ3950Terms(){
233         var strQuery="&frameworkcode=";
234         [% FOREACH z3950_search_param IN z3950_search_params %]
235         strQuery += "&" + "[% z3950_search_param.name |uri %]" + "=" + "[% z3950_search_param.value |uri %]";
236         [% END %]
237         return strQuery;
238 }
239
240 var holdFor = function (){
241     $("#holdFor").val("");
242     placeHold();
243 }
244 var holdForPatron = function () {
245     $("#holdFor").val("[% holdfor_cardnumber %]");
246     placeHold();
247 }
248 //]]>
249 </script>
250 </head>
251 <body id="catalog_results" class="catalog">
252 [% INCLUDE 'header.inc' %]
253 [% INCLUDE 'cat-search.inc' %]
254
255 <div id="breadcrumbs">
256          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
257 &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
258 &rsaquo; Search [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc %]'[% END %]
259 </div>
260
261 <div id="doc3" class="yui-t1">
262    <div id="bd">
263     <div id="yui-main">
264     <div class="yui-b">
265
266     [% IF ( outer_sup_results_loop ) %]
267     <div class="yui-ge">
268     <div class="yui-u first">
269     [% END %]
270
271     [% IF ( koha_spsuggest ) %]
272         <div style="font-size: 12px;">Did you mean:
273             <ul style="list-style: none;">
274             [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
275             <li>
276                 <a href="/cgi-bin/koha/catalogue/search.pl?q=[% SPELL_SUGGES.spsuggestion %]">[% SPELL_SUGGES.spsuggestion %]</a>
277             </li>
278             [% END %]
279             </ul>
280         </div>
281     [% END %]
282
283     [% IF ( total ) %]
284         <div id="searchheader">
285             <form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="sortbyform">
286                 [% IF ( searchdesc ) %]
287                     [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
288                     <input type="hidden" name="[% QUERY_INPUT.input_name |html %]" value="[% QUERY_INPUT.input_value |html %]"/>
289                     [% END %]
290                     [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
291                     <input type="hidden" name="[% LIMIT_INPUT.input_name |html %]" value="[% LIMIT_INPUT.input_value |html %]"/>
292                     [% END %]
293                 [% END %]
294                 <!-- RE-SORT START -->
295                     <label for="sort_by">Sort By: </label>
296                     <select id="sort_by" name="sort_by">
297                     [% INCLUDE 'resort_form.inc' %]
298                     </select>
299                     <input type="submit" value="Go" />
300                 <!-- RESORT END -->
301             </form>
302             <h3>
303                 [% 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;
304             </h3>
305             <div id="selection_ops" class="cartlist" style="display:none">
306                 <a href="#" onclick="selectAll(); return false;">Select all</a>
307                 |
308                 <a href="#" onclick="clearAll(); return false;">Clear all</a>
309                 |
310                 <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a>
311                 <a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a>
312                 |
313                 <span class="addto"></span>
314                 [% IF ( CAN_user_reserveforothers && DisplayMultiPlaceHold ) %]
315                 [% IF ( holdfor ) %]
316                     <div id="placeholdc" class="btn-group">
317                         <button class="btn btn-mini placehold"><i class="icon-hold"></i> Place hold</button>
318                         <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">
319                         <span class="caret"></span>
320                         </button>
321                         <ul class="dropdown-menu">
322                             <li><a href="#" class="placehold">Place hold</a></li>
323                             <li><a href="#" class="placeholdfor">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></li>
324                             <li class="divider"></li>
325                             <li><a href="#" id="forgetholdfor">Forget  [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></li>
326                         </ul>
327                     </div>
328                 [% ELSE %]
329                     <div id="placeholdc" class="btn-group"><a class="btn btn-mini placehold" href="#"><i class="icon-hold"></i> Place hold</a></div>
330                 [% END %]
331                 [% END %]
332
333                 [% 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 %]
334             </div>
335         </div>
336     [% IF ( stopwords_removed ) %]<div><p class="tip">Ignored the following common words: "[% stopwords_removed %]"<p></div>[% END %]
337     [% ELSE %]
338         <div id="searchheader">
339                         <form method="post" name="fz3950" class="fz3950bigrpad">
340                                 <span id="z3950searchc"><input type="button" id="z3950search" value="Z39.50 Search" onclick="PopupZ3950(); return false;" /></span>
341                         </form>
342             <h3>No results found</h3>
343         [% IF ( searchdesc ) %]
344             <p>
345                 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 %].
346             </p>
347         [% ELSE %]
348             <p>You did not specify any search criteria.</p>
349         [% END %]
350                 </div>
351     [% END %]
352
353     [% IF ( query_error ) %]
354         <div class="dialog alert"><p><strong>Error:</strong> [% query_error %]</p></div>
355     [% END %]
356
357     <!-- Search Results Table -->
358     [% IF ( total ) %]
359         [% IF ( scan ) %]
360             <h1>Scan index:</h1>
361             <form action="/cgi-bin/koha/catalogue/search.pl" method="get">
362             <table>
363                 <tr>
364                     <td>
365                         Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="" />
366                     </td>
367                 </tr>
368                 <tr>
369                     <td>
370                         <label for="scan-index">Indexed in:</label>
371                         <select name="idx" id="scan-index">
372                             <option value="">Any word</option>
373                             [% IF ( ms_anycommaphr) %]<option selected="selected" value="any,phr">Any phrase</option>
374                             [% ELSE %]<option value="any,phr">Any phrase</option>[% END %]
375                             [% IF ( ms_ti ) %]<option selected="selected" value="ti">Title</option>
376                             [% ELSE %]<option value="ti">Title</option>[% END %]
377                             [% IF ( ms_ticommaphr ) %]<option selected="selected" value="ti,phr">Title phrase</option>
378                             [% ELSE %]<option value="ti,phr">Title phrase</option>[% END %]
379                             [% IF ( ms_aucommaphr ) %]<option selected="selected" value="au,phr">Author</option>
380                             [% ELSE %]<option value="au,phr">Author</option>[% END %]
381                             [% IF ( ms_su ) %]<option selected="selected" value="su">Subject</option>
382                             [% ELSE %]<option value="su">Subject</option>[% END %]
383                             [% IF ( ms_sucommaphr ) %]<option selected="selected" value="su,phr">Subject phrase</option>
384                             [% ELSE %]<option value="su,phr">Subject phrase</option>[% END %]
385                             [% IF ( ms_se ) %]<option selected="selected" value="se">Series</option>
386                             [% ELSE %]<option value="su">Series</option>[% END %]
387                             [% IF ( ms_pb ) %]<option selected="selected" value="pb">Publisher</option>
388                             [% ELSE %]<option value="pb">Publisher</option>[% END %]
389                             [% IF ( ms_nt ) %]<option selected="selected" value="nt">Notes</option>
390                             [% ELSE %]<option value="nt">Notes</option>[% END %]
391                             [% IF ( ms_sn ) %]<option selected="selected" value="sn">ISBN</option>
392                             [% ELSE %]<option value="sn">ISBN</option>[% END %]
393                             [% IF ( ms_ss ) %]<option selected="selected" value="ss">ISSN</option>
394                             [% ELSE %]<option value="ss">ISSN</option>[% END %]
395                         </select>
396                         <input type="hidden" name="scan" value="1" />
397                     </td>
398                 </tr>
399             </table>
400             </form>
401
402             <form action="/cgi-bin/koha/catalogue/search.pl" method="get">
403             <table>
404                 <tr>
405                     <th>Term/Phrase</th>
406                     <th>Count</th>
407                 </tr>
408                 [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
409                     [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
410                         <td>
411                             <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>
412                         </td>
413                         <td>
414                             [% SEARCH_RESULT.author %]
415                         </td>
416                     </tr>
417                 [% END %]
418             </table>
419             </form>
420         [% ELSE %]
421
422             <div id="searchresults">
423                 <form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form">
424                 [% IF ( searchdesc ) %]
425                 [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
426                 <input type="hidden" name="[% QUERY_INPUT.input_name |html %]" value="[% QUERY_INPUT.input_value |html %]"/>
427                 [% END %]
428                 [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS %]
429                 <input type="hidden" name="[% LIMIT_INPUT.input_name |html %]" value="[% LIMIT_INPUT.input_value |html %]"/>
430                 [% END %]
431                 [% END %]
432
433                     <!-- TABLE RESULTS START -->
434                 <table>
435                     <tr>
436                         [% IF ( AmazonCoverImages || LocalCoverImages ) %]<th>&nbsp;</th>[% END %]
437                         <th colspan="2">Results</th>
438                         <th>Location</th>
439                     </tr>
440                         <!-- Actual Search Results -->
441                         [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
442                          [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
443                             [% IF ( AmazonCoverImages || LocalCoverImages ) %]
444                                 <td>
445                                     [% IF ( LocalCoverImages ) %]
446                                         <span title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber %]" id="local-thumbnail[% loop.count %]"></span>
447                                     [% END %]
448                                     [% IF ( AmazonCoverImages ) %]
449                                         <a class="p1" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
450                                             <img src="[% IF ( SEARCH_RESULT.normalized_isbn ) %]http://images.amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn %].01.TZZZZZZZ.jpg[% ELSE %]http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif[% END %]" alt="" class="thumbnail" />
451                                         </a>
452                                     [% END %]
453                                 </td>
454                             [% END %]
455                             <td>
456                                 <input type="checkbox" class="selection" id="bib[% SEARCH_RESULT.biblionumber %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber %]" style="display:none" />
457                             </td>
458                             <td>
459                             [% IF ( SEARCH_RESULT.XSLTResultsRecord ) %]
460                 [% SEARCH_RESULT.result_number %].
461                                 [% SEARCH_RESULT.XSLTResultsRecord %]
462                             [% ELSE %]
463                                 <p>[% SEARCH_RESULT.result_number %].
464                                  [% biblionumber = SEARCH_RESULT.biblionumber %]
465
466                                 [% INCLUDE 'biblio-default-view.inc' %]
467                                             <b>[% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %]</b>
468                                             </a>
469                                         [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield %][% END %]
470                                         [% IF ( SEARCH_RESULT.seriestitle ) %][% SEARCH_RESULT.seriestitle %][% END %]
471                                         [% IF ( SEARCH_RESULT.volume ) %][% SEARCH_RESULT.volume %][% END %] [% IF ( SEARCH_RESULT.volumeddesc ) %], [% SEARCH_RESULT.volumeddesc %][% END %]
472                                 </p>
473                                 [% IF ( SEARCH_RESULT.summary ) %]
474                                         [% IF ( SEARCH_RESULT.author ) %]
475                                             <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>
476                                         [% ELSE %]
477                                             &nbsp;
478                                         [% END %]
479                                     <p>
480                                     [% UNLESS ( item_level_itypes ) %]
481                                     [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %]
482                                     <img src="[% SEARCH_RESULT.imageurl %]" title="[% SEARCH_RESULT.description %]" style="float: left; margin: .1em;" alt="[% SEARCH_RESULT.description %]" />
483                                     [% END %]
484                                     [% SEARCH_RESULT.description %]
485                                     [% END %]
486                                     [% SEARCH_RESULT.summary %]</p>
487                                 [% ELSE %]
488                                     <p>
489                                     [% UNLESS ( item_level_itypes ) %]
490                                     [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %]
491                                     <img src="[% SEARCH_RESULT.imageurl %]" title="[% SEARCH_RESULT.description %]" style="float: left; margin: .1em;" alt="" />
492                                     [% END %]
493                                     [% END %]
494
495                                         [% IF ( SEARCH_RESULT.author ) %]
496                                             <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>
497                                         [% ELSE %]
498                                             &nbsp;
499                                         [% END %]
500                                         Description:
501                                         <span class="results_imprint">[% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place %] [% END %]
502                                         [% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode %][% END %] [% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %] [% ELSIF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate %][% END %]</span>
503                                                                                 [% IF ( SEARCH_RESULT.edition ) %]<span class="results_edition">Edition: [% SEARCH_RESULT.edition %]</span>[% END %]
504                                         <span class="results_physicaldesc">[% IF ( SEARCH_RESULT.pages ) %]: [% SEARCH_RESULT.pages %][% END %]
505                                         [% 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 %]
506                                         <span class="results_itemtype">[% SEARCH_RESULT.description %]</span>
507                                         [% IF ( SEARCH_RESULT.timestamp ) %] <i>(modified on [% SEARCH_RESULT.timestamp %])</i>[% END %]
508                                         [% 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 %]
509                                     </p>
510                                     [% IF ( SEARCH_RESULT.searchhighlightblob ) %]<p class="searchhighlightblob">[% SEARCH_RESULT.searchhighlightblob %]</p>[% END %]
511
512                                     [% IF ( SEARCH_RESULT.authorised_value_images ) %]
513                                 <p>
514                                   [% FOREACH authorised_value_image IN SEARCH_RESULT.authorised_value_images %]
515                                   <img src="[% authorised_value_image.imageurl %]" alt="[% authorised_value_image.description %]" />
516                                   [% END %]
517                                 </p>
518                                 [% END %]
519
520                                 [% END %]
521                                 [% END %]
522                                   <p class="hold">[% IF ( SEARCH_RESULT.norequests ) %]
523                                   <span class="noholdstext">No holds allowed</span>
524                               [% ELSE %]
525                                   <a id="reserve_[% SEARCH_RESULT.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Holds</a>
526                                   [% 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 %]
527                               [% END %]
528                           [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
529                           | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit record</a>
530                           [% END %]
531                           [% IF ( CAN_user_editcatalogue_edit_items ) %]
532                           | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit items</a>
533                           [% END %]</p>
534                                 </td>
535
536                                 <td><div class="availability">
537                                     [% IF ( SEARCH_RESULT.items_count ) %]<strong>[% SEARCH_RESULT.items_count %]
538                                     [% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %]</strong>
539
540                                     [% IF ( SEARCH_RESULT.availablecount ) %]
541                                     <ul>
542                                     [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %]
543
544                                         [% IF item_level_itypes && !noItemTypeImages && available_items_loo.imageurl %]
545                                         <li style="list-style: none; list-style-type: none;">
546                                           <img src="[% available_items_loo.imageurl %]" title="[% available_items_loo.description %]" alt="[% available_items_loo.description %]" />
547                                         [% ELSE %]
548                                         <li>
549                                         [% END %]
550                                         [% IF ( available_items_loo.branchname ) %][% available_items_loo.branchname %][% END %]
551                                         [% IF ( available_items_loo.location ) %][% available_items_loo.location %][% END %]
552                                         [% 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 %]
553                                         ([% available_items_loo.count %])
554                                         [% IF item_level_itypes && available_items_loo.description %]
555                                         <br/>[% available_items_loo.description %]
556                                         [% END %]
557                                         </li>
558                                     [% END %]
559                                     </ul>
560                                     [% END %]
561
562                                    [% IF ( SEARCH_RESULT.onloancount ) %]
563                                    <span class="status">[% SEARCH_RESULT.onloancount %] on loan:</span>
564                                     <ul>
565                                     [% FOREACH onloan_items_loo IN SEARCH_RESULT.onloan_items_loop %]
566                                         [% IF item_level_itypes && !noItemTypeImages && onloan_items_loo.imageurl %]
567                                         <li style="list-style: none; list-style-type: none;">
568                                           <img src="[% onloan_items_loo.imageurl %]" title="[% onloan_items_loo.description %]" alt="[% onloan_items_loo.description %]" />
569                                         [% ELSE %]
570                                         <li>
571                                         [% END %]
572                                         [% IF ( onloan_items_loo.branchname ) %][% onloan_items_loo.branchname %][% END %]
573                                         [% IF ( onloan_items_loo.location ) %][% onloan_items_loo.location %][% END %]
574                                         [% 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 %]
575                                         ([% onloan_items_loo.count %][% IF ( onloan_items_loo.longoverdue ) %], [% onloan_items_loo.longoverdue %] long overdue[% END %]) date due: [% onloan_items_loo.due_date %]
576                                         [% IF item_level_itypes && onloan_items_loo.description %]
577                                         <br/>[% onloan_items_loo.description %]
578                                         [% END %]
579                                         </li>
580                                     [% END %]
581                                     </ul>
582                                     [% END %]
583
584                                     [% IF ( SEARCH_RESULT.othercount ) %]
585                                     <span class="unavailable">[% SEARCH_RESULT.othercount %] unavailable:</span>
586                                     <ul>
587                                     [% FOREACH other_items_loo IN SEARCH_RESULT.other_items_loop %]
588                                         [% IF item_level_itypes && !noItemTypeImages && other_items_loo.imageurl %]
589                                         <li style="list-style: none; list-style-type: none;">
590                                           <img src="[% other_items_loo.imageurl %]" title="[% other_items_loo.description %]" alt="[% other_items_loo.description %]" />
591                                         [% ELSE %]
592                                         <li>
593                                         [% END %]
594                                         [% IF ( other_items_loo.branchname ) %][% other_items_loo.branchname %][% END %]
595                                         [% IF ( other_items_loo.location ) %][% other_items_loo.location %][% END %]
596                                         [% 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 %]
597                                         [% IF ( other_items_loo.withdrawn ) %](Withdrawn)[% END %]
598                                         [% IF ( other_items_loo.itemlost ) %](Lost)[% END %]
599                                         [% IF ( other_items_loo.damaged ) %](Damaged)[% END %]
600                                         [% IF ( other_items_loo.intransit ) %](In transit)[% END %]
601                                         [% IF ( other_items_loo.onhold ) %](On hold)[% END %]
602                                         [% IF ( other_items_loo.notforloan ) %][% other_items_loo.notforloan %][% END %]
603                                         ([% other_items_loo.count %])
604                                         [% IF item_level_itypes && other_items_loo.description %]
605                                         <br/>[% other_items_loo.description %]
606                                         [% END %]
607                                         </li>
608                                     [% END %]
609                                     </ul>
610                                     [% END %]
611                                     [% ELSE %]
612                                     [% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS.count ) %]
613                                     <strong id="altholdings_heading">Other holdings:</strong>
614                                     <ul>
615                                     [% FOREACH ALTERNATEHOLDING IN SEARCH_RESULT.ALTERNATEHOLDINGS %]
616                                     <li id="alternateholdings">[% ALTERNATEHOLDING.holding %]</li>
617                                     [% END %]
618                                     </li>
619                                     [% ELSE %]
620                                     <span class="unavailable">No items</span>
621                                     [% END %]
622                                     [% END %] <!-- /items count -->
623                                     </div></td>
624
625                             </tr>
626                         [% END %]
627                 </table>
628                 </form>
629                 </div>
630         [% END %]
631         [% INCLUDE 'page-numbers.inc' %]
632     [% ELSE %]
633     <!-- No Results Found -->
634     [% END %]
635 [% IF ( outer_sup_results_loop ) %]
636 </div>
637 <div class="yui-u">
638 [% FOREACH outer_sup_results_loo IN outer_sup_results_loop %]
639 <!-- <div class="yui-b"> -->
640     [% IF ( outer_sup_results_loo.inner_sup_results_loop ) %]
641         [% outer_sup_results_loo.servername %]
642         [% FOREACH inner_sup_results_loo IN outer_sup_results_loo.inner_sup_results_loop %]
643         <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>
644         [% END %]
645     [% END %]
646 <!-- </div> -->
647 [% END %]
648 </div>
649 </div>
650 [% END %]
651
652 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
653     <!-- Value will be set here by placeHold() -->
654     <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
655     <input type="hidden" name="findborrower" id="holdFor" value="" />
656     <input type="hidden" name="multi_hold" value="1"/>
657 </form>
658
659 <form id="list_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
660     <!-- Value will be set here by addToList() -->
661     <input id="list_form_biblios" type="hidden" name="biblionumbers" value="" />
662     <input type="hidden" name="multi_listadd" value="1"/>
663 </form>
664
665 </div>
666 </div>
667 <div class="yui-b">
668 [% INCLUDE 'facets.inc' %]
669 </div>
670 </div>
671 [% INCLUDE 'intranet-bottom.inc' %]