From 101087ddcfc27ba1551b511da8a3b3e8b8c50cbb 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: Michal Denar Signed-off-by: Michal Denar --- 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.11.0