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: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Laura Escamilla
URL:
Keywords:
: 7669 9991 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-11-05 04:30 UTC by David Nind
Modified: 2024-11-18 18:29 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds the slider widget for multiple cover images on the OPAC search results page (when multiple sources enabled), matching the way covers display on the detail page.
Version(s) released in:
24.11.00
Circulation function:


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
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC (29.95 KB, patch)
2024-04-29 18:12 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC (29.99 KB, patch)
2024-04-30 01:56 UTC, David Nind
Details | Diff | Splinter Review
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC (29.84 KB, patch)
2024-06-17 16:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC (29.91 KB, patch)
2024-06-20 11:45 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC (30.06 KB, patch)
2024-07-25 16:53 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC (30.06 KB, patch)
2024-08-23 17:45 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC (30.13 KB, patch)
2024-09-14 12:50 UTC, Laura Escamilla
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!
Comment 10 David Nind 2024-04-29 08:56:40 UTC
The patch no longer applies 8-(...

git bz apply 26933

Bug 26933 - Improve handling of multiple covers on catalog search results in the OPAC

164669 - Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC
Using index info to reconstruct a base tree...
M	koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
M	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
Auto-merging koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
error: Failed to merge in the changes.
Patch failed at 0001 Bug 26933: Improve handling of multiple covers on catalog search results in the OPAC
Comment 11 Owen Leonard 2024-04-29 18:12:33 UTC
Created attachment 165794 [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
OPAC search results, matching the way we show covers on the detail page.

To test, apply the page and rebuild the OPAC 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
    - 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.

Sponsored-by: Athens County Public Libraries
Comment 12 David Nind 2024-04-30 01:56:51 UTC
Created attachment 165822 [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
OPAC search results, matching the way we show covers on the detail page.

To test, apply the page and rebuild the OPAC 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
    - 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.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 13 David Nind 2024-04-30 02:01:11 UTC
Thanks Owen!

This looks really nice.

David
Comment 14 Owen Leonard 2024-06-17 16:58:02 UTC
Created attachment 167794 [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
OPAC search results, matching the way we show covers on the detail page.

To test, apply the page and rebuild the OPAC 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
    - 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.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 15 Thibaud Guillot (thibaud_g) 2024-06-20 11:45:28 UTC
Created attachment 167935 [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
OPAC search results, matching the way we show covers on the detail page.

To test, apply the page and rebuild the OPAC 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
    - 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.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Thibaud Guillot <thibaud.guillot@biblibre.com>
Comment 16 Owen Leonard 2024-07-25 16:53:35 UTC
Created attachment 169601 [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
OPAC search results, matching the way we show covers on the detail page.

To test, apply the page and rebuild the OPAC 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
    - 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.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 17 Owen Leonard 2024-08-23 17:45:29 UTC
Created attachment 170656 [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
OPAC search results, matching the way we show covers on the detail page.

To test, apply the page and rebuild the OPAC 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
    - 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.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 18 Laura Escamilla 2024-09-14 12:50:37 UTC
Created attachment 171508 [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
OPAC search results, matching the way we show covers on the detail page.

To test, apply the page and rebuild the OPAC 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
    - 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.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 19 Laura Escamilla 2024-09-14 12:51:28 UTC
This looks great, Owen! The QA tool was also very happy so I'm passing QA. Thanks!
Comment 20 Katrin Fischer 2024-09-16 11:48:55 UTC
Pushed for 24.11!

Well done everyone, thank you!