From 05e51e9574884f03034633dfef95e7e95ac0224e 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 --- authorities/detail.pl | 7 +++++++ .../intranet-tmpl/prog/en/modules/authorities/detail.tt | 8 ++++++-- 2 files changed, 13 insertions(+), 2 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 ce45987340..d121519326 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt @@ -65,7 +65,11 @@ [% IF ( innerloo.tag ) %]
- [% innerloo.tag | html %] + [% innerloo.tag_number | html %] + [% IF (innerloo.defined("ind1") ) %] + [% innerloo.ind1 %][% innerloo.ind2 | html %] + [% END %] + [% IF (innerloo.tag_desc) %] - [% innerloo.tag_desc | html %][% END %]
[% ELSE %]
@@ -74,7 +78,7 @@

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