Bugzilla – Attachment 79053 Details for
Bug 13406
Add classes to MARC Authority display to enable CSS styling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13406: Add styling classes to authority MARC detail display
Bug-13406-Add-styling-classes-to-authority-MARC-de.patch (text/plain), 3.87 KB, created by
Jonathan Druart
on 2018-09-18 13:52:43 UTC
(
hide
)
Description:
Bug 13406: Add styling classes to authority MARC detail display
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-09-18 13:52:43 UTC
Size:
3.87 KB
patch
obsolete
>From 6ff8830f3a02f3d797747cb3b1841c795d7eb0ca Mon Sep 17 00:00:00 2001 >From: Jane Sandberg <sandbej@linnbenton.edu> >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 <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> >--- > authorities/detail.pl | 7 +++++++ > koha-tmpl/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 ) %] > <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"> > [% 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&marclist=[% subfiel.link | html %]&operator==&type=intranet&value=[% subfiel.marc_value |url %]"> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13406
:
78995
|
78996
|
78999
|
79026
| 79053 |
79054
|
79117
|
79173