From 5df35f52768df04e4760d4e335833e4ed07013e3 Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Tue, 19 Jul 2016 14:56:13 -0400 Subject: [PATCH] Added Summary template to git. Included social media links. --- .../kcpl_templates/opac/parts/record/summary.tt2 | 325 +++++++++++++++++++++ 1 file changed, 325 insertions(+) create mode 100644 Open-ILS/src/kcpl_templates/opac/parts/record/summary.tt2 diff --git a/Open-ILS/src/kcpl_templates/opac/parts/record/summary.tt2 b/Open-ILS/src/kcpl_templates/opac/parts/record/summary.tt2 new file mode 100644 index 0000000000..f75f7dc3bf --- /dev/null +++ b/Open-ILS/src/kcpl_templates/opac/parts/record/summary.tt2 @@ -0,0 +1,325 @@ +[% PROCESS "opac/parts/misc_util.tt2"; + USE ResolverResolver; + ctx.page_title = attrs.title | html + ctx.metalinks.push(''); +%] + + + +
+ +[%-# This holds the record summary information %] +
+
+

[% attrs.title_extended | html %]

+ [%- + FOR link880 IN attrs.graphic_titles; + FOR alt IN link880.graphic; + '

'; alt.value | html; '

'; + END; + END; + -%] + [%- INCLUDE "opac/parts/record/authors.tt2" %] +
+
+ [% l('Image of item') %] +
+
+
+ [%- IF attrs.format_label %] + [% FOR format IN attrs.all_formats %] + [% format.label | html %] + [% format.label | html %] + [% END %] + [%- END %] +
+ [%- search_ou = ctx.search_ou; + IF ctx.place_unfillable || + ( attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size + && (ctx.holds_block.enabled != 'true' || !attrs.org_copy_counts.$search_ou.available) + ) + %] + + [%- END -%] +
+ [% IF ctx.user; + INCLUDE "opac/parts/bookbag_actions.tt2"; + %] + [% ELSE; + operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add"; + label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); + %] + + + [% label %] + + [% END %] +
+ + [%- IF ctx.refworks.enabled == 'true' %] + [%- INCLUDE 'opac/parts/record/refworks.tt2' %] + [%- END %] + + + [%- IF ctx.is_staff %] + + [%- END %] +
+
+
+ +[%- IF openurl.enabled == 'true'; + openurls = []; + FOREACH issn IN args.issns; + NEXT IF issn == ''; + openurls = openurls.import(ResolverResolver.resolve_issn(issn, openurl.baseurl)); + END; + IF openurls.size && openurls.0 != ''; +%] +
+ [% l("Electronic resources") %] + +[%- + FOREACH res IN openurls; +%] + + + + + [%- END %] +
[% res.public_name | html %][% res.target_coverage | html %] + [%- IF res.target_embargo != ''; + ' - '; + res.target_embargo | html; + END; + -%] +
+
+[%- END %] +[%- END %] +[%- merged_uris = args.uris.merge(args.online_res); +num_uris = merged_uris.size; +IF num_uris > 0; +-%] +

[% l("Electronic resources") %]

+
+ [%- 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') %]

+

+ [% + # If org hiding is enabled/relevant, only show + # counts for copies within the hiding scope. + count_entry = 0; + FOR count_chunk IN ctx.copy_summary; + IF ctx.org_within_hiding_scope(count_chunk.org_unit); + # always true when hiding is disabled + LAST; + END; + count_entry = count_entry + 1; + END; + l("[quant,_1,current hold,current holds] with [quant,_2,total copy,total copies].", + ctx.record_hold_count, ctx.copy_summary.$count_entry.count) + %] +

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

[% l("Record details") %]

+ + +[%- INCLUDE "opac/parts/record/contents.tt2" %] +[%- INCLUDE "opac/parts/record/subjects.tt2" %] +[%- INCLUDE "opac/parts/record/series.tt2" %] +[%- INCLUDE "opac/parts/record/extras.tt2" %] -- 2.11.0