From 11bb71e32dbaa41e1772c56734fc88634ecf6cad 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 --- 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 ef81e19e7c..42cd19c0c5 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -2308,6 +2308,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 20f0f1c6fc..ae682255a6 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -310,6 +310,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 ) %]