From a5d32405942f75ea20f12725b315a1c43b451773 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 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-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 2d2df6f15d..6d0c9babd1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt @@ -150,6 +150,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 8635dd7822..09363cc1a5 100755 --- a/opac/opac-showreviews.pl +++ b/opac/opac-showreviews.pl @@ -109,6 +109,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.39.5