Bug 26933 - Improve handling of multiple covers on catalog search results in the OPAC
Summary: Improve handling of multiple covers on catalog search results in the OPAC
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
: 7669 9991 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-11-05 04:30 UTC by David Nind
Modified: 2024-04-11 13:12 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Screenshots - Multiple cover images displayed in the OPAC (327.10 KB, application/pdf)
2020-11-05 04:30 UTC, David Nind
Details
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC (28.39 KB, patch)
2024-04-10 17:46 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC (27.37 KB, patch)
2024-04-11 10:29 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Nind 2020-11-05 04:30:18 UTC
Created attachment 113028 [details]
Screenshots - Multiple cover images displayed in the OPAC

If multiple cover image sources are enabled for the OPAC, multiple images are displayed in search results and record detail pages.

See the attached examples.

To recreate:

1. Enable Amazon (AmazonCoverImages), Google (GoogleJackets), Open Library (OpenLibraryCovers), and local cover images (LocalCoverImages).
2. Search on the OPAC for perl.
3. Note that on the search results pages and record details pages that multiple images are displayed.

I'm assuming here that it is valid to have multiple cover image sources enabled.
Comment 1 Andrew Fuerste-Henry 2021-10-28 15:58:47 UTC
Bug 25846 establishes a design precedent for this on the staff side.
Comment 2 Owen Leonard 2022-07-11 16:18:15 UTC
Since the OPAC detail page has already been upgraded to handle multiple covers like the staff interface has, I'm re-titling this bug to cover only OPAC search results.
Comment 3 David Cook 2022-08-22 03:15:05 UTC
*** Bug 9991 has been marked as a duplicate of this bug. ***
Comment 4 David Cook 2022-08-22 03:30:19 UTC
*** Bug 7669 has been marked as a duplicate of this bug. ***
Comment 5 Owen Leonard 2024-04-10 17:46:09 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2024-04-10 17:51:34 UTC
This patch is incomplete in that custom cover images (the CustomCoverImages system preference) will not display in search results. opac-detail.tt has access to biblio.custom_cover_image_url, but the same information isn't available in search results as far as I can tell.

I could use help exposing that information to the template.

I had originally tried to implement this feature by creating a common include file and common JS file so that both search results and the detail page could share code. I think that should still be a future change.
Comment 7 David Cook 2024-04-11 07:08:28 UTC
(In reply to Owen Leonard from comment #6)
> This patch is incomplete in that custom cover images (the CustomCoverImages
> system preference) will not display in search results. opac-detail.tt has
> access to biblio.custom_cover_image_url, but the same information isn't
> available in search results as far as I can tell.
> 
> I could use help exposing that information to the template.

Prior to the patch, there was this line:

[% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]

I imagine you could bang that into a data attribute or something and then go over it in the Javascript?
Comment 8 Owen Leonard 2024-04-11 10:29:17 UTC
Created attachment 164669 [details] [review]
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC

This patch implements a book cover slider widget for cover images in
search results, matching the way we show covers on the detail page.

To test, apply the page and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Enable multiple cover image services. The patch was developed with these
services available:

    - Amazon
    - Local cover images (including multiple local cover images)
    - Coce (serving up Amazon, Google, and OpenLibrary images)
    - OpenLibrary
    - Baker & Taylor
    - Google
    - Custom cover images (the CustomCoverImages preference)

Perform a variet of searches and confirm that cover images are
displaying correctly, whether there be 0, 1, 2, or more covers
available for each.
Comment 9 Owen Leonard 2024-04-11 10:31:14 UTC
(In reply to David Cook from comment #7)

> Prior to the patch, there was this line

Thanks David I totally missed that!