f151888b697fc0a299772921d22704c25b2f23c0
[evergreen-equinox.git] / Open-ILS / web / templates / default / opac / parts / record / summary.tt2
1 <!-- ****************** rdetail_summary.xml ***************************** -->
2 <abbr class="unapi-id" title='tag:HTTP_HOST,OILS_TIME_YEAR:biblio-record_entry/OILS_OPAC_RID'></abbr><!-- XXX FIXME or remove -->
3 <!-- This holds the record summary information -->
4
5 <table width="100%" border="0" cellpadding="0" cellspacing="0" id="rdetail_details_table">
6     <tbody id="rdetail_details_tbody">
7         <tr>
8             <td width="90" valign="top" id="rdetail_image_cell">
9                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
10                 <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident %]'><img
11                     alt="[% l('Image of item') %]" id='rdetail_image'
12                     src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a>
13                 [% END %]
14                 <br />
15                 <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
16                     <div>[% l("Image provided by") %]</div>
17                     <div>
18                         <a target='_blank' href='[% l("http://amazon.com/dp/") %]'
19                             class='classic_link' id='rdetail.jacket_attrib_link'>[% l("Amazon") %]</a>
20                     </div>
21                 </div>
22             </td>
23     
24             <td valign="top">
25                 <table border="0" cellpadding="0" cellspacing="0" width="100%">
26                     <tr>
27                         <td valign="top">
28                             <span id='rdetail_title'>[% attrs.title %]</span><br />
29                             [% IF attrs.author %]
30                             <span class='opac-auto-030'>[% l("Author") %]:</span>
31                             <em><a title='[% l("Perform an author search") %]'
32                                     id='rdetail_author'
33                                     href="[% ctx.opac_root %]/results?qtype=author&query=[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% CGI.param('loc') | uri %]">[% attrs.author %]</a>
34                             </em>
35                             [% END %]
36                         </td>
37                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
38                             <div style="width:230px;text-align:left;margin-top:3px;">
39                                 <div style="float:right;">
40                                     <div class="rdetail_aux_utils opac-auto-010">
41                                         <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% record.id %]&hold_type=T" id="rdetail_place_hold" class="no-dec"><img
42                                             src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" />
43                                             <span style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
44                                     </div>
45                                     <div class="rdetail_aux_utils opac-auto-121">
46                                         [%  operation = ctx.mylist.grep(record.id).size ? "delete" : "add";
47                                             label = (operation == "add") ? "Add to" : "Remove from"; %]
48                                         <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
49                                             <input type="hidden" name="record" value="[% record.id %]" />
50                                             <div class="pos-abs">
51                                                 <div class="opac-auto-149">
52                                                     <input type="submit" title="[% l(label _ ' my list') %]" value="[% l(label _ ' my list') %]" class="subtle-button" />
53                                                 </div>
54                                             </div>
55                                             <input type="image"
56                                                 alt="[% l(label _ ' my list') %]"
57                                                 src="[% ctx.media_prefix %]/images/clipboard.png" />
58                                         </form>
59                                     </div>
60                                 </div>
61                                 <div style="float:right;margin-right:17px;">
62                                     <img id="rdetail_tor_pic" alt="[% l('Format') %]" class="hide_me" src="" />
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                         <tr>
81                             <td nowrap='nowrap' valign="top">
82                                 <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
83                             </td>
84                             <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
85                             <td nowrap='nowrap' valign="top">
86                                 <strong id="rdetail_form_lbl">[% IF attrs.format; l("Format"); END %]</strong>
87                             </td>
88                             <td valign="top">
89                                 [% IF attrs.format %]
90                                 <img alt="[% l('Format') %]" class='tor_pic'
91                                     title="[% attrs.format %]"
92                                     src="[% ctx.media_prefix _ '/images/' _ attrs.format_icon %]" />
93                                 [%  END %]
94                             </td>
95                         </tr>
96                         <tr>
97                             <td nowrap='nowrap' valign="top">
98                                 <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
99                             </td>
100                             <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
101                             <td nowrap='nowrap' valign="top">
102                                 <strong id="rdetail_sum_lbl">Summary</strong>
103                             </td>
104                             <td valign="top" id='rdetail_abstract'></td>
105                         </tr>
106                         <tr>
107                             <td nowrap='nowrap' valign="top">
108                                 <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
109                             </td>
110                             <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
111                             [% BLOCK render_subject;
112                             loc = CGI.param('loc') | uri;
113                             FOR node IN ctx.marc_xml.findnodes('//*[starts-with(@tag,"6")]');
114                                 all_terms = [];
115                                 FOR subfield IN node.childNodes;
116                                     NEXT UNLESS subfield.nodeName == "subfield";
117                                     code = 0;
118                                     FOR a IN subfield.attributes;
119                                         IF a.nodeName == "code";
120                                             code = a.nodeValue;
121                                         END;
122                                     END;
123                                     NEXT UNLESS code.match('[a-z]');
124
125                                     IF code.match('[vxyz]');
126                                         " &mdash; ";
127                                     END;
128                                     # at this point, we actually have a partial
129                                     # term to use.
130                                     single_term = subfield.textContent | html;
131                                     all_terms.push(subfield.textContent);
132                                     total_term = all_terms.join(" ").replace('\s+$', '') ; # XXX need to take care of any &'s, right?
133                                     '<a href="' _ ctx.opac_root _ '/results?qtype=subject&query=' _ total_term _ '&loc=' _ loc _ '">' _ single_term _ '</a>';
134                                 END;
135                                 "<br />";
136                             END %]
137                             [% END %]
138                             [% s = PROCESS render_subject; IF s.match('\S') %]
139                             <td nowrap='nowrap' valign="top">
140                                 <strong id="rdetail_sub_lbl">[% l("Subjects") %]</strong>
141                             </td>
142                             <td valign="top">[% s %]</td>
143                             [% END %]
144                         </tr>
145                     </table>
146                 </div>
147             </td>
148         </tr>
149     </tbody>
150 </table>
151 <br /><br />
152
153 <table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
154     <thead>
155         <tr id="rdetails_status_head">
156             <td>[% l("Location") %]</td>
157             <td>[% l("Call Number") %]</td>
158             <td>[% l("Barcode") %]</td>
159             <td>[% l("Shelving Location") %]</td>
160             [% IF ctx.is_staff %]
161             <td>[% l("Age Hold Protection") %]</td>
162             <td>[% l("Create Date") %]</td>
163             <td>[% l("Holdable") %]</td>
164             [% END %]
165             <td>[% l("Status") %]</td>
166             <td>[% l("Due Date") %]</td>
167         </tr>
168     </thead>
169     <tbody class="copy_details_table">
170         [% FOR copy_info IN ctx.copies %]
171         <tr>
172             <td>[%
173                 # XXX KCLS-specific kludging
174                 org_name = ctx.find_aou(copy_info.circ_lib).name;
175                 dir = org_name | lower | replace('[^\w]', '') |
176                     replace('.+320th', '320th'); %]
177                 <a href="http://www.kcls.org/[% dir %]/"
178                     class="classic_link">[% org_name %]</a>
179             </td>
180             <td>[% copy_info.call_number_label %]</td>
181             <td>[% copy_info.barcode %]</td>
182             <td>[% copy_info.copy_location %]</td>
183             [% IF ctx.is_staff %]
184             <td>
185                 [% copy_info.age_protect ?
186                     ctx.find_crahp(copy_info.age_protect).name : l('None') %]
187             </td>
188             <td>[% date.format(
189                 ctx.parse_datetime(copy_info.create_date),
190                 DATE_FORMAT
191             ) %]</td>
192             <td>[% (copy_info.holdable == 't' AND
193                     copy_info.location_holdable == 't' AND
194                     copy_info.status_holdable == 't') ? l('Yes') : l('No') %]</td>
195             [% END %]
196             <td>[% copy_info.copy_status %]</td>
197             <td>[%
198                 IF copy_info.due_date;
199                     date.format(
200                         ctx.parse_datetime(copy_info.due_date),
201                         DATE_FORMAT
202                     );
203                 ELSE;
204                     '-';
205                 END %]</td>
206         </tr>
207         [% END %]
208         <tr>
209         [% IF ctx.copy_offset > 0;
210             new_offset = ctx.copy_offset - ctx.copy_limit;
211             IF new_offset < 0; new_offset = 0; END %]
212             <td>
213                 <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% new_offset %]&copy_limit=[% ctx.copy_limit %]">&laquo; [%
214                     l('Previous [_1]', ctx.copy_offset - new_offset)
215                 %]</a>
216             </td>
217         [% END %]
218         [% IF ctx.copies.size >= ctx.copy_limit %]
219             <td>
220                 <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %]&copy_limit=[% ctx.copy_limit %]">[%
221                     l('Next [_1]', ctx.copy_limit)
222                 %] &raquo;</a>
223             </td>
224         [% END %]
225         </tr>
226     </tbody>
227 </table>
228
229 <div id="rdetail_locs_expand" class="hide_me">
230     <a href="#"><img
231         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
232     <a style="position:relative;top:-3px;" href="#">Show more locations</a>
233 </div>
234
235 <div id="rdetail_locs_collapse" class="hide_me">
236     <a href="#"><img
237         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
238     <a style="position:relative;top:-3px;" href="#">Collapse locations</a>
239 </div>
240
241 <div id="rdetail_extras_expand" class="hide_me">
242     <a href="#"><img
243         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
244     <a style="position:relative;top:-3px;" href="#">Expand all tabs</a>
245 </div>
246
247 <div id="rdetail_extras_collapse" class="hide_me">
248     <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
249     <a style="position:relative;top:-3px;" href="#">Collapse all tabs</a>
250 </div>
251
252 <div class="hide_me">
253     <table id='' border="0" width="100%">
254         <tbody id='rdetail_details_tbody'>
255             <tr>
256                 <td id='' rowspan='2' valign="top" align="center" style="padding-right:10px;">
257                 </td>
258                 <td class='rdetail_desc' valign="top" colspan="3">
259                     <table border="0" width="100%">
260                         <tr>
261                             <td valign="top">
262                                 <div style="padding-bottom:7px;">
263                                     <strong>[% l("Title") %]:</strong>
264                                 </div>
265                             </td>
266                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
267                                 <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% record.id %]&hold_type=T"><img alt="[% l('Place Hold') %]"
268                                     src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
269                                 <a href="#" id="rd_reviews_and_more" target="_blank"><img
270                                     alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
271                                 <a href="#" id=""><img alt="[% l('Add to My List') %]"
272                                     src="[% ctx.media_prefix %]/images/add_mylist.gif" /></a>
273                             </td>
274                         </tr>
275                     </table>
276                 </td>        
277             </tr>
278             <tr>
279                 <td nowrap='nowrap' colspan="3" valign="bottom" style="padding-bottom:16px;">
280                 </td>
281             </tr>
282             <tr>
283                 <td><div style="height:20px;"></div></td>
284             </tr>
285         </tbody>
286     </table>
287     <!-- Empty span used for creating unAPI links -->
288     <abbr name="unapi" class="unapi-id"> <!-- unAPI URI goes here --> </abbr>
289 </div> <!-- details_body -->
290
291 <!-- ****************** end: rdetail_summary.xml ***************************** -->