Bug 7665 - Bibs with no ISBN's show broken images for covers when using Syndetics...
authorLiz Rea <wizzyrea@gmail.com>
Wed, 7 Mar 2012 19:29:58 +0000 (13:29 -0600)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 13 Mar 2012 14:06:56 +0000 (15:06 +0100)
Patch fixes problem for syndetics + bibs with no ISBN. Also adds "no image found" capability to Syndetics results.

To test (first, contact me and I will let you use my syndetics credentials *for testing this bug only*):
* replicate bug - have a bib with an ISBN, and one without. The one with the ISBN should show a cover, the one without will show a broken image.
* apply patch
* search for the same bib - you should now see "no image available" for the one with no ISBN, and a cover image for your bib with an ISBN.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
QA Comment:  normalized spacing

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt

index 26a97a4..bf0e6cd 100644 (file)
@@ -535,10 +535,19 @@ $(document).ready(function(){
             [% IF ( OPACLocalCoverImages ) %]<span title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber %]" id="local-thumbnail[% loop.count %]"></span>[% END %]
                     [% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<img src="http://images.amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" />[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %][% END %]
 
-                                       [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %]
-                <img src="https://secure.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% SEARCH_RESULT.normalized_upc %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc %]" alt="" class="thumbnail" />
-                [% ELSE %]
-                <img src="http://www.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% SEARCH_RESULT.normalized_upc %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc %]" alt="" class="thumbnail" />[% END %][% END %][% END %]
+                               [% IF ( SyndeticsEnabled ) %]
+                                       [% IF ( SyndeticsCoverImages ) %]
+                                               [% IF SEARCH_RESULT.normalized_isbn %]
+                                                               [% IF ( using_https ) %]
+                                                       <img src="https://secure.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% SEARCH_RESULT.normalized_upc %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc %]" alt="" class="thumbnail" />
+                                               [% ELSE %]
+                                                       <img src="http://www.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% SEARCH_RESULT.normalized_upc %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc %]" alt="" class="thumbnail" />
+                                       [% END %]
+                                       [% ELSE %]
+                                               <span class="no-image">No cover image available</span>
+                                       [% END %]
+                       [% END %]
+                [% END %]
 
                 [% IF ( GoogleJackets ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<div style="block" title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
                [% IF OpenLibraryCovers %][% IF SEARCH_RESULT.normalized_isbn %]<div style="block" title="[% SEARCH_RESULT.biblionumber %]" class="[% SEARCH_RESULT.normalized_isbn %]" id="openlibrary-thumbnail[% loop.count %]"></div>[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]