Bug 21225: (follow-up) Make SyndeticCovers work on catalog detail page
authorLucas Gass <lucas@bywatersolutions.com>
Tue, 15 Feb 2022 22:59:37 +0000 (22:59 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 8 Apr 2022 13:49:16 +0000 (15:49 +0200)
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
catalogue/detail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

index 2a635e1..612aa03 100755 (executable)
@@ -138,12 +138,17 @@ my $upc = GetNormalizedUPC($record,$marcflavour);
 my $ean = GetNormalizedEAN($record,$marcflavour);
 my $oclc = GetNormalizedOCLCNumber($record,$marcflavour);
 my $isbn = GetNormalizedISBN(undef,$record,$marcflavour);
+my $content_identifier_exists;
+if ( $isbn or $ean or $oclc or $upc ) {
+    $content_identifier_exists = 1;
+}
 
 $template->param(
     normalized_upc => $upc,
     normalized_ean => $ean,
     normalized_oclc => $oclc,
     normalized_isbn => $isbn,
+    content_identifier_exists =>  $content_identifier_exists,
 );
 
 my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } };
index 1f638e4..537185d 100644 (file)
                     [% END %]
 
                     [% IF ( SyndeticsCovers ) %]
-                        [% IF ( nomarlized_isbn || normalized_upc || normalized_oclc ) %]
+                        [% IF ( content_identifier_exists ) %]
                         <div class="cover-image" id="syndetics-bookcoverimg">
                             <a title="Syndetics cover image">
                                 <img src="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | html %]/[% Koha.Preference('SyndeticsCoverImageSize') | html %].GIF&amp;client=[% Koha.Preference('SyndeticsClientCode') | html %]&amp;type=xw10&amp;upc=[% normalized_upc | html %]&amp;oclc=[% normalized_oclc | html %]" alt="" class="thumbnail" />