From 3b0d9bca0a774fb5495146ab5bbc9ce548b6958f Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 5 Sep 2012 00:49:30 -0400 Subject: [PATCH] TPAC: Fix author display Our generic label was getting overwritten by the first specific label, such that all following generic labels would get the specific label. Signed-off-by: Dan Scott --- Open-ILS/src/templates/opac/parts/record/authors.tt2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/opac/parts/record/authors.tt2 index abce7585d2..bc61e48f2a 100644 --- a/Open-ILS/src/templates/opac/parts/record/authors.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/authors.tt2 @@ -27,12 +27,13 @@ BLOCK build_author_links; term = ''; qterm = ''; iprop = ''; + tlabel = ''; FOR subfield IN node.childNodes; NEXT UNLESS subfield.nodeName == "subfield"; code = subfield.getAttribute('code'); IF code == '4'; relcode = subfield.textContent.substr(0,3); - label = relators.$relcode || label; + tlabel = relators.$relcode || label; END; NEXT UNLESS code.match('[a-z]'); sf_raw = subfield.textContent; @@ -41,7 +42,7 @@ BLOCK build_author_links; qterm = qterm _ ' ' _ sf_raw; END; url = mkurl(ctx.opac_root _ '/results', {query => qterm, qtype => 'author'}, ['page', 'expand']); - author_type = label | html; + author_type = (tlabel || label) | html; # schema.org changes IF type == 'author'; -- 2.11.0