Bugzilla – Attachment 21710 Details for
Bug 10982
Link to IFLA UNIMARC documentation in Cataloging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-10982-Link-to-IFLA-UNIMARC-documentation-in-Cata.patch (text/plain), 3.64 KB, created by
Frédéric Demians
on 2013-10-02 08:54:21 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2013-10-02 08:54:21 UTC
Size:
3.64 KB
patch
obsolete
>From 8357f721ec7b4f3505c70044f93e39b3e30f4570 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Wed, 2 Oct 2013 10:53:30 +0200 >Subject: [PATCH] Bug 10982 Link to IFLA UNIMARC documentation in Cataloging > >In Cataloging, a ? documentation page on IFLA web site. The current >implementation rely on the tag tab to select the appropriate IFLA >documentation web page. It doesn't work when UNIMARC tag are displayed >in a tab which digit is different for tag first digit. > >To reproduce the bug: > > - Modify default framework, put all 200 subfields in tab 1 > - Add a new biblio record > - Click on ? on 200 field > => Wrong IFLA page is opened > >Apply the patch and retry... >--- > .../prog/en/modules/cataloguing/addbiblio.tt | 25 +++++++++++-------- > 1 files changed, 14 insertions(+), 11 deletions(-) > >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 fc6cf23..cbe0a39 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -108,11 +108,11 @@ function PopupZ3950() { > } > } > >-function PopupMARCFieldDoc(field, blocknumber) { >+function PopupMARCFieldDoc(field) { > [% IF ( marcflavour == 'MARC21' ) %] > _MARC21FieldDoc(field); > [% ELSIF ( marcflavour == 'UNIMARC' ) %] >- _UNIMARCFieldDoc(field, blocknumber); >+ _UNIMARCFieldDoc(field); > [% END %] > } > >@@ -126,21 +126,24 @@ function _MARC21FieldDoc(field) { > } > } > >-function _UNIMARCFieldDoc(field, blocknumber) { >+function _UNIMARCFieldDoc(field) { > /* 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"+blocknumber+".htm#b" + ("000"+field).slice(-3)); >- } else if (field < 900) { >- window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+blocknumber+".htm#" + ("000"+field).slice(-3)); >+ var url; >+ if (field == 0) { >+ url = "http://archive.ifla.org/VI/3/p1996-1/uni.htm"; > } else { >- window.open("http://archive.ifla.org/VI/3/p1996-1/uni9.htm"); >+ var first = field.substring(0,1); >+ url = "http://archive.ifla.org/VI/3/p1996-1/uni" + first + ".htm#"; >+ if (first == 0) url = url + "b"; >+ url = first == 9 >+ ? "http://archive.ifla.org/VI/3/p1996-1/uni9.htm" >+ : url + field; > } >+ window.open(url); > } > > /* >@@ -466,7 +469,7 @@ function Changefwk(FwkList) { > <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 %] >- [% IF marcflavour != 'NORMARC' %]<a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag %]', [% BIG_LOO.number %]); return false;"> ?</a>[% END %] >+ [% IF marcflavour != 'NORMARC' %]<a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag %]'); return false;"> ?</a>[% END %] > </span> > [% END %] > [% IF ( innerloo.fixedfield ) %] >-- >1.7.2.5 >
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 10982
:
21710
|
21779
|
22144