Bugzilla – Attachment 2718 Details for
Bug 5329
Testing bug-submit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0002-bug-5190-improve-linking-to-MARC-field-documentation.patch
0002-bug-5190-improve-linking-to-MARC-field-documentation.patch (text/plain), 3.86 KB, created by
Galen Charlton
on 2010-10-30 12:35:48 UTC
(
hide
)
Description:
0002-bug-5190-improve-linking-to-MARC-field-documentation.patch
Filename:
MIME Type:
Creator:
Galen Charlton
Created:
2010-10-30 12:35:48 UTC
Size:
3.86 KB
patch
obsolete
>From c54b35b4ffe3903eb59ae912c5eaf94c5610395e Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmcharlt@gmail.com> >Date: Fri, 29 Oct 2010 22:26:06 -0400 >Subject: [PATCH 2/2] bug 5190: improve linking to MARC field documentation > >* zero-pad tag numbers as needed >* handle special case for linking to UNIMARC 0XX vs. 1-8XX >* add a wrapper function >* add comment about the poor linkability of IFLA's UNIMARC documentation > >Signed-off-by: Galen Charlton <gmcharlt@gmail.com> >--- > .../prog/en/modules/cataloguing/addbiblio.tmpl | 27 ++++++++++++++----- > 1 files changed, 20 insertions(+), 7 deletions(-) > >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 4608820..ccd1039 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl >@@ -67,21 +67,36 @@ function PopupZ3950() { > } > } > >-function PopupMARCFieldDoc(field) { >+function PopupMARCFieldDoc(field, fieldnumber) { >+ <!-- TMPL_IF NAME="MARC21" --> >+ _MARC21FieldDoc(field); >+ <!-- TMPL_ELSE --> >+ _UNIMARCFieldDoc(field, fieldnumber); >+ <!-- /TMPL_IF --> >+} >+ >+function _MARC21FieldDoc(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"); >+ window.open("http://www.loc.gov/marc/bibliographic/bd" + ("000"+field).slice(-3) + ".html"); > } else { > window.open("http://www.loc.gov/marc/bibliographic/bd9xx.html"); > } > } > >-function PopupUNIMARCFieldDoc(field,fieldnumber) { >+function _UNIMARCFieldDoc(field,fieldnumber) { >+ /* http://archive.ifla.org/VI/3/p1996-1/ is an outdated version of UNIMARC, but >+ seems to be the only version available that can be linked to per tag. More recent >+ versions of the UNIMARC standard are available on the IFLA website only as >+ PDFs! >+ */ > if(field == 0) { > window.open("http://archive.ifla.org/VI/3/p1996-1/uni.htm"); >+ } else if (field < 100) { >+ window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+fieldnumber+".htm#b" + ("000"+field).slice(-3)); > } else if (field < 900) { >- window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+fieldnumber+".htm#b"+field); >+ window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+fieldnumber+".htm#" + ("000"+field).slice(-3)); > } else { > window.open("http://archive.ifla.org/VI/3/p1996-1/uni9.htm"); > } >@@ -770,9 +785,7 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? > <a href="#" tabindex="1" class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib"--> - Click to Expand this Tag" onclick="ExpandField('tag_<!-- TMPL_VAR NAME="tag"-->_<!-- TMPL_VAR NAME='index' --><!-- TMPL_VAR NAME="random" -->'); return false;"><!-- TMPL_VAR NAME="tag" --></a> > <!-- TMPL_ELSE --> > <span class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --><a >- onClick="<!-- TMPL_IF NAME="MARC21" -->PopupMARCFieldDoc(<!-- TMPL_VAR NAME="tag" -->) >- <!-- TMPL_ELSE -->PopupUNIMARCFieldDoc(<!-- TMPL_VAR NAME="tag" -->,<!-- TMPL_VAR NAME="number" -->) >- <!-- /TMPL_IF -->;return false;"> ?</a></span> >+ onclick="PopupMARCFieldDoc(<!-- TMPL_VAR NAME="tag" -->, <!-- TMPL_VAR NAME="number" -->); return false;"> ?</a></span> > <!-- /TMPL_IF --> > <!-- TMPL_IF NAME="fixedfield" --> > <input tabindex="1" class="indicator flat" type="text" style="display:none;" name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator1_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->" size="1" maxlength="1" value="<!-- TMPL_VAR NAME="indicator1" -->" /> >-- >1.7.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 5329
: 2718 |
2719
|
2720
|
2721