From 29432ee42cf25d79f28054eaea85f46edc688d1b Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 29 Oct 2010 22:35:43 -0400 Subject: [PATCH] bug 5190: link to MARC21/UNIMARC online doc in the bib editor MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch from Tomás Cohen Arazi Signed-off-by: Galen Charlton Signed-off-by: Chris Cormack --- cataloguing/addbiblio.pl | 3 +++ .../en/modules/cataloguing/addbiblio.tmpl | 25 ++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index fc560474f4..2cd6e735b4 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -1018,6 +1018,9 @@ 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, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl index 3e510c5ede..4608820ded 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl @@ -67,6 +67,26 @@ function PopupZ3950() { } } +function PopupMARCFieldDoc(field) { + if(field == 0) { + window.open("http://www.loc.gov/marc/bibliographic/bdleader.html"); + } else if (field < 900) { + window.open("http://www.loc.gov/marc/bibliographic/bd"+field+".html"); + } else { + window.open("http://www.loc.gov/marc/bibliographic/bd9xx.html"); + } +} + +function PopupUNIMARCFieldDoc(field,fieldnumber) { + if(field == 0) { + window.open("http://archive.ifla.org/VI/3/p1996-1/uni.htm"); + } else if (field < 900) { + window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+fieldnumber+".htm#b"+field); + } else { + window.open("http://archive.ifla.org/VI/3/p1996-1/uni9.htm"); + } +} + /** * check if mandatory subfields are written */ @@ -749,7 +769,10 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? - Click to Expand this Tag" onclick="ExpandField('tag__'); return false;"> - "> + ">PopupMARCFieldDoc() + PopupUNIMARCFieldDoc(,) + ;return false;"> ? _indicator1_" size="1" maxlength="1" value="" /> -- 2.39.5