Summary: | Improve handling of multiple covers on catalog search results in the staff client | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Templates | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | andrew, david, dcook, fridolin.somers, jonathan.druart |
Version: | Main | Keywords: | Manual |
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26933 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement updates the staff interface catalog search results to improve the display of multiple covers associated with each search result:
- Adlibris
- Amazon
- Google
- OpenLibrary
- Local cover images (including multiple local cover images)
- Coce (serving up Amazon, Google, and OpenLibrary images)
- Images from the CustomCoverImages preference
A single cover is now displayed for each result, with controls for scrolling through any other available cover.
|
Version(s) released in: |
21.05.00
|
Circulation function: | |||
Bug Depends on: | 25031 | ||
Bug Blocks: | |||
Attachments: |
Bug 25846: Improve handling of multiple covers on catalog search results in the staff client
Bug 25846: Improve handling of multiple covers on catalog search results in the staff client Bug 25846: Improve handling of multiple covers on catalog search results in the staff client Bug 25846: Improve handling of multiple covers on catalog search results in the staff client Bug 25846: Improve handling of multiple covers on catalog search results in the staff client Bug 25846: Improve handling of multiple covers on catalog search results in the staff client Bug 25846: (follow-up) Show "No cover image available" message |
Description
Owen Leonard
2020-06-22 19:41:57 UTC
Created attachment 106642 [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. 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 Created attachment 111294 [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. Created attachment 113015 [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. 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> 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. Created attachment 116065 [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> Created attachment 116967 [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> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 21.05, thanks to everybody involved! > - Local cover images (including multiple local cover images)
Hum, this does not work actually. Only the first image is displayed.
(In reply to Jonathan Druart from comment #10) > > - Local cover images (including multiple local cover images) > > Hum, this does not work actually. Only the first image is displayed. Nevermind, it's already how it works. We lost the "No cover image available" thumbnails. Owen, can you have a look at it please? You can attach a follow-up fix here. Created attachment 117621 [details] [review] Bug 25846: (follow-up) Show "No cover image available" message This patch restores the use of a "No cover image available" message in staff interface search results when no cover image was found by any image service. The patch also corrects markup in the search results template which was preventing the "Adlibris cover image" text from being correctly hidden. Before: https://snipboard.io/38blZ0.jpg After : https://snipboard.io/u0JDBm.jpg It was a bit nicer before as it was centered. follow-up pushed to master. Do you think it can be backported to 20.11.x ? Since Bug 25031 is in it. (In reply to Fridolin Somers from comment #16) > Do you think it can be backported to 20.11.x ? My instinct is to say that this isn't the kind of thing which should be backported, but if you disagree I'd be happy to work to make it apply. (In reply to Jonathan Druart from comment #14) > It was a bit nicer before as it was centered. It looks like the SCSS changes weren't compiled. (In reply to Owen Leonard from comment #18) > (In reply to Jonathan Druart from comment #14) > > It was a bit nicer before as it was centered. > > It looks like the SCSS changes weren't compiled. Indeed, will push it soon! (In reply to Owen Leonard from comment #17) > (In reply to Fridolin Somers from comment #16) > > Do you think it can be backported to 20.11.x ? > > My instinct is to say that this isn't the kind of thing which should be > backported, but if you disagree I'd be happy to work to make it apply. OK sure, I prefer not backport when there is not easy. And new releases need new features ;) Enhancement not pushed to 20.11.x Just backported the fix on staff.scss : Bug 25846: (20.11.x) fix cover-slides CSS Enhancement, not backported to 20.05 |