Bugzilla – Attachment 5765 Details for
Bug 6982
Don't show MARC21 tag documentation links for NORMARC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6982 - Don't show MARC tag documentation links for NORMARC
Bug-6982---Dont-show-MARC-tag-documentation-links-.patch (text/plain), 4.46 KB, created by
Magnus Enger
on 2011-10-07 11:54:22 UTC
(
hide
)
Description:
Bug 6982 - Don't show MARC tag documentation links for NORMARC
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2011-10-07 11:54:22 UTC
Size:
4.46 KB
patch
obsolete
>From 70b7d1ca53014d4968a606ee15708dbb8c04a406 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@enger.priv.no> >Date: Fri, 7 Oct 2011 13:38:15 +0200 >Subject: [PATCH] Bug 6982 - Don't show MARC tag documentation links for NORMARC > >Links to UNIMARC documentation were being shown when marcflavour = >NORMARC. This patch hides the doc link functionality for NORMARC >by hiding: >1. The checkbox for turning doc links on/off >2. The hyperlinked questionmarks > >This patch does not hide e.g. the JavaScript functions related to >the doc link functionality, in order to make it easy to add >doc links for NORMARC in the future (hopefully). > >The doc link functionality was passing a variable called MARC21 >(based on the contents of the marcflavour syspref) to the >template and testing the value of this to decide if MARC21 or >UNIMARC doc links were to be shown. I have replaced this variable >with he standard/full marcflavour syspref, in order to make it >possible to test for more then two MARC dialects. > >To test: >- Set the marcflavour syspref to MARC21, NORMARC and UNIMARC, one > after the other. >- Check that correct doc links are shown for MARC21 and UNIMARC > on the cataloguing screen, and that no checkbox and no doc links > are displayed for NORMARC. >--- > cataloguing/addbiblio.pl | 8 ++------ > .../prog/en/modules/cataloguing/addbiblio.tt | 13 +++++++------ > 2 files changed, 9 insertions(+), 12 deletions(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index ba10332..eb6fcb4 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -1062,16 +1062,12 @@ elsif ( $op eq "delete" ) { > } > > $template->param( title => $record->title() ) if ( $record ne "-1" ); >-if (C4::Context->preference("marcflavour") eq "MARC21"){ >- $template->param(MARC21 => 1); >-} >- >- > $template->param( > popup => $mode, > frameworkcode => $frameworkcode, > itemtype => $frameworkcode, >- borrowernumber => $loggedinuser >+ borrowernumber => $loggedinuser, >+ marcflavour => C4::Context->preference("marcflavour"), > ); > > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 91d926e..10603a5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -78,9 +78,9 @@ function PopupZ3950() { > } > > function PopupMARCFieldDoc(field, blocknumber) { >- [% IF ( MARC21 ) %] >+ [% IF ( marcflavour == 'MARC21' ) %] > _MARC21FieldDoc(field); >- [% ELSE %] >+ [% ELSIF ( marcflavour == 'UNIMARC' ) %] > _UNIMARCFieldDoc(field, blocknumber); > [% END %] > } >@@ -664,10 +664,10 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? > <div id="yui-main"> > <div class="yui-g"> > >- >- > <h1>[% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record Number [% biblionumber %])</h1>[% ELSE %]Add MARC Record</h1>[% END %] >+[% IF marcflavour != 'NORMARC' %] > <div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links<br/></div> >+[% END %] > > [% UNLESS ( number ) %] > <!-- show duplicate warning on tab 0 only --> >@@ -825,8 +825,9 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? > [% IF advancedMARCEditor %] > <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;">[% innerloo.tag %]</a> > [% ELSE %] >- <span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag %]<a class="marcdocs" >- onclick="PopupMARCFieldDoc('[% innerloo.tag %]', [% BIG_LOO.number %]); return false;"> ?</a></span> >+ <span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag %] >+ [% IF marcflavour != 'NORMARC' %]<a class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag %]', [% BIG_LOO.number %]); return false;"> ?</a>[% END %] >+ </span> > [% END %] > [% IF ( innerloo.fixedfield ) %] > <input tabindex="1" class="indicator flat" type="text" style="display:none;" name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]" size="1" maxlength="1" value="[% innerloo.indicator1 %]" /> >-- >1.7.4.1
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 6982
:
5765
|
5940