]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/parts/record/summary.tt2
a5767a1f23b2cb4b0d567ee1cd73a906772ce7ad
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / record / summary.tt2
1 [%  PROCESS "opac/parts/misc_util.tt2";
2     USE ResolverResolver;
3     ctx.page_title = attrs.title | html
4 %]
5 <!-- ****************** rdetail_summary.xml ***************************** -->
6 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
7
8 <hr />
9
10 [%-# This holds the record summary information %]
11 <div id="rdetail_summary_header">
12     <div id="rdetail_image_div">
13         [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
14         <a href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident | uri %]'><img
15             alt="[% l('Image of item') %]" id='rdetail_image'
16             src='[% ctx.media_prefix %]/opac/extras/ac/jacket/[% record.summary.jacket_size %]/[% ident | uri %]' /></a>
17         [% END %]
18         <br />
19     </div>
20
21     <div id="rdetail_actions_div">
22         [%- search_ou = ctx.search_ou;
23             IF ctx.place_unfillable ||
24                 ( attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size > 0
25                     && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
26                 )
27          %]
28         <div class="rdetail_aux_utils place_hold">
29             <a href="[% mkurl(ctx.opac_root _ '/place_hold', 
30                 {hold_target => ctx.bre_id, hold_type => 'T', hold_source_page => mkurl()}, stop_parms) %]" 
31             class="no-dec"><img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
32             class="place_hold">[% l('Place Hold') %]</span></a>
33         </div>
34         [%- END -%]
35         <div class="rdetail_aux_utils toggle_list">
36         [%  IF ctx.user;
37             INCLUDE "opac/parts/bookbag_actions.tt2";
38         %]
39         [%  ELSE;
40             operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
41             label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); 
42         %]
43             <a href="[% mkurl(ctx.opac_root _ '/mylist/' _ operation, {record => ctx.bre_id}, stop_parms) %]" class="no-dec">
44                 <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
45                 [% label %]
46             </a>
47         [% END %]
48         </div>
49         <div class="rdetail_aux_utils">
50             <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
51             <a href="[% mkurl(ctx.opac_root _ '/record/print/' _ ctx.bre_id) %]" class="no-dec">[% l('Print') %]</a> /
52             <a href="[% mkurl(ctx.opac_root _ '/record/email/' _ ctx.bre_id) %]" class="no-dec">[% l('Email') %]</a>
53         </div>
54         [%- IF ctx.refworks.enabled == 'true' %]
55             [%- INCLUDE 'opac/parts/record/refworks.tt2' %]
56         [%- END %]
57     </div>
58     <div id='rdetail_title_div'>
59         [%- IF attrs.format_icon %]
60         <div class="format_icon">
61             <img alt="[% attrs.format_label %]" title="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
62         </div>
63         [%- END %]
64         <h1 id='rdetail_title' itemprop="name">[% attrs.title_extended | html %]</h1>
65         [%- INCLUDE "opac/parts/record/authors.tt2" %]
66     </div>
67 </div>
68
69 [%- IF openurl.enabled == 'true';
70     openurls = [];
71     FOREACH issn IN args.issns;
72         NEXT IF issn == '';
73         openurls = openurls.import(ResolverResolver.resolve_issn(issn, openurl.baseurl));
74     END;
75     IF openurls.size && openurls.0 != '';
76 %]
77     <div id='rdetail_openurl'>
78         <strong class='rdetail_openurl_title'>[% l("Electronic resources") %]</strong>
79         <table><tbody>
80 [%-
81         FOREACH res IN openurls;
82 %]
83         <tr>
84             <td class='rdetail_openurl_entry'><a href="[% res.target_url %]">[% res.public_name %]</a></td>
85             <td>[% res.target_coverage %]</td>
86         </tr>
87     [%- END %]
88     </tbody></table>
89 [%- END %]
90     </div>    
91 [%- END %]
92 [%- merged_uris = args.uris.merge(args.online_res);
93 num_uris = merged_uris.size;
94 IF num_uris > 0;
95 -%]
96 <h2 class="rdetail_uris">[% l("Electronic resources") %]</h2>
97 <div class="rdetail_uris">
98     [%- IF num_uris > 1 %]<ul>[% END %]
99     [%- FOR uri IN merged_uris %]
100         [%- IF num_uris == 1 %]<p class="rdetail_uri">[% ELSE %]<li class="rdetail_uri">[% END %]
101         <a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]
102         [%- IF num_uris == 1 %]</p>[% ELSE %]</li>[% END %]
103     [%- END %]
104     [%- IF num_uris > 1 %]</ul>[% END %]
105 </div>
106 [%- END %]
107 [%- # Hold/copy summary
108     IF ctx.copy_summary.0.count
109 %]
110 <div id="copy_hold_counts">
111 [%- INCLUDE "opac/parts/record/copy_counts.tt2" %]
112     <span id="rdetail_hold_counts">
113         <h2>[% l('Current holds') %]</h2>
114         <p>
115             [%- l("[quant,_1,current hold,current holds] with [quant,_2,total copy,total copies].", 
116                 ctx.record_hold_count, ctx.copy_summary.0.count) %]
117         </p>
118     </span>
119 [%- INCLUDE "opac/parts/record/copy_table.tt2" copies=ctx.copies %]
120 </div>
121 [%- END %]
122
123 <h2 id='rdetail_record_details'>[% l("Record details") %]</h2>
124 <ul>
125     [%- IF attrs.isbns.0; FOR isbn IN attrs.isbns %]
126     <li class='rdetail_isbns'>
127         <strong class='rdetail_label'>[% l('ISBN:'); %]</strong>
128         <span class='rdetail_value' itemprop='isbn'>[% isbn | html  %]</span>
129     </li>
130         [%- END %]
131     [%- END %]
132     [%- IF attrs.issns.0; FOR issn IN attrs.issns %]
133     <li class='rdetail_issns'>
134         <strong class='rdetail_label'>[% l('ISSN:'); %]</strong>
135         <span class='rdetail_value'>[% issn | html  %]</span>
136     </li>
137         [%- END %]
138     [%- END %]
139     [%- IF attrs.phys_desc %]
140     <li id='rdetail_phys_desc'>
141         <strong class='rdetail_label'>[% l("Physical Description:") %]</strong>
142         <span class='rdetail_value'>[% attrs.phys_desc | html %]</span>
143     </li>
144     [%- END %]
145     [%- IF attrs.edition %]
146     <li id='rdetail_edition'>
147         <strong class='rdetail_label'>[% l("Edition:") %]</strong>
148         <span class='rdetail_value'>[% attrs.edition | html %]</span>
149     </li>
150     [%- END %]
151     [%- IF attrs.publisher %]
152     <li id='rdetail_publisher'>
153         <strong class='rdetail_label'>[% l("Publisher:") %]</strong>
154         <span class='rdetail_value' itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
155         [%- IF attrs.pubplace; %]
156             <span itemprop="location">[% attrs.pubplace | html; %]</span>
157         [%- END; %]
158             <span itemprop="name">[% attrs.publisher | html; %]</span>
159         </span>
160         [%- IF attrs.pubdate; %]
161             <span itemprop="datePublished">[% attrs.pubdate | html; %]</span>
162         [%- END; %]
163     </li>
164     [%- END %]
165 </ul>
166
167 [%- INCLUDE "opac/parts/record/contents.tt2" %]
168 [%- INCLUDE "opac/parts/record/subjects.tt2" %]
169 [%- INCLUDE "opac/parts/record/series.tt2" %]
170 [%- INCLUDE "opac/parts/record/extras.tt2" %]