Bug 11674: Configuration for MARC field doc URLs
authorPasi Kallinen <pasi.kallinen@joensuu.fi>
Thu, 1 Feb 2018 10:00:02 +0000 (12:00 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 16 Apr 2018 17:07:27 +0000 (14:07 -0300)
commitd0b0732c970f09781ca4bf6d90f0302e93c418ff
tree919a49586f88d3121a65751b2b774ef3844e913c
parent4c14c4998dc7eeb79a02911d8ed37db5393f3de8
Bug 11674: Configuration for MARC field doc URLs

Add a new system preference MarcFieldDocURL. Setting it to some URL
will make all the MARC documentation links point to that in
the MARC edit UI. Leaving the value empty will use the old defaults
(http://loc.gov for MARC21 and http://archive.ifla.org for UNIMARC).

There are some possible substitutions usable in the URL:
 - {MARC} is replaced with either "MARC21" or "UNIMARC"
 - {FIELD} is replaced by the MARC field number, eg. "000", "048", ...
 - {LANG} is replaced by the UI language, eg. "en", or "fi-FI"

To test:

1) Go to Cataloguing > New record
2) Clicking on the question mark links in the MARC edit will
   open a window to either loc.gov or archive.ifla.org
3) Install patch, run updatedatabase, etc
4) Redo parts 1, and 2.
5) Set the value of MarcFieldDocURL to
   http://example.com/?field={FIELD}&marc={MARC}&lang={LANG}
6) Redo parts 1 and 2
7) Clicking on the question mark links in the MARC edit will
   open a window to example.com, with the proper substitutions
   in the URL for the field, marc flavour and language

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
installer/data/mysql/atomicupdate/bug_11674-config_for_marc_field_doc_urls.sql [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt