From 7578b93c121e114e3aeb363224ff1567710759cc Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 3 Jan 2024 16:01:56 +0000 Subject: [PATCH] Bug 35689: Add id and classes to each MARC note in OPAC bibliographic details Building on Bug 14156, this patch updates the OPAC bibliographic detail page's display of MARC notes to add 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: - As a quick test for custom CSS, go to Administration -> System preferences and locate the OPACUserCSS 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: Lucas Gass Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer (cherry picked from commit dfd4894acbab3af5355b72c859a0a17deef70af5) Signed-off-by: Fridolin Somers (cherry picked from commit 0a5dbec79759cba07da5f062f2ac2e242228d1cf) Signed-off-by: Lucas Gass --- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 23cfbee239..aee3d60038 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -602,12 +602,12 @@ [% IF ( MARCNOTES ) %]
[% FOREACH MARCNOTE IN MARCNOTES %] -

- [% IF MARCNOTE.marcnote.match('^https?://\S+$') %] - [% MARCNOTE.marcnote | html %] - [% ELSE %] - [% MARCNOTE.marcnote | html | html_line_break %] - [% END %] +

+ [% IF MARCNOTE.marcnote.match('^https?://\S+$') %] + [% MARCNOTE.marcnote | html %] + [% ELSE %] + [% MARCNOTE.marcnote | html | html_line_break %] + [% END %]

[% END %]
-- 2.39.5