Bug 22445: Custom cover images - opac results

Test plan:
Search for bibliographic records at the OPAC, the custom cover should be
displayed

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-03-01 08:01:05 -03:00 committed by Martin Renvoize
parent 2bf7ddd112
commit 71b1afd06e
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 11 additions and 0 deletions

View File

@ -2298,6 +2298,8 @@ sub searchResults {
$oldbiblio->{'alternateholdings_count'} = $alternateholdingscount;
}
$oldbiblio->{biblio_object} = Koha::Biblios->find( $oldbiblio->{biblionumber} );
push( @newresults, $oldbiblio );
}

View File

@ -322,6 +322,15 @@
[% END %]
[% END %]
[% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
[% IF ( OPACURLOpenInNewWindow ) %]
<a href="[% SEARCH_RESULT.biblio_object.custom_cover_image_url | url %]" target="_blank" rel="noreferrer"><img alt="Cover image" src="[% SEARCH_RESULT.biblio_object.custom_cover_image_url | url %]" /></a>
[% ELSE %]
<a href="[% SEARCH_RESULT.biblio_object.custom_cover_image_url | url %]"><img alt="Cover image" src="[% SEARCH_RESULT.biblio_object.custom_cover_image_url | url %]" /></a>
[% END %]
[% END %]
[% IF ( IDreamBooksResults && SEARCH_RESULT.normalized_isbn ) %]
<div class="idbresult" style="display: none;">
[% IF ( IDreamBooksReviews ) %]