From 6910401eb63ac538c21563680df0bea58ad23a63 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 28 Feb 2019 18:55:38 -0300 Subject: [PATCH] Bug 22445: Custom cover images - opac reviews Test plan: - enable OpacShowRecentComments - make a comment (OPAC) - approve it (staff) - click 'Recent comments' (OPAC) => You should see the custom cover Sponsored-by: Orex Digital --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt | 5 +++++ opac/opac-showreviews.pl | 2 ++ 2 files changed, 7 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt index 80d55effde..21b6d0a63e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt @@ -148,6 +148,11 @@ No cover image available [% END %] [% END %] + + [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %] + Cover image + [% END %] + [% END # / FOREACH review %] diff --git a/opac/opac-showreviews.pl b/opac/opac-showreviews.pl index fc6dc6cac1..fc522478fb 100755 --- a/opac/opac-showreviews.pl +++ b/opac/opac-showreviews.pl @@ -107,6 +107,8 @@ for my $result (@$reviews){ $result->{notes} = $biblioitem->notes; $result->{timestamp} = $biblioitem->timestamp; + $result->{biblio_object} = $biblio; # TODO Use this variable directly in the template + my $patron = Koha::Patrons->find( $result->{borrowernumber} ); if ( $patron ) { $result->{borrtitle} = $patron->title; -- 2.11.0