]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/opac/parts/record/summary.tt2
Show format icons in results and record detail pages
[working/Evergreen.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                                     [% IF attrs.format %]
63                                     <img alt="[% attrs.format %]"
64                                         src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" />
65                                     [% END %]
66                                 </div>
67                             </div>
68                         </td>
69                     </tr>
70                 </table>
71                 <div class='opac-auto-018'>
72                     <table border="0" cellpadding="0" width="100%">
73                         <tr>
74                             <td nowrap='nowrap' valign="top">
75                                 [% IF attrs.isbn %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
76                             </td>
77                             <td valign="top" id='rdetail_isbn'>[% attrs.isbn %]</td>
78                             <td nowrap='nowrap' valign="top">
79                                 [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
80                             </td>
81                             <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc %]</td>
82                         </tr>
83                         <tr>
84                             <td nowrap='nowrap' valign="top">
85                                 <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
86                             </td>
87                             <td valign="top" id='rdetail_edition'>[% attrs.edition %]</td>
88                         </tr>
89                         <tr>
90                             <td nowrap='nowrap' valign="top">
91                                 <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
92                             </td>
93                             <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate %]</td>
94                             <td nowrap='nowrap' valign="top">
95                                 <strong id="rdetail_sum_lbl">Summary</strong>
96                             </td>
97                             <td valign="top" id='rdetail_abstract'></td>
98                         </tr>
99                         <tr>
100                             <td nowrap='nowrap' valign="top">
101                                 <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
102                             </td>
103                             <td valign="top" id='rdetail_publisher'>[% attrs.publisher %]</td>
104                             [% BLOCK render_subject;
105                             loc = CGI.param('loc') | uri;
106                             FOR node IN ctx.marc_xml.findnodes('//*[starts-with(@tag,"6")]');
107                                 all_terms = [];
108                                 FOR subfield IN node.childNodes;
109                                     NEXT UNLESS subfield.nodeName == "subfield";
110                                     code = 0;
111                                     FOR a IN subfield.attributes;
112                                         IF a.nodeName == "code";
113                                             code = a.nodeValue;
114                                         END;
115                                     END;
116                                     NEXT UNLESS code.match('[a-z]');
117
118                                     IF code.match('[vxyz]');
119                                         " &mdash; ";
120                                     END;
121                                     # at this point, we actually have a partial
122                                     # term to use.
123                                     single_term = subfield.textContent | html;
124                                     all_terms.push(subfield.textContent);
125                                     total_term = all_terms.join(" ").replace('\s+$', '') ; # XXX need to take care of any &'s, right?
126                                     '<a href="' _ ctx.opac_root _ '/results?qtype=subject&query=' _ total_term _ '&loc=' _ loc _ '">' _ single_term _ '</a>';
127                                 END;
128                                 "<br />";
129                             END %]
130                             [% END %]
131                             [% s = PROCESS render_subject; IF s.match('\S') %]
132                             <td nowrap='nowrap' valign="top">
133                                 <strong id="rdetail_sub_lbl">[% l("Subjects") %]</strong>
134                             </td>
135                             <td valign="top">[% s %]</td>
136                             [% END %]
137                         </tr>
138                     </table>
139                 </div>
140             </td>
141         </tr>
142     </tbody>
143 </table>
144 <br /><br />
145
146 <table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
147     <thead>
148         <tr id="rdetails_status_head">
149             <td>[% l("Location") %]</td>
150             <td>[% l("Call Number") %]</td>
151             <td>[% l("Barcode") %]</td>
152             <td>[% l("Shelving Location") %]</td>
153             [% IF ctx.is_staff %]
154             <td>[% l("Age Hold Protection") %]</td>
155             <td>[% l("Create Date") %]</td>
156             <td>[% l("Holdable") %]</td>
157             [% END %]
158             <td>[% l("Status") %]</td>
159             <td>[% l("Due Date") %]</td>
160         </tr>
161     </thead>
162     <tbody class="copy_details_table">
163         [% FOR copy_info IN ctx.copies %]
164         <tr>
165             <td>[%
166                 # XXX KCLS-specific kludging
167                 org_name = ctx.find_aou(copy_info.circ_lib).name;
168                 dir = org_name | lower | replace('[^\w]', '') |
169                     replace('.+320th', '320th'); %]
170                 <a href="http://www.kcls.org/[% dir %]/"
171                     class="classic_link">[% org_name %]</a>
172             </td>
173             <td>[% copy_info.call_number_label %]</td>
174             <td>[% copy_info.barcode %]</td>
175             <td>[% copy_info.copy_location %]</td>
176             [% IF ctx.is_staff %]
177             <td>
178                 [% copy_info.age_protect ?
179                     ctx.find_crahp(copy_info.age_protect).name : l('None') %]
180             </td>
181             <td>[% date.format(
182                 ctx.parse_datetime(copy_info.create_date),
183                 DATE_FORMAT
184             ) %]</td>
185             <td>[% (copy_info.holdable == 't' AND
186                     copy_info.location_holdable == 't' AND
187                     copy_info.status_holdable == 't') ? l('Yes') : l('No') %]</td>
188             [% END %]
189             <td>[% copy_info.copy_status %]</td>
190             <td>[%
191                 IF copy_info.due_date;
192                     date.format(
193                         ctx.parse_datetime(copy_info.due_date),
194                         DATE_FORMAT
195                     );
196                 ELSE;
197                     '-';
198                 END %]</td>
199         </tr>
200         [% END %]
201         <tr>
202         [% IF ctx.copy_offset > 0;
203             new_offset = ctx.copy_offset - ctx.copy_limit;
204             IF new_offset < 0; new_offset = 0; END %]
205             <td>
206                 <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% new_offset %]&copy_limit=[% ctx.copy_limit %]">&laquo; [%
207                     l('Previous [_1]', ctx.copy_offset - new_offset)
208                 %]</a>
209             </td>
210         [% END %]
211         [% IF ctx.copies.size >= ctx.copy_limit %]
212             <td>
213                 <a href="[% ctx.opac_root %]/record/[% record.id %]?copy_offset=[% ctx.copy_offset + ctx.copy_limit %]&copy_limit=[% ctx.copy_limit %]">[%
214                     l('Next [_1]', ctx.copy_limit)
215                 %] &raquo;</a>
216             </td>
217         [% END %]
218         </tr>
219     </tbody>
220 </table>
221
222 <div id="rdetail_locs_expand" class="hide_me">
223     <a href="#"><img
224         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
225     <a style="position:relative;top:-3px;" href="#">Show more locations</a>
226 </div>
227
228 <div id="rdetail_locs_collapse" 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="#">Collapse locations</a>
232 </div>
233
234 <div id="rdetail_extras_expand" 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="#">Expand all tabs</a>
238 </div>
239
240 <div id="rdetail_extras_collapse" class="hide_me">
241     <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
242     <a style="position:relative;top:-3px;" href="#">Collapse all tabs</a>
243 </div>
244
245 <div class="hide_me">
246     <table id='' border="0" width="100%">
247         <tbody id='rdetail_details_tbody'>
248             <tr>
249                 <td id='' rowspan='2' valign="top" align="center" style="padding-right:10px;">
250                 </td>
251                 <td class='rdetail_desc' valign="top" colspan="3">
252                     <table border="0" width="100%">
253                         <tr>
254                             <td valign="top">
255                                 <div style="padding-bottom:7px;">
256                                     <strong>[% l("Title") %]:</strong>
257                                 </div>
258                             </td>
259                             <td width="1" valign="top" align="right" style="white-space:nowrap;">
260                                 <a href="[% ctx.opac_root %]/place_hold[% propagator; propagator.length > 1 ? "&" : ""; %]hold_target=[% record.id %]&hold_type=T"><img alt="[% l('Place Hold') %]"
261                                     src="[% ctx.media_prefix %]/images/place_hold.gif" /></a>
262                                 <a href="#" id="rd_reviews_and_more" target="_blank"><img
263                                     alt="[% l('Reviews and More') %]" src="[% ctx.media_prefix %]/images/reviews.gif" /></a>
264                                 <a href="#" id=""><img alt="[% l('Add to My List') %]"
265                                     src="[% ctx.media_prefix %]/images/add_mylist.gif" /></a>
266                             </td>
267                         </tr>
268                     </table>
269                 </td>        
270             </tr>
271             <tr>
272                 <td nowrap='nowrap' colspan="3" valign="bottom" style="padding-bottom:16px;">
273                 </td>
274             </tr>
275             <tr>
276                 <td><div style="height:20px;"></div></td>
277             </tr>
278         </tbody>
279     </table>
280     <!-- Empty span used for creating unAPI links -->
281     <abbr name="unapi" class="unapi-id"> <!-- unAPI URI goes here --> </abbr>
282 </div> <!-- details_body -->
283
284 <!-- ****************** end: rdetail_summary.xml ***************************** -->