From a013374b389c320e91ab438de9e8fefdb5ca92d5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 28 Feb 2019 19:06:06 -0300 Subject: [PATCH] Bug 22445: Custom cover images - opac user (checkout list) Test plan: - Check an item out to a patron - At the OPAC loggin as this patron On the checkout list you should see the cover image. Sponsored-by: Orex Digital Signed-off-by: Michal Denar Signed-off-by: Michal Denar --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 4 ++++ opac/opac-user.pl | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index 12aad6bbe0..d28a34a9fc 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -241,6 +241,10 @@ [% END %] [% END %] + [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %] + Cover image + [% END %] + [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] [% END %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 4ef0fb3c0b..1e2b40b66a 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -33,6 +33,7 @@ use C4::Biblio; use C4::Items; use C4::Letters; use Koha::Account::Lines; +use Koha::Biblios; use Koha::Libraries; use Koha::DateUtils; use Koha::Holds; @@ -253,6 +254,8 @@ if ( $pending_checkouts->count ) { # Useless test $issue->{'imageurl'} = getitemtypeimagelocation( 'opac', $itemtypes->{$itemtype}->{'imageurl'} ); $issue->{'description'} = $itemtypes->{$itemtype}->{'description'}; } + + $issue->{biblio_object} = Koha::Biblios->find($issue->{biblionumber}); push @issuedat, $issue; $count++; @@ -309,7 +312,9 @@ if (C4::Context->preference('BakerTaylorEnabled')) { if (C4::Context->preference("OPACAmazonCoverImages") or C4::Context->preference("GoogleJackets") or C4::Context->preference("BakerTaylorEnabled") or - C4::Context->preference("SyndeticsCoverImages")) { + C4::Context->preference("SyndeticsCoverImages") or + ( C4::Context->preference('OPACCustomCoverImages') and C4::Context->preference('CustomCoverImagesURL') ) +) { $template->param(JacketImages=>1); } -- 2.11.0