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