From: Dan Scott Date: Fri, 26 Oct 2012 04:52:11 +0000 (-0400) Subject: TPAC: don't repeat subfields in record content notes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7f2f589f82cce061f18fa1c3c0300eac2eff0a72;p=contrib%2FConifer.git 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 Conflicts: Open-ILS/src/templates/opac/parts/record/contents.tt2 --- diff --git a/Open-ILS/src/templates/opac/parts/record/contents.tt2 b/Open-ILS/src/templates/opac/parts/record/contents.tt2 index 5f460fd4df..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 %]