LP#1304462: Add additional RDA information to TTOPAC record summary.
authorJason Stephenson <jstephenson@mvlc.org>
Wed, 12 Mar 2014 18:12:34 +0000 (14:12 -0400)
committerBen Shum <bshum@biblio.org>
Fri, 8 Aug 2014 00:08:47 +0000 (20:08 -0400)
This pulls information from the 264 tag where the indicator 2 has
the following values and displays the information below the Publisher
info:

0 - Producer (a,b,c)
2 - Distributor (a, b, c)
3 - Manufacturer (a, b, c)
4 - Copyright (c)

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/parts/misc_util.tt2
Open-ILS/src/templates/opac/parts/record/summary.tt2

index 4a0cf58..33d1c3f 100644 (file)
         # Full publisher info
         args.pubinfo = "$args.pubplace $args.publisher $args.pubdate";
 
+        # Get RDA Copyright Info.
+        args.copyrights = [];
+        FOR sub IN xml.findnodes('//*[@tag="264" and @ind2="4"]/*[@code="c"]');
+            args.copyrights.push(sub.textContent);
+        END;
+        args.copyright = (args.copyrights.size) ? args.copyrights.0 : '';
+
+        # Get the RDA Production info.
+        args.producers = [];
+        FOR sub IN xml.findnodes('//*[@tag="264" and @ind2="0"]/*[@code="b"]');
+            args.producers.push(sub.textContent);
+        END;
+        args.producer = (args.producers.size) ? args.producers.0 : '';
+
+        args.prodplaces = [];
+        FOR sub IN xml.findnodes('//*[@tag="264" and @ind2="0"]/*[@code="a"]');
+            args.prodplaces.push(sub.textContent);
+        END;
+        args.prodplace = (args.prodplaces.size) ? args.prodplaces.0 : '';
+
+        args.proddates = [];
+        FOR sub IN xml.findnodes('//*[@tag="264" and @ind2="0"]/*[@code="c"]');
+            args.proddates.push(sub.textContent);
+        END;
+        args.proddate = (args.proddates.size) ? args.proddates.0 : '';
+
+        # Get the RDA Distribution args.
+        args.distributors = [];
+        FOR sub IN xml.findnodes('//*[@tag="264" and @ind2="2"]/*[@code="b"]');
+            args.distributors.push(sub.textContent);
+        END;
+        args.distributor = (args.distributors.size) ? args.distributors.0 : '';
+
+        args.distplaces = [];
+        FOR sub IN xml.findnodes('//*[@tag="264" and @ind2="2"]/*[@code="a"]');
+            args.distplaces.push(sub.textContent);
+        END;
+        args.distplace = (args.distplaces.size) ? args.distplaces.0 : '';
+
+        args.distdates = [];
+        FOR sub IN xml.findnodes('//*[@tag="264" and @ind2="2"]/*[@code="c"]');
+            args.distdates.push(sub.textContent);
+        END;
+        args.distdate = (args.distdates.size) ? args.distdates.0 : '';
+
+        # Get the RDA Manufacture args.
+        args.manufacturers = [];
+        FOR sub IN xml.findnodes('//*[@tag="264" and @ind2="3"]/*[@code="b"]');
+            args.manufacturers.push(sub.textContent);
+        END;
+        args.manufacturer = (args.manufacturers.size) ? args.manufacturers.0 : '';
+
+        args.manplaces = [];
+        FOR sub IN xml.findnodes('//*[@tag="264" and @ind2="3"]/*[@code="a"]');
+            args.manplaces.push(sub.textContent);
+        END;
+        args.manplace = (args.manplaces.size) ? args.manplaces.0 : '';
+
+        args.mandates = [];
+        FOR sub IN xml.findnodes('//*[@tag="264" and @ind2="3"]/*[@code="c"]');
+            args.mandates.push(sub.textContent);
+        END;
+        args.mandate = (args.mandates.size) ? args.mandates.0 : '';
+
         # RDA adds 264 to the pubinfo 880 consideration mix
         graphic_880s = [];
         get_graphic_880s(target_field='260');
index fffd158..bdb1763 100644 (file)
@@ -233,6 +233,54 @@ IF num_uris > 0;
         -%]
     </li>
     [%- END %]
+    [%- IF attrs.producer %]
+        <li id='rdetail_producer'>
+            <strong class='rdetail_label'>[% l("Producer:") %]</strong>
+            <span class='rdetail_value'>
+            [%- IF attrs.prodplace; %]
+                <span>[% attrs.prodplace | html; %]</span>
+            [%- END; %]
+                <span>[% attrs.producer | html; %]</span>
+            [%- IF attrs.proddate; %]
+                <span>[% attrs.proddate | html; %]</span>
+            [%- END; %]
+            </span>
+        </li>
+    [%- END %]
+    [%- IF attrs.distributor %]
+        <li id='rdetail_distributor'>
+            <strong class='rdetail_label'>[% l("Distributor:") %]</strong>
+            <span class='rdetail_value'>
+            [%- IF attrs.distplace; %]
+                <span>[% attrs.distplace | html; %]</span>
+            [%- END; %]
+                <span>[% attrs.distributor | html; %]</span>
+            [%- IF attrs.distdate; %]
+                <span>[% attrs.distdate | html; %]</span>
+            [%- END; %]
+            </span>
+        </li>
+    [%- END %]
+    [%- IF attrs.manufacturer %]
+        <li id='rdetail_manufacturer'>
+            <strong class='rdetail_label'>[% l("Manufacturer:") %]</strong>
+            <span class='rdetail_value'>
+            [%- IF attrs.manplace; %]
+                <span>[% attrs.manplace | html; %]</span>
+            [%- END; %]
+                <span>[% attrs.manufacturer | html; %]</span>
+            [%- IF attrs.mandate; %]
+                <span>[% attrs.mandate | html; %]</span>
+            [%- END; %]
+            </span>
+        </li>
+    [%- END %]
+    [%- IF attrs.copyright %]
+    <li id='rdetail_copyright'>
+        <strong class='rdetail_label'>[% l("Copyright:") %]</strong>
+        <span class='rdetail_value'>[% attrs.copyright | html_entity; %]</span>
+    </li>
+    [%- END %]
 </ul>
 
 [%- INCLUDE "opac/parts/record/contents.tt2" %]