From: Thomas Berezansky Date: Mon, 15 Oct 2012 19:22:41 +0000 (-0400) Subject: Extracted MVLC TPac customizations X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9f8f38fae3937c1a5844126d463b6993ae0dd2f5;p=working%2FEvergreen.git Extracted MVLC TPac customizations Or at least some of them. Signed-off-by: Thomas Berezansky --- diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index c188e97f57..ae73fd7289 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -31,10 +31,17 @@ FOR sub IN xml.findnodes('//*[@tag="100"]/*[@code="a"]'); args.authors.push(sub.textContent); END; + FOR sub IN xml.findnodes('//*[@tag="110"]/*[@code="a"]'); + args.authors.push(sub.textContent); + END; + FOR sub IN xml.findnodes('//*[@tag="111"]/*[@code="a"]'); + args.authors.push(sub.textContent); + END; args.author = (args.authors.size) ? args.authors.0 : ''; # Include subfields 'abnp' to generate a more comprehensive title display in search results - titresults = xml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b" or @code="n" or @code="p"]'); + # MVLC added subfield s because our members want to see things like "widescreen" for some reason, and h for "electronic resource" stuff + titresults = xml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b" or @code="n" or @code="p" or @code="s" or @code="h"]'); titresults_content = []; FOR sub IN titresults; titresults_content.push(sub.textContent); END; args.title = titresults_content.join(" "); @@ -83,6 +90,36 @@ END; args.edition = (args.editions.size) ? args.editions.0 : ''; + args.notes = []; + FOR sub IN xml.findnodes('//*[@tag="500"]/*[@code="a"]'); + args.notes.push(sub.textContent); + END; + args.note = (args.notes.size) ? args.notes.0 : ''; + + args.performers = []; + FOR sub IN xml.findnodes('//*[@tag="511"]/*[@code="a"]'); + args.performers.push(sub.textContent); + END; + args.performer = (args.performers.size) ? args.performers.0 : ''; + + args.audiences = []; + FOR sub IN xml.findnodes('//*[@tag="521"]/*[@code="a"]'); + args.audiences.push(sub.textContent); + END; + args.audience = (args.audiences.size) ? args.audiences.0 : ''; + + args.sysdetails_hunt = []; + FOR sub IN xml.findnodes('//*[@tag="538"]/*[@code="a"]'); + args.sysdetails_hunt.push(sub.textContent); + END; + args.sysdetails = (args.sysdetails_hunt.size) ? args.sysdetails_hunt.0 : ''; + + args.languages = []; + FOR sub IN xml.findnodes('//*[@tag="546"]/*[@code="a"]'); + args.languages.push(sub.textContent); + END; + args.language = (args.languages.size) ? args.languages.0 : ''; + phys_content = []; FOR sub IN xml.findnodes( '//*[@tag="300"]/*[@code="a" or @code="b" or @code="c" or @code="e"]' diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index b750df6ce8..e6f1293973 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -104,21 +104,6 @@ IF num_uris > 0; [%- IF num_uris > 1 %][% END %] [%- END %] -[%- # Hold/copy summary - IF ctx.copy_summary.0.count -%] -
-[%- INCLUDE "opac/parts/record/copy_counts.tt2" %] - -

[% l('Current holds') %]

-

- [%- l("[quant,_1,current hold,current holds] with [quant,_2,total copy,total copies].", - ctx.record_hold_count, ctx.copy_summary.0.count) %] -

-
-[%- INCLUDE "opac/parts/record/copy_table.tt2" copies=ctx.copies %] -
-[%- END %]

[% l("Record details") %]

+[%- IF attrs.summary || attrs.note || attrs.performer || attrs.audience || attrs.sysdetails || attrs.language %] +

[% l('Additional Information') %]

+ +[%- END %] + +[%- # Hold/copy summary + IF ctx.copy_summary.0.count +%] +
+[%- INCLUDE "opac/parts/record/copy_counts.tt2" %] + +

[% l('Current holds') %]

+

+ [%- l("[quant,_1,current hold,current holds] with [quant,_2,total copy,total copies].", + ctx.record_hold_count, ctx.copy_summary.0.count) %] +

+
+[%- INCLUDE "opac/parts/record/copy_table.tt2" copies=ctx.copies %] +
+[%- END %] + + + [%- INCLUDE "opac/parts/record/subjects.tt2" %] [%- INCLUDE "opac/parts/record/series.tt2" %] [%- INCLUDE "opac/parts/record/extras.tt2" %] diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index 48f8be050f..6ccf63f81d 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -70,15 +70,24 @@ - [% IF args.holdings.size > 0 %] - - - - + [% IF attrs.summary %] + + + + + [% END %] + [% IF attrs.phys_desc %] + + + + [% END %] - [% IF CGI.param('detail_record_view') %] @@ -131,16 +140,6 @@ [% END %] - [% IF attrs.phys_desc %] - - - - - [% END %] [% FOR uri IN args.uris %]
- [% l('Call number:') %] - [% args.holdings.0.label | html %]
+ [% l('Summary:') %] + [% attrs.summary | html %]
+ [% l('Phys. Desc.:') %] + + [% args.phys_desc | html %] +
[% attrs.edition | html %]
- [% l('Phys. Desc.:') %] - - [% args.phys_desc | html %] -
@@ -162,7 +161,7 @@ - + [%- IF has_parts == 'true'; %]
[% l('Library') %][% l('Shelving location') %][% l('Collection') %] [% l('Call number') %][% l('Part') %]