From 4881ecece5d8fcdac867d7b6936923d451a3d48a Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Sun, 16 Sep 2018 11:59:40 -0700 Subject: [PATCH] Bug 13406: Add styling classes to authority MARC detail display When viewing authority MARC records in the staff client (detail view), the MARC tags were not displaying with the tag_num, tag_desc, tag_ind1, tag_ind2, and desc classes, which made it impossible to add styles to these specific parts of a MARC tag. This commit adds these styles (which are the same as the classes in the bibliographic MARC detail display). To test: 1) Open the staff client, then click Authorities. 2) Search for an authority record. 3) Click on Details. 4) Examine some MARC fields. Note that the entire tag title line is in a single
. 5) Apply this commit. 6) Repeat steps 1-3. 7) Notice that the tag title line is now separated into several spans, each with their own classes. Signed-off-by: Jane Sandberg Signed-off-by: Brendan Gallagher Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens (cherry picked from commit 05e51e9574884f03034633dfef95e7e95ac0224e) Signed-off-by: Martin Renvoize --- authorities/detail.pl | 7 +++++++ .../prog/en/modules/authorities/detail.tt | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/authorities/detail.pl b/authorities/detail.pl index 4589c62f83..b2532385d9 100755 --- a/authorities/detail.pl +++ b/authorities/detail.pl @@ -143,7 +143,14 @@ sub build_tabs { . C4::Koha::display_marc_indicators($field) . ' - ' . $tagslib->{$field->tag()}->{lib}; + $tag_data{tag_number} = $tag; + $tag_data{tag_desc} = $tagslib->{$field->tag()}->{lib}; $tag_data{subfield} = \@subfields_data; + if ($tag >= 10){ # no indicator for theses tag + $tag_data{ind1} = $field->indicator(1); + $tag_data{ind2} = $field->indicator(2); + } + push (@loop_data, \%tag_data); } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt index 2dc44b4eda..27aecc9d43 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt @@ -64,7 +64,11 @@ [% IF ( innerloo.tag ) %]
- [% innerloo.tag %] + [% innerloo.tag_number | html %] + [% IF (innerloo.defined("ind1") ) %] + [% innerloo.ind1 %][% innerloo.ind2 | html %] + [% END %] + [% IF (innerloo.tag_desc) %] - [% innerloo.tag_desc | html %][% END %]
[% ELSE %]
@@ -72,9 +76,9 @@ [% FOREACH subfiel IN innerloo.subfield %]

- [% subfiel.marc_value %] + [% UNLESS ( subfiel.hide_marc ) %][% subfiel.marc_subfield | html %][% END %] + [% subfiel.short_desc | html %] + [% subfiel.marc_value | html %] [% IF ( subfiel.link ) %] -- 2.39.5