Bugzilla – Attachment 78214 Details for
Bug 21280
Unify MARC editor in biblios and authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21280: Unify MARC tab HTML generation
0001-Bug-21280-Unify-MARC-tab-HTML-generation.patch (text/plain), 10.36 KB, created by
paxed
on 2018-08-28 11:18:26 UTC
(
hide
)
Description:
Bug 21280: Unify MARC tab HTML generation
Filename:
MIME Type:
Creator:
paxed
Created:
2018-08-28 11:18:26 UTC
Size:
10.36 KB
patch
obsolete
>From fe7a1b4a477019d9d25d97e0985f2736af4e4359 Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@joensuu.fi> >Date: Tue, 28 Aug 2018 10:45:24 +0300 >Subject: [PATCH] Bug 21280: Unify MARC tab HTML generation > >Bug 11885 improved the MARC detail tab view, so it it easier to style >with CSS, but the authority MARC tabs are still in a sorry state. >We can unify the code into a single include file, and reuse that from both. > >Test plan: > >1) Apply the patch >2) Look at the biblio MARC detail view, check the tabs look the same > as before >3) Look at an authority MARC detail view, check the tabs look the > same as the biblio view > >Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> >--- > authorities/detail.pl | 7 ++- > .../prog/en/includes/marc_tab_html.inc | 33 +++++++++++++ > .../prog/en/modules/authorities/detail.tt | 30 +----------- > .../prog/en/modules/catalogue/MARCdetail.tt | 57 ++++------------------ > 4 files changed, 47 insertions(+), 80 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/marc_tab_html.inc > >diff --git a/authorities/detail.pl b/authorities/detail.pl >index 4589c62f83..d5c0abc951 100755 >--- a/authorities/detail.pl >+++ b/authorities/detail.pl >@@ -139,10 +139,9 @@ 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} = $field->tag(); >+ $tag_data{tag_ind} = C4::Koha::display_marc_indicators($field); >+ $tag_data{tag_desc} = $tagslib->{$field->tag()}->{lib}; > $tag_data{subfield} = \@subfields_data; > push (@loop_data, \%tag_data); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/marc_tab_html.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/marc_tab_html.inc >new file mode 100644 >index 0000000000..2b545a7ffa >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/marc_tab_html.inc >@@ -0,0 +1,33 @@ >+ <div id="[% tab_id | html %]"> >+ [% FOREACH tab0X IN tab_data %] >+ [% IF ( tab0X.tag ) %] >+ <div class="tag"> >+ <div class="tag_title"> >+ <span class="tag_num">[% tab0X.tag | html %]</span> >+ [% IF ( tab0X.tag_ind ) %] >+ <span class="tag_ind1">[% tab0X.tag_ind.substr(0, 1) | html %]</span><span class="tag_ind2">[% tab0X.tag_ind.substr(1, 1) | html %]</span> >+ [% END %] >+ [% IF (tab0X.tag_desc) %]<span class="dashwrapper"> -</span> <span class="tag_desc">[% tab0X.tag_desc | html %]</span>[% END %] >+ </div> >+ [% ELSE %] >+ <div class="tag"> >+ [% END %] >+ [% FOREACH subfiel IN tab0X.subfield %] >+ <p class="subfield_line"> >+ <span class="subfield-label"> >+ [% UNLESS ( subfiel.hide_marc ) %]<span class="subfield-code">[% subfiel.marc_subfield | html %]</span>[% END %] >+ <span class="desc" title="[% subfiel.long_desc | html %]">[% subfiel.short_desc | html %]</span></span> >+ [% IF ( subfiel.is_url ) %]<a href="[% subfiel.marc_value | html %]">[% subfiel.marc_value | html %]</a>[% ELSE %][% subfiel.marc_value | html %][% END %] >+ [% IF ( subfiel.link ) %] >+ <a href="/cgi-bin/koha/catalogue/search.pl?op=do_search&idx=[% subfiel.link | html %],phr&type=intranet&q=[% subfiel.marc_value |url %]"> >+ <img src="[% interface | html %]/[% theme | html %]/img/filefind.png" height="15" title="Search on [% subfiel.marc_value | html %]" alt="Search on [% subfiel.marc_value | html %]" /> >+ </a> >+ [% END %] >+ [% IF ( subfiel.authority ) %] >+ <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% subfiel.authority | html %]" class="button">Auth</a> >+ [% END %] >+ </p> >+ [% END %] >+ </div> <!-- class='tag' --> >+ [% END %] >+ </div> >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..ad5b9ac6df 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt >@@ -60,35 +60,7 @@ > </ul> > > [% FOREACH BIG_LOO IN BIG_LOOP %] >- <div id="tab[% BIG_LOO.number | html %]XX"> >- [% FOREACH innerloo IN BIG_LOO.innerloop %] >- [% IF ( innerloo.tag ) %] >- <div class="tag"> >- <div class="tag_title"> >- [% innerloo.tag | html %] >- </div> >- [% ELSE %] >- <div class="tag"> >- [% END %] >- [% FOREACH subfiel IN innerloo.subfield %] >- <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> >- [% 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 %]"> >- <img src="[% interface | html %]/[% theme | html %]/images/filefind.png" height="15" title="Search on [% subfiel.marc_value | html %]"> >- </a> >- [% END %] >- [% IF ( subfiel.authority ) %] >- <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% subfiel.authority | html %]" class="button">Auth</a> >- [% END %] >- </p> >- [% END %] >- </div> >- [% END %] >- </div> >+ [% PROCESS 'marc_tab_html.inc' tab_id="tab" _ BIG_LOO.number _ "XX" tab_data=BIG_LOO.innerloop %] > [% END %] > </div> > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt >index 4b0ef797f5..62da366779 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt >@@ -57,43 +57,6 @@ > [% END %] > > >-[% BLOCK show_tab_html %] >- <div id="[% tab_id | html %]"> >- [% FOREACH tab0X IN tab_data %] >- [% IF ( tab0X.tag ) %] >- <div class="tag"> >- <div class="tag_title"> >- <span class="tag_num">[% tab0X.tag | html %]</span> >- [% IF ( tab0X.tag_ind ) %] >- <span class="tag_ind1">[% tab0X.tag_ind.substr(0, 1) | html %]</span><span class="tag_ind2">[% tab0X.tag_ind.substr(1, 1) | html %]</span> >- [% END %] >- [% IF (tab0X.tag_desc) %]<span class="dashwrapper"> -</span> <span class="tag_desc">[% tab0X.tag_desc | html %]</span>[% END %] >- </div> >- [% ELSE %] >- <div class="tag"> >- [% END %] >- [% FOREACH subfiel IN tab0X.subfield %] >- <p class="subfield_line"> >- <span class="subfield-label"> >- [% UNLESS ( subfiel.hide_marc ) %]<span class="subfield-code">[% subfiel.marc_subfield | html %]</span>[% END %] >- <span class="desc" title="[% subfiel.long_desc | html %]">[% subfiel.short_desc | html %]</span></span> >- [% IF ( subfiel.is_url ) %]<a href="[% subfiel.marc_value | html %]">[% subfiel.marc_value | html %]</a>[% ELSE %][% subfiel.marc_value | html %][% END %] >- [% IF ( subfiel.link ) %] >- <a href="/cgi-bin/koha/catalogue/search.pl?op=do_search&idx=[% subfiel.link | html %],phr&type=intranet&q=[% subfiel.marc_value |url %]"> >- <img src="[% interface | html %]/[% theme | html %]/img/filefind.png" height="15" title="Search on [% subfiel.marc_value | html %]" alt="Search on [% subfiel.marc_value | html %]" /> >- </a> >- [% END %] >- [% IF ( subfiel.authority ) %] >- <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% subfiel.authority | html %]" class="button">Auth</a> >- [% END %] >- </p> >- [% END %] >- </div> <!-- class='tag' --> >- [% END %] >- </div> >-[% END %] >- >- > <div id="bibliotabs" class="toptabs numbered"> > <ul> > [% IF ( tab0XX ) %] >@@ -130,25 +93,25 @@ > <li><a href="#tab10XX">Item(s)</a></li> > [% END %] > </ul> >- [% PROCESS show_tab_html tab_id="tab0XX" tab_data=tab0XX %] >+ [% PROCESS 'marc_tab_html.inc' tab_id="tab0XX" tab_data=tab0XX %] > >- [% PROCESS show_tab_html tab_id="tab1XX" tab_data=tab1XX %] >+ [% PROCESS 'marc_tab_html.inc' tab_id="tab1XX" tab_data=tab1XX %] > >- [% PROCESS show_tab_html tab_id="tab2XX" tab_data=tab2XX %] >+ [% PROCESS 'marc_tab_html.inc' tab_id="tab2XX" tab_data=tab2XX %] > >- [% PROCESS show_tab_html tab_id="tab3XX" tab_data=tab3XX %] >+ [% PROCESS 'marc_tab_html.inc' tab_id="tab3XX" tab_data=tab3XX %] > >- [% PROCESS show_tab_html tab_id="tab4XX" tab_data=tab4XX %] >+ [% PROCESS 'marc_tab_html.inc' tab_id="tab4XX" tab_data=tab4XX %] > >- [% PROCESS show_tab_html tab_id="tab5XX" tab_data=tab5XX %] >+ [% PROCESS 'marc_tab_html.inc' tab_id="tab5XX" tab_data=tab5XX %] > >- [% PROCESS show_tab_html tab_id="tab6XX" tab_data=tab6XX %] >+ [% PROCESS 'marc_tab_html.inc' tab_id="tab6XX" tab_data=tab6XX %] > >- [% PROCESS show_tab_html tab_id="tab7XX" tab_data=tab7XX %] >+ [% PROCESS 'marc_tab_html.inc' tab_id="tab7XX" tab_data=tab7XX %] > >- [% PROCESS show_tab_html tab_id="tab8XX" tab_data=tab8XX %] >+ [% PROCESS 'marc_tab_html.inc' tab_id="tab8XX" tab_data=tab8XX %] > >- [% PROCESS show_tab_html tab_id="tab9XX" tab_data=tab9XX %] >+ [% PROCESS 'marc_tab_html.inc' tab_id="tab9XX" tab_data=tab9XX %] > > [% IF ( tab10XX ) %] > <div id="tab10XX"> >-- >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 21280
:
78214
|
85502
|
85503
|
85504
|
85517
|
85518
|
85519
|
85520
|
87311
|
87312
|
87313
|
87314
|
87318
|
87319
|
87320
|
87321
|
89407
|
89408
|
89409
|
89410
|
89411
|
89412
|
89413
|
89414