]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/default/opac/parts/record/summary.tt2
Merge remote branch 'esi/template-toolkit-opac' into template-toolkit-opac-master...
[working/Evergreen.git] / Open-ILS / src / templates / default / opac / parts / record / summary.tt2
1 [%  PROCESS "default/opac/parts/misc_util.tt2";
2     USE ResolverResolver;
3     ctx.page_title = attrs.title | html_entity
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.enable == 'true' %]
9     [% INCLUDE 'default/opac/parts/record/refworks.tt2' %]
10 [% END %]
11
12 <!-- This holds the record summary information -->
13
14 <table width="100%" border="0" cellpadding="0" cellspacing="0" id="rdetail_details_table">
15     <tbody id="rdetail_details_tbody">
16         <tr>
17             <td width="90" valign="top" id="rdetail_image_cell">
18                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
19                 <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident %]'><img
20                     alt="[% l('Image of item') %]" id='rdetail_image'
21                     src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident %]' /></a>
22                 [% END %]
23                 <br />
24             </td>
25     
26             <td valign="top">
27                 <table border="0" cellpadding="0" cellspacing="0" width="100%">
28                     <tr>
29                         <td valign="top">
30                             <span id='rdetail_title'>[% attrs.title %]</span><br />
31                             [% IF attrs.author %]
32                             <span class='opac-auto-030'>[% l("Author") %]:</span>
33                             <em><a title='[% l("Perform an author search") %]'
34                                     id='rdetail_author'
35                                     href="[% ctx.opac_root %]/results?qtype=author&amp;query=[%-
36                                         attrs.author | replace('[,\.:;]', '') | uri %]&amp;loc=[% CGI.param('loc') | uri %]">[% attrs.author %]</a></em>
37                             [% END %]
38                         </td>
39                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
40                             <div style="width:280px;text-align:left;margin-top:3px;">
41                                 <div style="float:right;">
42                                     <div class="rdetail_aux_utils opac-auto-010">
43                                         <a href="[% ctx.opac_root %]/place_hold[%-
44                                             propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% ctx.bre_id %]&amp;hold_type=T" id="rdetail_place_hold" class="no-dec"><img
45                                             src="[% ctx.media_prefix %]/images/green_check.png" alt="" /><span 
46                                                 style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
47                                     </div>
48                                     <div class="rdetail_aux_utils opac-auto-121">
49                                         [%  
50                                             operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
51                                             label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); 
52                                         %]
53                                         <a href="[% ctx.opac_root %]/mylist/[% operation %]?record=[% ctx.bre_id %]" class="no-dec">
54                                             <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
55                                             [% label %]
56                                         </a>
57                                     </div>
58                                 </div>
59                                 <div style="float:right;margin-right:17px;">
60                                     [% IF attrs.format_icon %]
61                                     <img alt="[% attrs.format_label %]" title="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
62                                     [% END %]
63                                 </div>
64                             </div>
65                         </td>
66                     </tr>
67                 </table>
68                 <div class='opac-auto-018'>
69                     <table border="0" cellpadding="0" width="100%">
70                         <tr>
71                             <td nowrap='nowrap' valign="top">
72                                 [% IF attrs.isbn %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
73                             </td>
74                             <td valign="top" id='rdetail_isbn'>[% attrs.isbn %]</td>
75                             <td nowrap='nowrap' valign="top">
76                                 [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
77                             </td>
78                             <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
79                         </tr>
80                         [% IF openurl.enabled == 'true';
81                             FOR issn IN args.issns;
82                                 sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
83                                 FOR res IN sfx;
84                         %]
85                             <tr name="results_issn_tr">
86                                 <td valign="top">
87                                     <strong><a href="[% res.target_url %]">
88                                         [% res.public_name %]</a></strong>
89                                 </td>
90                                 <td>[% res.target_coverage %]</td>
91                             </tr>
92                                 [% END %]
93                             [% END %]
94                         [% END %]
95                         <tr>
96                             <td nowrap='nowrap' valign="top">
97                                 <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
98                             </td>
99                             <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
100                         </tr>
101                         <tr>
102                             <td nowrap='nowrap' valign="top">
103                                 <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
104                             </td>
105                             <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
106                             <td nowrap='nowrap' valign="top">
107                                 <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
108                             </td>
109                             <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
110                         </tr>
111                     </table>
112
113                     <!-- hold/copy summary -->
114                     <div style="padding-top:15px;">
115                         <div>
116                             [% l("[quant,_1,Hold,Holds] with [quant,_2,total copy,total copies]", 
117                                 ctx.record_hold_count, ctx.copy_summary.0.count) %]
118                         </div>
119                         <div>[% l('[quant,_1,Copy,Copies] available', ctx.copy_summary.0.available) %]</div>
120                     </div>
121
122                 </div>
123             </td>
124         </tr>
125     </tbody>
126 </table>
127 <br />
128
129 [% FOR uri IN args.uris %]
130 <div class="rdetail_uri">
131     <a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]
132 </div>
133 [% END %]
134
135 <br />
136
137 <table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
138     <thead>
139         <tr id="rdetails_status_head">
140             <td>[% l("Location") %]</td>
141             <td>[% l("Call Number") %]</td>
142             <td>[% l("Barcode") %]</td>
143             <td>[% l("Shelving Location") %]</td>
144             [% IF ctx.is_staff %]
145             <td>[% l("Age Hold Protection") %]</td>
146             <td>[% l("Create Date") %]</td>
147             <td>[% l("Holdable?") %]</td>
148             [% END %]
149             <td>[% l("Status") %]</td>
150             <td>[% l("Due Date") %]</td>
151         </tr>
152     </thead>
153     <tbody class="copy_details_table">
154         [% last_cn = 0;
155         FOR copy_info IN ctx.copies;
156             NEXT IF copy_info.call_number_label == '##URI##' %]
157         <tr>
158             <td>[%
159                 # XXX KCLS-specific kludging
160                 org_name = ctx.get_aou(copy_info.circ_lib).name;
161                 dir = org_name | lower | replace('[^\w]', '') |
162                     replace('.+320th', '320th'); %]
163                 <a href="http://www.kcls.org/[% dir %]/"
164                     class="classic_link">[% org_name %]</a>
165             </td>
166             <td>[% copy_info.call_number_label %]</td>
167             <td>[% copy_info.barcode %]</td>
168             <td>[% copy_info.copy_location %]</td>
169             [% IF ctx.is_staff %]
170             <td>
171                 [% copy_info.age_protect ?
172                     ctx.get_crahp(copy_info.age_protect).name : l('None') %]
173             </td>
174             <td>[% date.format(
175                 ctx.parse_datetime(copy_info.create_date),
176                 DATE_FORMAT
177             ) %]</td>
178             <td>[%  # Show copy/volume hold links to staff (without
179                     # checking whether they have permissions to do those).
180                     overall_holdable = (copy_info.holdable == 't' AND
181                         copy_info.location_holdable == 't' AND
182                         copy_info.status_holdable == 't');
183                     IF overall_holdable;
184                         l("Place on"); %]
185                 <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% copy_info.id %]&amp;hold_type=C">[% l("copy") %]</a>
186                 [%      IF copy_info.call_number != last_cn;
187                             last_cn = copy_info.call_number;
188                             l(" / "); %]
189                 <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% copy_info.call_number %]&amp;hold_type=V">[% l("volume") %]</a>
190                 [%      END;
191                     ELSE;
192                         l("No");
193                     END %]</td>
194             [% END %]
195             <td>[% copy_info.copy_status %]</td>
196             <td>[%
197                 IF copy_info.due_date;
198                     date.format(
199                         ctx.parse_datetime(copy_info.due_date),
200                         DATE_FORMAT
201                     );
202                 ELSE;
203                     '-';
204                 END %]</td>
205         </tr>
206         [% END %]
207         <tr>
208         [% IF ctx.copy_offset > 0;
209             new_offset = ctx.copy_offset - ctx.copy_limit;
210             IF new_offset < 0; new_offset = 0; END %]
211             <td>
212                 <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% new_offset %]&amp;copy_limit=[% ctx.copy_limit %]">&laquo; [%
213                     l('Previous [_1]', ctx.copy_offset - new_offset)
214                 %]</a>
215             </td>
216         [% END %]
217         [% IF ctx.copies.size >= ctx.copy_limit %]
218             <td>
219                 <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %]&amp;copy_limit=[% ctx.copy_limit %]">[%
220                     l('Next [_1]', ctx.copy_limit)
221                 %] &raquo;</a>
222             </td>
223         [% END %]
224         </tr>
225     </tbody>
226 </table>
227
228 <div id="rdetail_locs_expand" class="hide_me">
229     <a href="#"><img
230         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
231     <a style="position:relative;top:-3px;" href="#">[% l('Show more locations') %]</a>
232 </div>
233
234 <div id="rdetail_locs_collapse" class="hide_me">
235     <a href="#"><img
236         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
237     <a style="position:relative;top:-3px;" href="#">[% l('Collapse locations') %]</a>
238 </div>
239
240 <div id="rdetail_extras_expand" class="hide_me">
241     <a href="#"><img
242         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
243     <a style="position:relative;top:-3px;" href="#">[% l('Expand all tabs') %]</a>
244 </div>
245
246 <div id="rdetail_extras_collapse" class="hide_me">
247     <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
248     <a style="position:relative;top:-3px;" href="#">[% l('Collapse all tabs') %]</a>
249 </div>
250
251 <div class="hide_me">
252     <table id='' border="0" width="100%">
253         <tbody id='rdetail_details_tbody'>
254             <tr>
255                 <td id='' rowspan='2' valign="top" align="center" style="padding-right:10px;">
256                 </td>
257                 <td class='rdetail_desc' valign="top" colspan="3">
258                     <table border="0" width="100%">
259                         <tr>
260                             <td valign="top">
261                                 <div style="padding-bottom:7px;">
262                                     <strong>[% l("Title") %]:</strong>
263                                 </div>
264                             </td>
265                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
266                                 <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% ctx.bre_id %]&amp;hold_type=T"><img alt="[% l('Place Hold') %]"
267                                     src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
268                                 <a href="#" id="rd_reviews_and_more" target="_blank"><img
269                                     alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
270                                 <a href="#" id=""><img alt="[% l('Add to My List') %]"
271                                     src="[% ctx.media_prefix %]/images/add_mylist.gif" /></a>
272                             </td>
273                         </tr>
274                     </table>
275                 </td>        
276             </tr>
277             <tr>
278                 <td nowrap='nowrap' colspan="3" valign="bottom" style="padding-bottom:16px;">
279                 </td>
280             </tr>
281             <tr>
282                 <td><div style="height:20px;"></div></td>
283             </tr>
284         </tbody>
285     </table>
286 </div> <!-- details_body -->
287
288 <!-- ****************** end: rdetail_summary.xml ***************************** -->