lp1350827 Non-located URI display changes user/kmlussier/lp1350827-non-located-uri-display
authorKathy Lussier <klussier@masslnc.org>
Fri, 1 Aug 2014 11:44:24 +0000 (07:44 -0400)
committerKathy Lussier <klussier@masslnc.org>
Fri, 1 Aug 2014 11:44:24 +0000 (07:44 -0400)
Make non-located URI's display in a similar fashion as located URI's. Now,
the label will come from either $y or $3 in that order and the access note
will come from either $z or $2 in that order. Also, we'll now support
display of the URI with a 1 in ind1.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/opac/parts/misc_util.tt2

index 4a0cf58..d266b92 100644 (file)
 
         # Extract the 856 URLs that are not otherwise represented by asset.uri's
         args.online_res = [];
-        FOR node IN xml.findnodes('//*[@tag="856" and @ind1="4" and (@ind2="0" or @ind2="1")]');
+        FOR node IN xml.findnodes('//*[@tag="856" and (@ind1="1" or @ind1="4") and (@ind2="0" or @ind2="1")]');
             IF node.findnodes('./*[@code="9" or @code="w" or @code="n"]'); NEXT; END; # asset.uri's
-            label = node.findnodes('./*[@code="y"]');
-            notes = node.findnodes('./*[@code="z" or @code="3"]');
+            label = node.findnodes('./*[@code="y" or @code="3"][1]');
+            notes = node.findnodes('./*[@code="z" or @code="2"][1]');
             FOR href IN node.findnodes('./*[@code="u"]');
                 NEXT UNLESS href;
                 # it's possible for multiple $u's to exist within 1 856 tag.