Bug 37515 - Add common class to all places where an item type image is shown
Summary: Add common class to all places where an item type image is shown
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-29 18:20 UTC by Owen Leonard
Modified: 2024-11-18 18:24 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement changes the markup which is used to show item type images in both the OPAC and staff interface. The change adds a common class attribute, "itemtype-image", so that the display of these images can be changed with custom CSS.
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 37515: Add common class to all places where an item type image is shown (24.97 KB, patch)
2024-07-30 13:59 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37515: Add common class to all places where an item type image is shown (25.03 KB, patch)
2024-07-30 20:52 UTC, Roman Dolny
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2024-07-29 18:20:28 UTC
Related to Bug 35189, it would be useful to put a common class on all <img> tags showing item type images. This would allow libraries to consistently apply custom styles.
Comment 1 Owen Leonard 2024-07-30 13:59:42 UTC Comment hidden (obsolete)
Comment 2 Roman Dolny 2024-07-30 20:52:32 UTC
Created attachment 169878 [details] [review]
Bug 37515: Add common class to all places where an item type image is shown

This patch adds an "itemtype-image" class to templates in all places
where we show itemtype images. This patch affects both the OPAC and the
staff client.

To test you should have icons associated with multiple item types.

- Apply the patch and go to Administration -> System preferences
- Search for "itemtype"
  - noItemTypeImages should be set to "Show"
  - OpacNoItemTypeImages should be set to "Show"
  - BiblioItemtypeInfo should be set to "Show"
- Search for "usercss"
  - Add an obvious style rule for item type images to IntranetUserCSS
    and OPACUserCSS, e.g.

    .itemtype-image { border: 3px solid orange; }

- In the staff interface, check the following pages to confirm that your
  custom style is visible:

  - Administration -> Item types
    -> Edit
  - Administration -> Authorized values -> CCODE -> Edit a CCODE
  - Advanced search
    - Search results
    - Bibliographic details
  - Place hold
  - Lists -> List contents view (must set the item-level_itypes
    preference to "bibliographic record")

- In the OPAC:
  - Advanced search
    - Search results
      - Bibliographic details
  - Place hold
  - Log in as a user with checkouts ->
    - View the checkouts tab on the patron summary page
  - Lists -> List contents view (must set the item-level_itypes
    preference to "bibliographic record")

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 Katrin Fischer 2024-09-02 09:30:47 UTC
QA'd by RM. Minor rebase in results.tt.
Comment 4 Katrin Fischer 2024-09-02 10:21:38 UTC
Pushed for 24.11!

Well done everyone, thank you!