From 9e14771ea201343bf4ecb052452a197015d3efe6 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 6 Nov 2025 05:22:04 +0000 Subject: [PATCH] Bug 41078: Add lightbox to OPAC Lists for cover images This change adds the lightbox from OPAC search results to OPAC lists for cover images. Test plan: 0. Enable the following system preferences: - OPACAmazonCoverImages - GoogleJackets - OpenLibraryCovers 1. Using KTD, go to /cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1 2. Note that the lightbox for cover images which displays one cover at a time 3. Create a public list based off those search results 4. Go to that list and note that the 3 cover images just display all at the same time, which does not look good 5. Apply the patch 6. Refresh the page for the public list results 7. Note that the lightbox is now used like in OPAC search results --- .../bootstrap/en/modules/opac-results.tt | 131 +------------- .../bootstrap/en/modules/opac-shelves.tt | 144 ++++++--------- .../opac-tmpl/bootstrap/js/cover_images.js | 165 ++++++++++++++++++ 3 files changed, 221 insertions(+), 219 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/js/cover_images.js 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 a94c8915a27..1146cffb53c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -486,6 +486,7 @@ const virtualshelves = [% ( virtualshelves ) ? 1 : 0 | html %]; [% Asset.js("js/results-list.js") | $raw %] + [% Asset.js("js/cover_images.js") | $raw %] [% Asset.js("js/results-list.js") | $raw %] + [% Asset.js("js/cover_images.js") | $raw %]