Bug 38422 - Add data-isbn and data-title to lists for plugin cover images
Summary: Add data-isbn and data-title to lists for plugin cover images
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Matt Blenkinsop
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-12 11:01 UTC by Matt Blenkinsop
Modified: 2025-01-01 23:17 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds cover images to OPAC lists, for OPAC enabled cover image sources. (Note: This currently only displays nicely with one source of cover images. With multiple sources enabled, the images are listed vertically.)
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 38422: Allow plugin cover images in OPAC lists (4.42 KB, patch)
2024-11-12 11:06 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 38422: Allow plugin cover images in OPAC lists (4.47 KB, patch)
2024-12-12 16:28 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2024-11-12 11:01:13 UTC
It isn't possible to display plugin cover images on the OPAC lists view - we need to enable the plugin method and pass the item data to the element
Comment 1 Matt Blenkinsop 2024-11-12 11:06:13 UTC
Created attachment 174401 [details] [review]
Bug 38422: Allow plugin cover images in OPAC lists

This patch updates the template to allow cover images from plugins in the OPAC list page. It adds a data-isbn and data-title attribute to the cover images element and also moves the element below the setting of the title so that we can pass that directly.

It also adds the script call to allow the plugin method to work on the page

Test plan:
1) View the patch diff and note that the data attributes have been added correctly
2) View the patch diff and note that the <a> tag has been moved below the setting of the img_title template variable
3) View the patch diff and note that the CoverImagePlugins variable has been set correctly (compare to the intranet file detail.tt for reference if needed)
4) Confirm that no changes have been made to any elements beyond adding the data attributes
Comment 2 Martin Renvoize (ashimema) 2024-12-12 16:28:49 UTC
Created attachment 175412 [details] [review]
Bug 38422: Allow plugin cover images in OPAC lists

This patch updates the template to allow cover images from plugins in the OPAC list page. It adds a data-isbn and data-title attribute to the cover images element and also moves the element below the setting of the title so that we can pass that directly.

It also adds the script call to allow the plugin method to work on the page

Test plan:
1) View the patch diff and note that the data attributes have been added correctly
2) View the patch diff and note that the <a> tag has been moved below the setting of the img_title template variable
3) View the patch diff and note that the CoverImagePlugins variable has been set correctly (compare to the intranet file detail.tt for reference if needed)
4) Confirm that no changes have been made to any elements beyond adding the data attributes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize (ashimema) 2024-12-12 16:29:36 UTC
Trivial, non-invasive, addition of plugin support hook in the OPAC.

Going straight for a PQA here.. we're using it in production already in 23.11.x and beyond.
Comment 4 Katrin Fischer 2024-12-23 09:37:30 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 5 David Nind 2025-01-01 22:44:07 UTC
Checking to see if this is an enhancement, rather than a bug.

Should I add a bug for displaying multiple images nicely, like we do in other areas of the OPAC and staff interface, instead of running vertically down the page?