From cd786a9c4ddeded20e574b128d0bac43a2eb52d0 Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Sun, 16 Sep 2018 22:38:29 +0000 Subject: [PATCH] Bug 13406: (follow-up) Add styling classes to authority MARC detail display Signed-off-by: Jane Sandberg Amended patch: replace tab characters with spaces Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens (cherry picked from commit 65cbeae78c2ec7449efdaf6841826b7a70dac3c9) Signed-off-by: Martin Renvoize --- authorities/detail.pl | 11 ++++------- .../prog/en/modules/authorities/detail.tt | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/authorities/detail.pl b/authorities/detail.pl index b2532385d9..908b7bdbb5 100755 --- a/authorities/detail.pl +++ b/authorities/detail.pl @@ -139,16 +139,13 @@ sub build_tabs { } if ($#subfields_data>=0) { my %tag_data; - $tag_data{tag}=$field->tag(). ' ' - . 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); + my $indicators = C4::Koha::display_marc_indicators($field); + if ( $indicators ) { + $tag_data{ind1} = substr $indicators, 0, 1; + $tag_data{ind2} = substr $indicators, 1, 1; } 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 27aecc9d43..792764914c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt @@ -61,7 +61,7 @@ [% FOREACH BIG_LOO IN BIG_LOOP %]
[% FOREACH innerloo IN BIG_LOO.innerloop %] - [% IF ( innerloo.tag ) %] + [% IF ( innerloo.tag_number ) %]
[% innerloo.tag_number | html %] -- 2.39.5