From f6abdcabbb80337870758f0181127ac74438cf57 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 22 Oct 2019 14:58:00 +0100 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: Hayley Mapley Signed-off-by: Hugo Agud Signed-off-by: Owen Leonard Signed-off-by: Michal Denar Signed-off-by: Kyle Hall Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- 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 66a47cea6f..e342398c95 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -242,6 +242,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 8eac2478a6..9a9173c570 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; @@ -248,6 +249,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.20.1