]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/opac/parts/record/summary.tt2
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac
[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 %]</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.isbn %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
71                             </td>
72                             <td valign="top" id='rdetail_isbn'>[% attrs.isbn %]</td>
73                             <td nowrap='nowrap' valign="top">
74                                 [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
75                             </td>
76                             <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
77                         </tr>
78                         <tr>
79                             <td nowrap='nowrap' valign="top">
80                                 <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
81                             </td>
82                             <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
83                         </tr>
84                         <tr>
85                             <td nowrap='nowrap' valign="top">
86                                 <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
87                             </td>
88                             <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
89                             <td nowrap='nowrap' valign="top">
90                                 <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
91                             </td>
92                             <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
93                         </tr>
94                     </table>
95
96                     <!-- hold/copy summary -->
97                     <div style="padding-top:15px;">
98                         <div>
99                             [% l("[quant,_1,Hold,Holds] with [quant,_2,total copy,total copies]", 
100                                 ctx.record_hold_count, ctx.copy_summary.0.count) %]
101                         </div>
102                         <div>[% l('[quant,_1,Copy,Copies] available', ctx.copy_summary.0.available) %]</div>
103                     </div>
104
105                 </div>
106             </td>
107         </tr>
108     </tbody>
109 </table>
110 <br /><br />
111
112 <table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
113     <thead>
114         <tr id="rdetails_status_head">
115             <td>[% l("Location") %]</td>
116             <td>[% l("Call Number") %]</td>
117             <td>[% l("Barcode") %]</td>
118             <td>[% l("Shelving Location") %]</td>
119             [% IF ctx.is_staff %]
120             <td>[% l("Age Hold Protection") %]</td>
121             <td>[% l("Create Date") %]</td>
122             <td>[% l("Holdable?") %]</td>
123             [% END %]
124             <td>[% l("Status") %]</td>
125             <td>[% l("Due Date") %]</td>
126         </tr>
127     </thead>
128     <tbody class="copy_details_table">
129         [% last_cn = 0;
130         FOR copy_info IN ctx.copies %]
131         <tr>
132             <td>[%
133                 # XXX KCLS-specific kludging
134                 org_name = ctx.get_aou(copy_info.circ_lib).name;
135                 dir = org_name | lower | replace('[^\w]', '') |
136                     replace('.+320th', '320th'); %]
137                 <a href="http://www.kcls.org/[% dir %]/"
138                     class="classic_link">[% org_name %]</a>
139             </td>
140             <td>[% copy_info.call_number_label %]</td>
141             <td>[% copy_info.barcode %]</td>
142             <td>[% copy_info.copy_location %]</td>
143             [% IF ctx.is_staff %]
144             <td>
145                 [% copy_info.age_protect ?
146                     ctx.get_crahp(copy_info.age_protect).name : l('None') %]
147             </td>
148             <td>[% date.format(
149                 ctx.parse_datetime(copy_info.create_date),
150                 DATE_FORMAT
151             ) %]</td>
152             <td>[%  # Show copy/volume hold links to staff (without
153                     # checking whether they have permissions to do those).
154                     overall_holdable = (copy_info.holdable == 't' AND
155                         copy_info.location_holdable == 't' AND
156                         copy_info.status_holdable == 't');
157                     IF overall_holdable;
158                         l("Place on"); %]
159                 <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&amp;" : ""; %]hold_target=[% copy_info.id %]&amp;hold_type=C">[% l("copy") %]</a>
160                 [%      IF copy_info.call_number != last_cn;
161                             last_cn = copy_info.call_number;
162                             l(" / "); %]
163                 <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>
164                 [%      END;
165                     ELSE;
166                         l("No");
167                     END %]</td>
168             [% END %]
169             <td>[% copy_info.copy_status %]</td>
170             <td>[%
171                 IF copy_info.due_date;
172                     date.format(
173                         ctx.parse_datetime(copy_info.due_date),
174                         DATE_FORMAT
175                     );
176                 ELSE;
177                     '-';
178                 END %]</td>
179         </tr>
180         [% END %]
181         <tr>
182         [% IF ctx.copy_offset > 0;
183             new_offset = ctx.copy_offset - ctx.copy_limit;
184             IF new_offset < 0; new_offset = 0; END %]
185             <td>
186                 <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% new_offset %]&amp;copy_limit=[% ctx.copy_limit %]">&laquo; [%
187                     l('Previous [_1]', ctx.copy_offset - new_offset)
188                 %]</a>
189             </td>
190         [% END %]
191         [% IF ctx.copies.size >= ctx.copy_limit %]
192             <td>
193                 <a href="[% ctx.opac_root %]/record/[% ctx.bre_id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %]&amp;copy_limit=[% ctx.copy_limit %]">[%
194                     l('Next [_1]', ctx.copy_limit)
195                 %] &raquo;</a>
196             </td>
197         [% END %]
198         </tr>
199     </tbody>
200 </table>
201
202 <div id="rdetail_locs_expand" class="hide_me">
203     <a href="#"><img
204         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
205     <a style="position:relative;top:-3px;" href="#">[% l('Show more locations') %]</a>
206 </div>
207
208 <div id="rdetail_locs_collapse" class="hide_me">
209     <a href="#"><img
210         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
211     <a style="position:relative;top:-3px;" href="#">[% l('Collapse locations') %]</a>
212 </div>
213
214 <div id="rdetail_extras_expand" class="hide_me">
215     <a href="#"><img
216         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
217     <a style="position:relative;top:-3px;" href="#">[% l('Expand all tabs') %]</a>
218 </div>
219
220 <div id="rdetail_extras_collapse" class="hide_me">
221     <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
222     <a style="position:relative;top:-3px;" href="#">[% l('Collapse all tabs') %]</a>
223 </div>
224
225 <div class="hide_me">
226     <table id='' border="0" width="100%">
227         <tbody id='rdetail_details_tbody'>
228             <tr>
229                 <td id='' rowspan='2' valign="top" align="center" style="padding-right:10px;">
230                 </td>
231                 <td class='rdetail_desc' valign="top" colspan="3">
232                     <table border="0" width="100%">
233                         <tr>
234                             <td valign="top">
235                                 <div style="padding-bottom:7px;">
236                                     <strong>[% l("Title") %]:</strong>
237                                 </div>
238                             </td>
239                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
240                                 <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') %]"
241                                     src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
242                                 <a href="#" id="rd_reviews_and_more" target="_blank"><img
243                                     alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
244                                 <a href="#" id=""><img alt="[% l('Add to My List') %]"
245                                     src="[% ctx.media_prefix %]/images/add_mylist.gif" /></a>
246                             </td>
247                         </tr>
248                     </table>
249                 </td>        
250             </tr>
251             <tr>
252                 <td nowrap='nowrap' colspan="3" valign="bottom" style="padding-bottom:16px;">
253                 </td>
254             </tr>
255             <tr>
256                 <td><div style="height:20px;"></div></td>
257             </tr>
258         </tbody>
259     </table>
260 </div> <!-- details_body -->
261
262 <!-- ****************** end: rdetail_summary.xml ***************************** -->