Bugzilla – Attachment 79479 Details for
Bug 20785
Advanced Editor does not honor MarcFieldDocURL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20785: Advanced Editor does not honor MarcFieldDocURL
Bug-20785-Advanced-Editor-does-not-honor-MarcField.patch (text/plain), 2.21 KB, created by
Katrin Fischer
on 2018-09-27 11:30:33 UTC
(
hide
)
Description:
Bug 20785: Advanced Editor does not honor MarcFieldDocURL
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-09-27 11:30:33 UTC
Size:
2.21 KB
patch
obsolete
>From e8092c288bbdf54a0461d5e35fc2e8e5a04fd928 Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@joensuu.fi> >Date: Fri, 24 Aug 2018 11:05:04 +0300 >Subject: [PATCH] Bug 20785: Advanced Editor does not honor MarcFieldDocURL > >The advanced MARC editor, Rancor, doesn't obey MarcFieldDocURL. >Make it do so. > >Test plan: > >1) Enable EnableAdvancedCatalogingEditor >2) Set MarcFieldDocURL to eg. http://{MARC}.example.com/{LANG}/{FIELD} >3) Go to Cataloging -> Advanced editor >4) Go to any field and press Ctrl-H >5) Marc field documentation on www.loc.gov or ifla.org should open >6) Apply patch >7) Repeat 3 and 4. The Marc field docs should open on the URL you set > >Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/includes/cateditor-ui.inc | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >index 7dd6f9d61d..0681d456b9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >@@ -1,4 +1,5 @@ > [% USE raw %] >+[% USE Koha %] > [% Asset.js("lib/codemirror/codemirror-compressed.js") | $raw %] > [% Asset.js("lib/filesaver.js") | $raw %] > [% Asset.js("lib/koha/cateditor/marc-mode.js") | $raw %] >@@ -178,7 +179,13 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr > } > > function getFieldHelpURL( tag ) { >- [% IF ( marcflavour == 'MARC21' ) %] >+ [% IF Koha.Preference('marcfielddocurl') %] >+ var docurl = "[% Koha.Preference('marcfielddocurl').replace('"','"') | html %]"; >+ docurl = docurl.replace("{MARC}", "[% marcflavour | html %]"); >+ docurl = docurl.replace("{FIELD}", ""+tag); >+ docurl = docurl.replace("{LANG}", "[% lang | html %]"); >+ return docurl; >+ [% ELSIF ( marcflavour == 'MARC21' ) %] > if ( tag == '000' ) { > return "http://www.loc.gov/marc/bibliographic/bdleader.html"; > } else if ( tag >= '090' && tag < '100' ) { >-- >2.17.1
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 20785
:
78110
|
79469
| 79479