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. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described - thx for the great test plan! Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
f6043fbbe4
commit
c7a2ef3317
2 changed files with 9 additions and 12 deletions
|
@ -1075,16 +1075,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;
|
||||
|
|
|
@ -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 %]" />
|
||||
|
|
Loading…
Reference in a new issue