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