Bug 13406: (follow-up) Add styling classes to authority MARC detail display
authorJane Sandberg <sandbej@linnbenton.edu>
Sun, 16 Sep 2018 22:38:29 +0000 (22:38 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 19 Sep 2018 13:45:38 +0000 (13:45 +0000)
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Amended patch: replace tab characters with spaces

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
authorities/detail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt

index b253238..908b7bd 100755 (executable)
@@ -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);
index d121519..00da448 100644 (file)
@@ -62,7 +62,7 @@
 [% FOREACH BIG_LOO IN BIG_LOOP %]
     <div id="tab[% BIG_LOO.number | html %]XX">
     [% FOREACH innerloo IN BIG_LOO.innerloop %]
-        [% IF ( innerloo.tag ) %]
+        [% IF ( innerloo.tag_number ) %]
             <div class="tag">
             <div class="tag_title">
                 <span class="tag_num">[% innerloo.tag_number | html %]</span>