]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac/parts/record/summary.tt2
Move the copies up higher
[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 [%- # This holds the record summary information %]
13 <div id="rdetail_image_div" style="float: left; margin-right: 1em;">
14     [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
15     <a href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident | uri %]'><img
16         alt="[% l('Image of item') %]" id='rdetail_image'
17         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/[% record.summary.jacket_size %]/[% ident | uri %]' /></a>
18     [% END %]
19     <br />
20 </div>
21  
22 <div id="rdetail_actions_div" style="float: right; margin-left: 1em;">
23     <div class="rdetail_aux_utils opac-auto-010">
24         <a href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => ctx.bre_id, hold_type => 'T'}) %]" 
25         class="no-dec"><img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
26         style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
27     </div>
28     <div class="rdetail_aux_utils opac-auto-121">
29     [%-  
30         operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
31         label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); 
32     %]
33         <a href="[% ctx.opac_root %]/mylist/[% operation %]?record=[% ctx.bre_id %]" class="no-dec">
34             <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
35             [% label %]
36         </a>
37     </div>
38 </div>
39
40 <div id='rdetail_title_div'>
41     <h1 id='rdetail_title'>[% attrs.title_extended | html %]</h1>
42     [%- INCLUDE "opac/parts/record/authors.tt2" %]
43     [%- IF attrs.format_icon %]
44     <div style="float:right;margin-right:17px;">
45         <img alt="[% attrs.format_label %]" title="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
46     </div>
47     [%- END %]
48     [%- IF openurl.enabled == 'true';
49         sfx = []
50         FOR issn IN args.issns;
51             sfx = sfx.import(ResolverResolver.resolve_issn(issn, openurl.baseurl));
52         END;
53         IF sfx.size && sfx.0 != '';
54     %]
55         <div id='rdetail_openurl'>
56             <strong class='rdetail_openurl_title'>[% l("Electronic resources") %]</strong>
57             <table><tbody>
58     [%-
59             FOR res IN sfx;
60     %]
61             <tr>
62                 <td class='rdetail_openurl_entry'><a href="[% res.target_url %]">[% res.public_name %]</a></td>
63                 <td>[% res.target_coverage %]</td>
64             </tr>
65         [%- END %]
66         </tbody></table>
67     [%- END %]
68     [%- IF sfx.size && sfx.0 != '' %]
69         </div>    
70     [%- END %]
71     [%- FOR uri IN args.uris; %]
72     <div class="rdetail_uri">
73         <a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]
74     </div>
75     [%- END %]
76     [%- # hold/copy summary %]
77     [%- IF ctx.copy_summary.0.count %]
78     <div class="rdetail_copy_counts">
79         <span>
80             [%- l("[quant,_1,current hold,current holds] with [quant,_2,total copy,total copies].", 
81                 ctx.record_hold_count, ctx.copy_summary.0.count) %]
82         </span>
83         <span>[% l('[quant,_1,copy,copies] currently available.', ctx.copy_summary.0.available) %]</span>
84     </div>
85     [% END %]
86 </div>
87
88 [%- IF ctx.copy_summary.0.count %]
89 <div id='rdetail_copies'>
90 <h2>[% l('Copies') %]</h2>
91 <table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
92     <thead>
93         <tr>
94             <th id='copy_header_library'>[% l("Location") %]</th>
95             <th id='copy_header_callnmber'>[% l("Call Number") %]</th>
96             <th id='copy_header_barcode'>[% l("Barcode") %]</th>
97             <th id='copy_header_shelfloc'>[% l("Shelving Location") %]</th>
98             [% IF ctx.is_staff %]
99             <th id='copy_header_age_hold'>[% l("Age Hold Protection") %]</th>
100             <th id='copy_header_create_date'>[% l("Create Date") %]</th>
101             <th id='copy_header_holdable'>[% l("Holdable?") %]</th>
102             [% END %]
103             <th id='copy_header_status'>[% l("Status") %]</th>
104             <th id='copy_header_due_date'>[% l("Due Date") %]</th>
105         </tr>
106     </thead>
107     <tbody class="copy_details_table">
108         [% last_cn = 0;
109         FOR copy_info IN ctx.copies;
110             NEXT IF copy_info.call_number_label == '##URI##' %]
111         <tr>
112             <td header='copy_header_library'>
113             [%-
114                 org_name = ctx.get_aou(copy_info.circ_lib).name;
115                 org_name | html
116             -%]
117             </td>
118             <td header='copy_header_callnumber'>[% copy_info.call_number_label | html %]</td>
119             <td header='copy_header_barcode'>[% copy_info.barcode | html %]</td>
120             <td header='copy_header_shelfloc'>[% copy_info.copy_location | html %]</td>
121             [% IF ctx.is_staff %]
122             <td header='copy_header_age_hold'>
123                 [% copy_info.age_protect ?
124                     ctx.get_crahp(copy_info.age_protect).name : l('None') | html %]
125             </td>
126             <td header='copy_header_date_format'>[% date.format(
127                 ctx.parse_datetime(copy_info.create_date),
128                 DATE_FORMAT
129             ) %]</td>
130             <td header='copy_header_holdable'>[%  # Show copy/volume hold links to staff (without
131                     # checking whether they have permissions to do those).
132                     overall_holdable = (copy_info.holdable == 't' AND
133                         copy_info.location_holdable == 't' AND
134                         copy_info.status_holdable == 't');
135                     IF overall_holdable;
136                         l("Place on"); %]
137                 <a href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => copy_info.id, hold_type => 'C'}) %]">[% l("copy") %]</a>
138                 [%      IF copy_info.call_number != last_cn;
139                             last_cn = copy_info.call_number;
140                             l(" / "); %]
141                 <a href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => copy_info.call_number, hold_type => 'V'}) %]">[% l("volume") %]</a>
142                 [%      END;
143                     ELSE;
144                         l("No");
145                     END %]</td>
146             [% END %]
147             <td header='copy_header_status'>[% copy_info.copy_status | html %]</td>
148             <td header='due_date'>[%
149                 IF copy_info.due_date;
150                     date.format(
151                         ctx.parse_datetime(copy_info.due_date),
152                         DATE_FORMAT
153                     );
154                 ELSE;
155                     '-';
156                 END %]</td>
157         </tr>
158         [% END %]
159         <tr>
160         [% IF ctx.copy_offset > 0;
161             new_offset = ctx.copy_offset - ctx.copy_limit;
162             IF new_offset < 0; new_offset = 0; END %]
163             <td>
164                 <a href="[% mkurl('', {copy_offset => new_offset, copy_limit => ctx.copy_limit}) %]">&laquo; [%
165                     l('Previous [_1]', ctx.copy_offset - new_offset) %]</a>
166             </td>
167         [% END %]
168         [% IF ctx.copies.size >= ctx.copy_limit %]
169             <td>
170                 <a href="[% mkurl('', {copy_offset => ctx.copy_offset + ctx.copy_limit, copy_limit => ctx.copy_limit}) %]">[%
171                     l('Next [_1]', ctx.copy_limit) %] &raquo;</a>
172             </td>
173         [% END %]
174         </tr>
175         <tr>
176             <td>
177                 [% more_copies_limit = 50 %] [%# TODO: config %]
178                 [% IF  ctx.copy_limit != more_copies_limit AND ctx.copies.size >= ctx.copy_limit %]
179                     <div style='margin-top:10px;'>
180                         <img src="[% ctx.media_prefix %]/images/plus_sign.png" />
181                         <a href="[% mkurl('', {copy_limit => more_copies_limit, copy_offset => 0}) %]">[% l('Show more copies') %]</a>
182                     </div>
183                 [% ELSIF ctx.copy_limit == more_copies_limit %]
184                     <div style='margin-top:10px;'>
185                         <img src="[% ctx.media_prefix %]/images/minus_sign.png" />
186                         <a href="[% mkurl('', {copy_limit => 0, copy_offset => 0}) %]">[% l('Show fewer copies') %]</a>
187                     </div>
188                 [% END %]
189             </td>
190         </tr>
191     </tbody>
192 </table>
193 </div>
194 [%- END %]
195
196 <h2 id='rdetail_record_details'>[% l("Record details") %]</h2>
197 <ul>
198     [%- IF attrs.isbns.0; FOR isbn IN attrs.isbns %]
199     <li class='rdetail_isbns'>
200         <strong class='rdetail_label'>[% l('ISBN:'); %]</strong>
201         <span class='rdetail_value'>[% isbn | html  %]</span>
202     </li>
203         [%- END %]
204     [%- END %]
205     [%- IF attrs.issns.0; FOR issn IN attrs.issns %]
206     <li class='rdetail_issns'>
207         <strong class='rdetail_label'>[% l('ISSN:'); %]</strong>
208         <span class='rdetail_value'>[% issn | html  %]</span>
209     </li>
210         [%- END %]
211     [%- END %]
212
213     [%- IF attrs.phys_desc %]
214     <li id='rdetail_phys_desc'>
215         <strong class='rdetail_label'>[% l("Physical Description:") %]</strong>
216         <span class='rdetail_value'>[% attrs.phys_desc | html %]</span>
217     </li>
218     [%- END %]
219     [%- IF attrs.edition %]
220     <li id='rdetail_edition'>
221         <strong class='rdetail_label'>[% l("Edition:") %]</strong>
222         <span class='rdetail_value'>[% attrs.edition | html %]</span>
223     </li>
224     [%- END %]
225     [%- IF attrs.publisher %]
226     <li id='rdetail_publisher'>
227         <strong class='rdetail_label'>[% l("Publisher:") %]</strong>
228         <span class='rdetail_value'>[% attrs.publisher | html %] [% IF attrs.pubdate; attrs.pubdate | html; END %]</span>
229     </li>
230     [%- END %]
231 </ul>
232
233
234 [%- INCLUDE "opac/parts/record/subjects.tt2" %]
235
236 <h2 class='rdetail_related_series'>[% l('Search for related items by series') %]</h2>
237 [%- INCLUDE "opac/parts/record/series.tt2" %]