Bug 25846 - Improve handling of multiple covers on catalog search results in the staff client
Summary: Improve handling of multiple covers on catalog search results in the staff cl...
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 25031
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-22 19:41 UTC by Owen Leonard
Modified: 2020-11-05 00:52 UTC (History)
2 users (show)

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


Attachments
Bug 25846: Improve handling of multiple covers on catalog search results in the staff client (21.72 KB, patch)
2020-07-07 19:17 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25846: Improve handling of multiple covers on catalog search results in the staff client (142.06 KB, patch)
2020-10-06 11:40 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25846: Improve handling of multiple covers on catalog search results in the staff client (21.54 KB, patch)
2020-11-04 17:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25846: Improve handling of multiple covers on catalog search results in the staff client (21.59 KB, patch)
2020-11-05 00:45 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2020-06-22 19:41:57 UTC
Similar to Bug 25031, I'd like to add better handling of multiple cover images to catalog search results in the staff client.
Comment 1 Owen Leonard 2020-07-07 19:17:20 UTC Comment hidden (obsolete)
Comment 2 Fridolin Somers 2020-09-29 14:18:43 UTC
Ah nice.

Sorry patch does not apply :

error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss).
error: could not build fake ancestor
Comment 3 Owen Leonard 2020-10-06 11:40:31 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2020-11-04 17:05:22 UTC Comment hidden (obsolete)
Comment 5 David Nind 2020-11-05 00:45:45 UTC
Created attachment 113027 [details] [review]
Bug 25846: Improve handling of multiple covers on catalog search results in the staff client

This patch modifies the template, JS, and CSS for the staff
interface catalog search results in order to gracefully handle multiple
cover images.

The changed version loops through any cover images which might be
embedded and checks that they are successfully loaded. Only
successfully-loaded images are shown. Only the first image is shown, and
the others can be "paged through" using generated navigation controls.

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)
 - Images from 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.

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2020-11-05 00:52:47 UTC
NOTE: I was only able to test with AmazonCoverImages and LocalCoverImages. Feel free to change back to Needs Signoff if it needs to be tested with the other services.