From a3bcb1f25e8a6b143d9903ac6807cde8c11f4193 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 26 May 2023 17:28:50 +0000 Subject: [PATCH] Bug 33848: Enabling Coce in the OPAC breaks cover images on bibliographic detail page Bug 32412 added an additional "context" parameter to KOHA.coce.getURL. The code which pulls a Coce image for the "main" cover image slider needs to include the correct context parameter for the images to load. This patch also makes a minor correction to CSS in order to make the cover image slider "dots" change color to highlight the current slide. To test, apply the patch and rebuild the OPAC CSS. - Enable multiple cover image sources in the OPAC including Coce, e.g. Amazon, Google, OpenLibrary, etc. - Search for a title which will match multiple cover image sources. In the sample data a search for "Perl" will return good results. - Note the number of cover images loading for a title in the search results. - View the detail page for that title. There should be the same number of covers in the cover image slider. - Clicking the slider navigation dots should work to show each image, and the dot should change color to highlight the current image. Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit d313f9b963ff0e5187eb19d81ef13231e0add39d) Signed-off-by: Fridolin Somers (cherry picked from commit 4125aec704464560515fb4f1f083b4cf4705ba30) Signed-off-by: Pedro Amorim (cherry picked from commit fc3fde11d4e083bf23115d6c3533bca7037fab8b) Signed-off-by: Lucas Gass --- koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index 14caa1bcf6..5548d5632e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -708,8 +708,8 @@ th { min-height: 175px; } -.cover-slides { - background: #FFF url("../images/spinner-small.gif") center center no-repeat; +.cover-slider { + background: #FFF url( "../images/spinner-small.gif" ) center center no-repeat; .hint { font-size: 80%; diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 6802e557a2..56b74c0c35 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1772,7 +1772,7 @@ [% END %] [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %] - KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]); + KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]', $('#biblio-cover-slider') ); [% END %] [% IF OpenLibraryCovers %] -- 2.39.5