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