Bug 14156: Add id tags to each MARC note in the display
authorOwen Leonard <oleonard@myacpl.org>
Tue, 15 Aug 2023 07:36:43 +0000 (07:36 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 15 Sep 2023 14:57:19 +0000 (11:57 -0300)
commit5e6943562fc12f475442a2e05de700ae1f9d6020
tree864f7ea6b3b554ac447b754d9a09504a2a068e51
parent5797079fc5e5b1e9a4d883f0ceb5a344b8cdbd36
Bug 14156: Add id tags to each MARC note in the display

This patch adds tag number to the data which is returned by
$biblio->get_marc_notes(). The bibliographic detail page in the staff
client is modified to use the tag number in both a class (for consistent
styling across the same tag number) and id (for unique styling for each
repeated tag).

To test, apply the patch and restart services.

- As a quick test for custom CSS, go to Administration -> System
  preferences and locate the IntranetUserCSS preference.
  - Add this testing CSS:

   .marcnote { font-size:140%; font-family: serif; }
   .marcnote-500 { background-color: #66FFCC; }
   .marcnote-511 { background-color: #99FFFF; }
   .marcnote-520 { background-color: #CCFF00; }
   .marcnote-521 { background-color: #CCFFFF; }
   .marcnote-538 { background-color: #FFCCCC; }
   .marcnote-546 { background-color: #FFFFCC; }

- Locate a record with multiple notes fields. In the sample data, record
  46, "Viridiana" is a good example which works well with the above CSS.
- On the bibliographic detail page for the record, click the
  "Descriptions" tab.
  - Each MARC note should be colored according to the tag it comes from.
  - Inspect the HTML to confirm that each paragraph also has its own
    unique ID.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Biblio.pm
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt