From 44d066c20597feb8ccb5894656de708083f53631 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 21 Nov 2019 16:26:53 +0000 Subject: [PATCH] Bug 16683: Help links to fields 59X in cataloguing form are broken This patch adds more specificity to handling of MARC21 documentation links in the basic MARC editor. To test, apply the patch and make sure the "advancedMARCeditor" system preference is set to "Display." You may need to edit a bibliographic framework so that 09x, 59x, and 69x tags will display in the editor. Edit or create a bibliographic record using that framework. Next to each tag label in the editor should be a "?" link. Clicking this link should open a new window with the correct Library of Congress documentation page. Check the links for 09x, 59x, and 69x tags as well as others to confirm they open the correct pages. Signed-off-by: Cori Lynn Arnold Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit 6cc2c566ece46e36bd56a728d2208e1c0e865220) Signed-off-by: Lucas Gass --- .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 6 ++++++ 1 file changed, 6 insertions(+) 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 c8ce9966a1..e388061f95 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -212,6 +212,12 @@ function _MARC21FieldDoc(field) { if(field == 0) { window.open("http://www.loc.gov/marc/bibliographic/bdleader.html"); + } else if (field >= 90 && field <= 99 ){ + window.open("http://www.loc.gov/marc/bibliographic/bd09x.html"); + } else if (field >= 590 && field <= 599 ){ + window.open("http://www.loc.gov/marc/bibliographic/bd59x.html"); + } else if (field >= 690 && field <= 699 ){ + window.open("http://www.loc.gov/marc/bibliographic/bd69x.html"); } else if (field < 900) { window.open("http://www.loc.gov/marc/bibliographic/bd" + ("000"+field).slice(-3) + ".html"); } else { -- 2.39.5