Bugzilla – Attachment 21779 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]
[SIGNED-OFF] Bug 10982 Link to IFLA UNIMARC documentation in Cataloging
SIGNED-OFF-Bug-10982-Link-to-IFLA-UNIMARC-document.patch (text/plain), 3.89 KB, created by
Bernardo Gonzalez Kriegel
on 2013-10-03 15:43:55 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 10982 Link to IFLA UNIMARC documentation in Cataloging
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-10-03 15:43:55 UTC
Size:
3.89 KB
patch
obsolete
>From b8beb69236eb6f94df204927f5bb9bfc61c2c948 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] [SIGNED-OFF] 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... > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Simple fix. Work as described. No koha-qa errors > >Test on UNIMARC install >1) Switched all 2xx tags to tab 1 >2) press any 2xx ?, wrong page >3) patch applied >4) links are now correct >--- > .../prog/en/modules/cataloguing/addbiblio.tt | 25 +++++++++++--------- > 1 file 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.9.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