From f32d0816e4caa11b77cfa4354cd1fb212e32444e Mon Sep 17 00:00:00 2001 From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Date: Thu, 28 Feb 2019 19:13:42 -0300 Subject: [PATCH] Bug 22445: Custom cover images - search resulta (staff) Test plan: Search for bibliographic records, the custom covers should be displayed. Sponsored-by: Orex Digital Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> All test plans pass using URL in CustomcoverImages syspref Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 3fd10a5344..044f490c47 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -376,7 +376,7 @@ <!-- TABLE RESULTS START --> <table> <tr> - [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled ) %] + [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] <th> </th> [% END %] <th colspan="2">Results</th> @@ -386,7 +386,7 @@ [% SET MaxSearchResultsItemsPerRecordStatusCheck = Koha.Preference('MaxSearchResultsItemsPerRecordStatusCheck') %] [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] <tr> - [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce ) %] + [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] <td> [% IF ( LocalCoverImages) %] <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]"> @@ -416,6 +416,10 @@ [% END %] </a> [% END %] + + [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %] + <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 %]" /> + [% END %] </td> [% END # /IF( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce )%] -- 2.11.0