The lightbox gallery is used in the OPAC on the detail page and the search results page, but not the shelves/lists results page. In the list results, it still has the old clunky display for multiple covers.
I'm actually going to change this to a bug from enhancement, because of the inconsistency between the detail page, search results, and list results. It looks like the list results are broken really.
By essentially copying the method from bug 26933 and refactoring a bit of Javascript from there, I think that I have it working in Lists now too There is a little bit of duplication which could probably be optimised, but I think it's good enough for now.
Created attachment 189142 [details] [review] 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
I'm seeing cover images on opac-detail.pl but not in search results or lists. The search results and list contents pages show this js error: Uncaught ReferenceError: verify_cover_images is not defined
(In reply to Owen Leonard from comment #4) > I'm seeing cover images on opac-detail.pl but not in search results or > lists. The search results and list contents pages show this js error: > > Uncaught ReferenceError: verify_cover_images is not defined Thanks for that. Looks like I have the fail locally but forgot to "git add" it. Oops! I'll get that fixed up pronto.
(In reply to David Cook from comment #5) > Thanks for that. Looks like I have the fail locally but forgot to "git add" > it. Oops! I'll get that fixed up pronto. "file" not "fail". I moved "function verify_cover_images" into a JS file so it could be shared between the two templates.
Created attachment 189246 [details] [review] 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
Created attachment 189319 [details] [review] 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 Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 189320 [details] [review] Bug 41078: (follow-up) Use __() instead of _() Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Thanks, Owen. You're a legend.
Created attachment 189474 [details] [review] 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 Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Created attachment 189475 [details] [review] Bug 41078: (follow-up) Use __() instead of _() Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
please add release notes
Nice work everyone! Pushed to main for 25.11
Nice work everyone! Pushed to 25.05.x
Not applied to 24.11.x for UI stability in LTS