From dbdf9176f567d29b4d0b68f0bc5b8ec508b91fa6 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: Michal Denar Signed-off-by: Michal Denar --- 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 559abea4ba..cd203f9cf8 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -2319,6 +2319,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 e6bd51b2d9..b45b4bc90b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -320,6 +320,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 ) %]