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 <hayleymapley@catalyst.net.nz>
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-02-28 18:55:38 -03:00 committed by Martin Renvoize
parent 558929d85d
commit a5d3240594
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 7 additions and 0 deletions

View file

@ -150,6 +150,11 @@
<span class="no-image">No cover image available</span>
[% END %]
[% END %]
[% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
<a href="[% review.biblio_object.custom_cover_image_url | url %]"><img alt="Cover image" src="[% review.biblio_object.custom_cover_image_url | url %]" /></a>
[% END %]
</td>
</tr>
[% END # / FOREACH review %]

View file

@ -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;