CAT-76 Remove author subfield 'e' from TPAC display/links
authorBilly Horn <bhorn@catalystdevworks.com>
Wed, 24 Aug 2016 16:31:22 +0000 (09:31 -0700)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Avoid displaying 1XX or 7XX subfield 'e' values for authors and prevent
said values from populating auto-generated author search links.

Commit msg modified by Bill for clarity.

Signed-off-by: Billy Horn <bhorn@catalystdevworks.com>
KCLS/openils/var/templates_kcls/opac/parts/misc_util.tt2
KCLS/openils/var/templates_kcls/opac/parts/record/authors.tt2

index 60ebd7b..a626c3b 100644 (file)
@@ -7,7 +7,7 @@
         FOR node IN xml.findnodes('//*[@tag="' _ target_field _ '"]');
             raw_vals = [];
             core_val = '';
-            FOR subnode IN node.findnodes('./*[not(contains("w 0 4 5 6 8 9", @code))]');
+            FOR subnode IN node.findnodes('./*[not(contains("w 0 4 5 6 8 9", @code))]');
                 raw_vals.push(subnode.textContent());
             END;
             core_val = raw_vals.join(" ");
index 088631a..6ab4ed8 100644 (file)
@@ -30,7 +30,7 @@ BLOCK build_author_links;
         FOR subfield IN node.childNodes;
             NEXT UNLESS subfield.nodeName == "subfield";
             code = subfield.getAttribute('code');
-            NEXT UNLESS code.match('[a-z]');
+            NEXT UNLESS code.match('[a-d, f-z]');
             term = subfield.textContent | html;
             author_content.push(term);
         END;