From c21837e7729bd51dce0dd6add1dd60aac7d4c8a5 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 29 Jun 2018 11:36:30 -0400 Subject: [PATCH] Lp 1779319: Add ISBN subfield q to OPAC display. Many new MARC records come with the format and extra information in the 020 subfield q instead of tacked on the end of the subfield a. This patch appends the content of the subfield q to the ISBN output in misc_util.tt2. To test, first find a record with a 020 subfield q and look it up in the OPAC or staff client. Note that the subfield q information does not display after the ISBN. Apply this patch and look the record up again. Now, the subfield q should display after the ISBN. Signed-off-by: Jason Stephenson Signed-off-by: Rogan Hamby --- Open-ILS/src/templates/opac/parts/misc_util.tt2 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index 6f3d18bf8c..431db99205 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -182,7 +182,12 @@ args.isbns = []; FOR isbn IN xml.findnodes('//*[@tag="020"]/*[@code="a"]'); - args.isbns.push(isbn.textContent); + text = isbn.textContent; + FOR q IN isbn.findnodes('../*[@code="q"]'); + text = text _ ' ' _ q.textContent; + LAST; # Should only be 1, but just makin' sure. + END; + args.isbns.push(text); END; # UPCs can be identified either by ind1="1" or subfield 2 of "upc" -- 2.11.0