From 71b1afd06ecd28886c15bfb86b6fda22c8ba4441 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 1 Mar 2019 08:01:05 -0300 Subject: [PATCH] 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 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 --- C4/Search.pm | 2 ++ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/C4/Search.pm b/C4/Search.pm index 65f514498f..08f608648b 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -2298,6 +2298,8 @@ sub searchResults { $oldbiblio->{'alternateholdings_count'} = $alternateholdingscount; } + $oldbiblio->{biblio_object} = Koha::Biblios->find( $oldbiblio->{biblionumber} ); + push( @newresults, $oldbiblio ); } diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index 15399e5828..a7e34b2219 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -322,6 +322,15 @@ [% END %] [% END %] + [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %] + [% IF ( OPACURLOpenInNewWindow ) %] + Cover image + [% ELSE %] + Cover image + [% END %] + [% END %] + + [% IF ( IDreamBooksResults && SEARCH_RESULT.normalized_isbn ) %]