Bug 22445: Custom cover images - detail (staff)
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 28 Feb 2019 22:11:19 +0000 (19:11 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 22 Oct 2019 14:02:50 +0000 (15:02 +0100)
Test plan:
Staff side now, go the detail page of a bibliographic record
You should see the cover image.

Sponsored-by: Orex Digital
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

catalogue/detail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

index b4d9bae..303d709 100755 (executable)
@@ -533,6 +533,8 @@ foreach my $myorder (@allorders_using_biblio) {
     }
 }
 
+$template->param(biblio => $biblio);
+
 my $count_orders_using_biblio = scalar @orders_using_biblio ;
 $template->param (countorders => $count_orders_using_biblio);
 
index 4f6f474..21feb30 100644 (file)
         <span class="Z3988" title="[% ocoins | html %]"></span>
     [% END %]
 
-    [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce ) %]
-        <div id="catalogue_detail_biblio" class="col-xs-9">
+    [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
+        [% IF ( XSLTDetailsDisplay ) %]
+            <div id="catalogue_detail_biblio" class="col-xs-9">
+        [% ELSE %]
+            <div id="catalogue_detail_biblio" class="col-xs-9">
+        [% END %]
     [% ELSE %]
         <div id="catalogue_detail_biblio" class="col-xs-12">
     [% END %]
             </span>
         [% END %]
 
-        [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce ) %]
+        [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
         </div><div class="col-xs-3" id="bookcoverimg">
         [% IF ( LocalCoverImages ) %]
             <div title="[% biblionumber |url %]" class="[% biblionumber | html %]" id="local-thumbnail-preview"></div>
           [% END %]
             </a>
         [% END %]
+
+        [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
+            <a href="[% biblio.custom_cover_image_url | url %]"><img alt="Cover image" src="[% biblio.custom_cover_image_url | url %]" />
+        [% END %]
         [% END %]
 
 </div>