From 66ea9fe2da42bd55b2c1100d12ca4cd2e2615649 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Fri, 26 Oct 2012 00:52:11 -0400 Subject: [PATCH] TPAC: don't repeat subfields in record content notes Given a MARC field like "500 $a 1 $b 2 $c 3", the content note would display as "1 1 2 1 2 3" as each subfield was appended to the total set of notes. Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- Open-ILS/src/templates/opac/parts/record/contents.tt2 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/record/contents.tt2 b/Open-ILS/src/templates/opac/parts/record/contents.tt2 index 956a72def8..1fb0eb5833 100644 --- a/Open-ILS/src/templates/opac/parts/record/contents.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/contents.tt2 @@ -162,9 +162,10 @@ BLOCK render_contents; code = subfield.getAttribute('code'); NEXT UNLESS code.match('[a-z]'); all_content.push(subfield.textContent); - total_contents = all_content.join(" ").replace('\s+$', ''); - %] [% total_contents %][%- END; - IF all_terms.size; "
"; END; + END; + total_contents = all_content.join(" ").replace('\s+$', ''); + %] [% total_contents; + IF total_contents.size; "
"; END; END; END %] -- 2.43.2