Bug 40482 - bookcover/bookcoverimg class in search results show include more data-attributes for customization
Summary: bookcover/bookcoverimg class in search results show include more data-attribu...
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-23 16:44 UTC by Lucas Gass (lukeg)
Modified: 2025-07-23 18:48 UTC (History)
0 users

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


Attachments
Bug 40482: Add useful data-attributes to cover image containers on OPAC/staff search results (4.00 KB, patch)
2025-07-23 16:58 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 40482: Add useful data-attributes to cover image containers on OPAC/staff search results (4.07 KB, patch)
2025-07-23 18:48 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 Lucas Gass (lukeg) 2025-07-23 16:44:20 UTC
I would like to have more data-attributes on the bookcover class in search results.

There is already some data-attributes on cover-slider element but that gets removed when there is no cover. It would still be useful to have data-attr for things like biblionumber, title, itemtype so customizations ( with only CSS )can easily be made in the event of no cover image.
Comment 1 Lucas Gass (lukeg) 2025-07-23 16:58:27 UTC
Created attachment 184567 [details] [review]
Bug 40482: Add useful data-attributes to cover image containers on OPAC/staff search results

This patch adds useful data-attributes to the bookcover/bookcoverimg container in the OPAC/staff search results.

To test:
0. APPLY PATCH
1. Turn on at least 1 image service for both the OPAC and staff interface
2. Do a search that returns results
3. You should see the following data attributes, even when no cover image is supplied:

data-biblionumber
data-itemtype
data-itemtype_description
data-title
data-subtitle
data-author
data-isbn

You can now target these with just CSS.
Comment 2 Owen Leonard 2025-07-23 18:48:16 UTC
Created attachment 184570 [details] [review]
Bug 40482: Add useful data-attributes to cover image containers on OPAC/staff search results

This patch adds useful data-attributes to the bookcover/bookcoverimg
container in the OPAC/staff search results.

To test:
0. APPLY PATCH
1. Turn on at least 1 image service for both the OPAC and staff interface
2. Do a search that returns results
3. You should see the following data attributes, even when no cover
   image is supplied:

  data-biblionumber
  data-itemtype
  data-itemtype_description
  data-title
  data-subtitle
  data-author
  data-isbn

You can now target these with just CSS.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>