From 9d2b2319f545f2041448a97e9be284522fb00abe Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 12 Mar 2014 14:12:34 -0400 Subject: [PATCH] LP#1304462: Add additional RDA information to TTOPAC record summary. 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 Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- .../src/templates/opac/parts/misc_util.tt2 | 64 +++++++++++++++++++ .../templates/opac/parts/record/summary.tt2 | 48 ++++++++++++++ 2 files changed, 112 insertions(+) diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index 4a0cf58533..33d1c3f294 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -204,6 +204,70 @@ # 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'); diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index fffd158158..bdb1763914 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -233,6 +233,54 @@ IF num_uris > 0; -%] [%- END %] + [%- IF attrs.producer %] +
  • + [% l("Producer:") %] + + [%- IF attrs.prodplace; %] + [% attrs.prodplace | html; %] + [%- END; %] + [% attrs.producer | html; %] + [%- IF attrs.proddate; %] + [% attrs.proddate | html; %] + [%- END; %] + +
  • + [%- END %] + [%- IF attrs.distributor %] +
  • + [% l("Distributor:") %] + + [%- IF attrs.distplace; %] + [% attrs.distplace | html; %] + [%- END; %] + [% attrs.distributor | html; %] + [%- IF attrs.distdate; %] + [% attrs.distdate | html; %] + [%- END; %] + +
  • + [%- END %] + [%- IF attrs.manufacturer %] +
  • + [% l("Manufacturer:") %] + + [%- IF attrs.manplace; %] + [% attrs.manplace | html; %] + [%- END; %] + [% attrs.manufacturer | html; %] + [%- IF attrs.mandate; %] + [% attrs.mandate | html; %] + [%- END; %] + +
  • + [%- END %] + [%- IF attrs.copyright %] + + [%- END %] [%- INCLUDE "opac/parts/record/contents.tt2" %] -- 2.43.2