]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/parts/record/summary.tt2
786703630f86f62c158a032ce27b382d18204724
[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()}) %]" 
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}) %]" class="no-dec">
38                 <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
39                 [% label %]
40             </a>
41         </div>
42     </div>
43     <div id='rdetail_title_div'>
44         [%- IF attrs.format_icon %]
45         <div class="format_icon">
46             <img alt="[% attrs.format_label %]" title="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
47         </div>
48         [%- END %]
49         <h1 id='rdetail_title'>[% attrs.title_extended | html %]</h1>
50         [%- INCLUDE "opac/parts/record/authors.tt2" %]
51     </div>
52 </div>
53
54 [%- IF openurl.enabled == 'true';
55     openurls = [];
56     FOREACH issn IN args.issns;
57         NEXT IF issn == '';
58         openurls = openurls.import(ResolverResolver.resolve_issn(issn, openurl.baseurl));
59     END;
60     IF openurls.size && openurls.0 != '';
61 %]
62     <div id='rdetail_openurl'>
63         <strong class='rdetail_openurl_title'>[% l("Electronic resources") %]</strong>
64         <table><tbody>
65 [%-
66         FOREACH res IN openurls;
67 %]
68         <tr>
69             <td class='rdetail_openurl_entry'><a href="[% res.target_url %]">[% res.public_name %]</a></td>
70             <td>[% res.target_coverage %]</td>
71         </tr>
72     [%- END %]
73     </tbody></table>
74 [%- END %]
75     </div>    
76 [%- END %]
77 [%- merged_uris = args.uris.merge(args.online_res);
78 num_uris = merged_uris.size;
79 IF num_uris > 0;
80 -%]
81 <h2 class="rdetail_uris">[% l("Electronic resources") %]</h2>
82 <div class="rdetail_uris">
83     [%- IF num_uris > 1 %]<ul>[% END %]
84     [%- FOR uri IN merged_uris %]
85         [%- IF num_uris == 1 %]<p class="rdetail_uri">[% ELSE %]<li class="rdetail_uri">[% END %]
86         <a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]
87         [%- IF num_uris == 1 %]</p>[% ELSE %]</li>[% END %]
88     [%- END %]
89     [%- IF num_uris > 1 %]</ul>[% END %]
90 </div>
91 [%- END %]
92 [%- # Hold/copy summary
93     IF ctx.copy_summary.0.count
94 %]
95 <div id="copy_hold_counts">
96 [%- INCLUDE "opac/parts/record/copy_counts.tt2" %]
97     <span id="rdetail_hold_counts">
98         <h2>[% l('Current holds') %]</h2>
99         <p>
100             [%- l("[quant,_1,current hold,current holds] with [quant,_2,total copy,total copies].", 
101                 ctx.record_hold_count, ctx.copy_summary.0.count) %]
102         </p>
103     </span>
104 [%- INCLUDE "opac/parts/record/copy_table.tt2" %]
105 </div>
106 [%- END %]
107
108 <h2 id='rdetail_record_details'>[% l("Record details") %]</h2>
109 <ul>
110     [%- IF attrs.isbns.0; FOR isbn IN attrs.isbns %]
111     <li class='rdetail_isbns'>
112         <strong class='rdetail_label'>[% l('ISBN:'); %]</strong>
113         <span class='rdetail_value'>[% isbn | html  %]</span>
114     </li>
115         [%- END %]
116     [%- END %]
117     [%- IF attrs.issns.0; FOR issn IN attrs.issns %]
118     <li class='rdetail_issns'>
119         <strong class='rdetail_label'>[% l('ISSN:'); %]</strong>
120         <span class='rdetail_value'>[% issn | html  %]</span>
121     </li>
122         [%- END %]
123     [%- END %]
124     [%- IF attrs.phys_desc %]
125     <li id='rdetail_phys_desc'>
126         <strong class='rdetail_label'>[% l("Physical Description:") %]</strong>
127         <span class='rdetail_value'>[% attrs.phys_desc | html %]</span>
128     </li>
129     [%- END %]
130     [%- IF attrs.edition %]
131     <li id='rdetail_edition'>
132         <strong class='rdetail_label'>[% l("Edition:") %]</strong>
133         <span class='rdetail_value'>[% attrs.edition | html %]</span>
134     </li>
135     [%- END %]
136     [%- IF attrs.publisher %]
137     <li id='rdetail_publisher'>
138         <strong class='rdetail_label'>[% l("Publisher:") %]</strong>
139         <span class='rdetail_value'>[% attrs.publisher | html %] [% IF attrs.pubdate; attrs.pubdate | html; END %]</span>
140     </li>
141     [%- END %]
142 </ul>
143
144 [%- INCLUDE "opac/parts/record/subjects.tt2" %]
145 [%- INCLUDE "opac/parts/record/series.tt2" %]
146 [%- INCLUDE "opac/parts/record/extras.tt2" %]