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