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 <div>.
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 <sandbej@linnbenton.edu>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jane Sandberg 2018-09-16 11:59:40 -07:00 committed by Nick Clemens
parent 89d140c6a1
commit 05e51e9574
2 changed files with 13 additions and 2 deletions

View file

@ -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);
}
}

View file

@ -65,7 +65,11 @@
[% IF ( innerloo.tag ) %]
<div class="tag">
<div class="tag_title">
[% innerloo.tag | html %]
<span class="tag_num">[% innerloo.tag_number | html %]</span>
[% IF (innerloo.defined("ind1") ) %]
<span class="tag_ind1">[% innerloo.ind1 %]</span><span class="tag_ind2">[% innerloo.ind2 | html %]</span>
[% END %]
[% IF (innerloo.tag_desc) %]<span class="dashwrapper"> -</span> <span class="tag_desc">[% innerloo.tag_desc | html %]</span>[% END %]
</div>
[% ELSE %]
<div class="tag">
@ -74,7 +78,7 @@
<p>
<label class="labelsubfield">&nbsp;
[% UNLESS ( subfiel.hide_marc ) %]<b>[% subfiel.marc_subfield | html %]</b>[% END %]
<span title="[% subfiel.long_desc | html %]">[% subfiel.short_desc | html %]</span></label>
<span title="[% subfiel.long_desc | html %]" class="desc">[% subfiel.short_desc | html %]</span></label>
[% subfiel.marc_value | html %]
[% IF ( subfiel.link ) %]
<a href="/cgi-bin/koha/catalogue/search.pl?op=do_search&amp;marclist=[% subfiel.link | html %]&amp;operator==&amp;type=intranet&amp;value=[% subfiel.marc_value |url %]">