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