Bug 38790

Summary: Add HTML classes to item information fields for a record - item page (moredetail.pl)
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: Staff interfaceAssignee: Andrew Fuerste-Henry <andrew>
Status: Pushed to main --- QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: david, gmcharlt
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38787
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7508
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds CSS classes to each field on the record's item page. This makes it easier to customize the page, for example, hiding the "Paid for?" field. Field name: class name ---------------------- Record information: - Biblionumber: biblionumber - Item type: itemtype - Rental charge: rentalcharge - Daily rental charge: rentlcharge_daily - Hourly rental charge: rentalcharge_hourly - ISBN: isbn - Publication details: publication_details - Volume: volume - Physical details: physical_details - Notes: biblio_note - No. of items: item_count Item information: - Home library: homebranch - Item type: itype - Collection: ccode - Item call number: itemcallnumber - Copy number: copynumber - Shelving location: location - Replacement price: replacementprice - Materials specified: materials Statuses: - Current library: holdingbranch - Current renewals: renewals_count - Lost status: lost - Damaged status: damaged - Withdrawn status: withdrawn Priority: - Exclude from local holds priority: local_holds_priority - Bookable: bookable History: - Order date: order_info - Accession date: dateaccessioned - Invoice number: invoice - Total checkouts: issues - Last seen: datelastseen - Last borrowed: datelastborrowed - Last borrower: previous_borrowers - Paid for?: paidfor - Serial enumeration: enumchron - Public note: itemnotes - Non-public note: itemnotes_nonpublic
Version(s) released in:
25.05.00
Circulation function:
Attachments: Bug 38790: Add classes to item information on moredetail.pl
Bug 38790: Add classes to item information on moredetail.pl

Description Andrew Fuerste-Henry 2024-12-27 17:35:27 UTC
The various bits of data on moredetail.pl don't have clear and distinct classes, so they're hard to adjust or hide. We should add some classes to make customization easier.

For example, a library may wish to hide the Paid For message on an item.
Comment 1 Andrew Fuerste-Henry 2024-12-27 19:06:14 UTC
Created attachment 175963 [details] [review]
Bug 38790: Add classes to item information on moredetail.pl

to test:
1 - Have a bib with multiple items
2 - view those items on the Items tab (moredetail.pl), confirm various parts of the page are not classed and are therefore hard to target with CSS, etc
3 - apply patch
4 - reload page, observe there are classes on things but the display and data have not changed
Comment 2 David Nind 2024-12-30 02:41:44 UTC
Created attachment 175977 [details] [review]
Bug 38790: Add classes to item information on moredetail.pl

to test:
1 - Have a bib with multiple items
2 - view those items on the Items tab (moredetail.pl), confirm various parts of the page are not classed and are therefore hard to target with CSS, etc
3 - apply patch
4 - reload page, observe there are classes on things but the display and data have not changed

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2024-12-30 02:44:02 UTC
Have added related bug 7508.

Not sure if these two bugs will work together.

(Also added the assignee 8-).)
Comment 4 Katrin Fischer 2024-12-30 13:46:41 UTC
Fixed class="rentlcharge_daily" within the original patch.

I see that the classes are named like the fields in the database, which leads to a bit of a clash with terminology guidelines. But I can see consistency in that so I will leave it.
Comment 5 Katrin Fischer 2024-12-30 14:15:02 UTC
Pushed for 25.05!

Well done everyone, thank you!