Bug 12481: Staff client detail-view "next" link is greyed out when the last search...
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / results.tt
index 84206fe..34296b6 100644 (file)
@@ -19,9 +19,9 @@ function verify_images() {
             w = this.width;
             h = this.height;
             if ((w == 1) || (h == 1)) {
-                this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
+                this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
             } else if ((this.complete != null) && (!this.complete)) {
-                this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
+                this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
             }
         }
     });
@@ -139,7 +139,8 @@ $('#sort_by').change(function() {
             [%- END -%]
         ];
         var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
-        browser.create([% SEARCH_RESULTS.first.result_number %], '[% query_cgi | uri %]', '[% limit_cgi | uri %]', '[% sort_cgi | uri %]', newresults);
+        browser.create([% SEARCH_RESULTS.first.result_number %], '[% query_cgi | uri %]', '[% limit_cgi | uri %]','[% sort_cgi | uri %]',
+               newresults, '[% total %]');
     [% END %]
     [% IF (gotoPage && gotoNumber) %]
         [% IF (gotoNumber == 'first') %]
@@ -148,6 +149,9 @@ $('#sort_by').change(function() {
             window.location = '/cgi-bin/koha/catalogue/[% gotoPage %]?biblionumber=' + [% SEARCH_RESULTS.last.biblionumber %] + '&searchid=[% searchid %]';
         [% END %]
     [% END %]
+
+[% IF LocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
+
 });
 
 
@@ -229,7 +233,7 @@ function PopupZ3950() {
 function GetZ3950Terms(){
        var strQuery="&frameworkcode=";
        [% FOREACH z3950_search_param IN z3950_search_params %]
-               strQuery += "&" + "[% z3950_search_param.name %]" + "=" + "[% z3950_search_param.encvalue %]";
+        strQuery += "&" + "[% z3950_search_param.name |uri %]" + "=" + "[% z3950_search_param.value |uri %]";
        [% END %]
        return strQuery;
 }
@@ -430,19 +434,24 @@ var holdForPatron = function () {
                     <!-- TABLE RESULTS START -->
                 <table>
                     <tr>
-                        [% IF ( AmazonCoverImages ) %]<th>&nbsp;</th>[% END %]
+                        [% IF ( AmazonCoverImages || LocalCoverImages ) %]<th>&nbsp;</th>[% END %]
                         <th colspan="2">Results</th>
                         <th>Location</th>
                     </tr>
                         <!-- Actual Search Results -->
                         [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
                          [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
-                            [% IF ( AmazonCoverImages ) %]
+                            [% IF ( AmazonCoverImages || LocalCoverImages ) %]
                                 <td>
-                                    <a class="p1" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
-                                                                       
-                                        <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" />
-                                    </a></td>
+                                    [% IF ( LocalCoverImages ) %]
+                                        <span title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber %]" id="local-thumbnail[% loop.count %]"></span>
+                                    [% END %]
+                                    [% IF ( AmazonCoverImages ) %]
+                                        <a class="p1" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber |url %]">
+                                            <img src="[% IF ( SEARCH_RESULT.normalized_isbn ) %]https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn %].01.TZZZZZZZ.jpg[% ELSE %]https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif[% END %]" alt="" class="thumbnail" />
+                                        </a>
+                                    [% END %]
+                                </td>
                             [% END %]
                             <td>
                                 <input type="checkbox" class="selection" id="bib[% SEARCH_RESULT.biblionumber %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber %]" style="display:none" />
@@ -607,7 +616,7 @@ var holdForPatron = function () {
                                     [% FOREACH ALTERNATEHOLDING IN SEARCH_RESULT.ALTERNATEHOLDINGS %]
                                     <li id="alternateholdings">[% ALTERNATEHOLDING.holding %]</li>
                                     [% END %]
-                                    </li>
+                                    </ul>
                                     [% ELSE %]
                                     <span class="unavailable">No items</span>
                                     [% END %]