TPac: Removed errant 'html' almost-filter
[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
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 | uri %]'><img
20                     alt="[% l('Image of item') %]" id='rdetail_image'
21                     src='[% ctx.media_prefix %]/opac/extras/ac/jacket/medium/[% ident | uri %]' /></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_extended | html %]</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="[%- 
36                                         authorquery = attrs.author | replace('[,\.:;]', '');
37                                         mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
38                                         -%]">[% attrs.author | html %]</a></em>
39                             [% END %]
40                         </td>
41                         <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
42                             <div style="width:280px;text-align:left;margin-top:3px;">
43                                 <div style="float:right;">
44                                     <div class="rdetail_aux_utils opac-auto-010">
45                                         <a href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => ctx.bre_id, hold_type => 'T'}) %]" 
46                                             class="no-dec"><img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
47                                                     style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
48                                     </div>
49                                     <div class="rdetail_aux_utils opac-auto-121">
50                                         [%  
51                                             operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
52                                             label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); 
53                                         %]
54                                         <a href="[% ctx.opac_root %]/mylist/[% operation %]?record=[% ctx.bre_id %]" class="no-dec">
55                                             <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
56                                             [% label %]
57                                         </a>
58                                     </div>
59                                 </div>
60                                 <div style="float:right;margin-right:17px;">
61                                     [% IF attrs.format_icon %]
62                                     <img alt="[% attrs.format_label %]" title="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
63                                     [% END %]
64                                 </div>
65                             </div>
66                         </td>
67                     </tr>
68                 </table>
69                 <div class='opac-auto-018'>
70                     <table border="0" cellpadding="0" width="100%">
71                         <tr>
72                             <td nowrap='nowrap' valign="top">
73                                 [% IF attrs.isbns.0 %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
74                             </td>
75                             <td valign="top" id='rdetail_isbn'>
76                                 [% FOR isbn IN attrs.isbns %][% IF !loop.first; %]<br/>[% END; isbn | html ; END %]
77                             </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 | html %]</td>
82                         </tr>
83                         [% IF openurl.enabled == 'true';
84                             FOR issn IN args.issns;
85                                 sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
86                                 FOR res IN sfx;
87                         %]
88                             <tr name="results_issn_tr">
89                                 <td valign="top">
90                                     <strong><a href="[% res.target_url %]">
91                                         [% res.public_name %]</a></strong>
92                                 </td>
93                                 <td>[% res.target_coverage %]</td>
94                             </tr>
95                                 [% END %]
96                             [% END %]
97                         [% END %]
98                         <tr>
99                             <td nowrap='nowrap' valign="top">
100                                 <strong>[% IF attrs.marc_cn; l("Call Number"); END %]</strong>
101                             </td>
102                             <td valign="top">[% attrs.marc_cn | html %]</td>
103                             <td nowrap='nowrap' valign="top">
104                                 <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
105                             </td>
106                             <td valign="top" id='rdetail_edition'>[% attrs.edition | html %]</td>
107                         </tr>
108                         <tr>
109                             <td nowrap='nowrap' valign="top">
110                                 <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
111                             </td>
112                             <td valign="top" id='rdetail_publisher'>[% attrs.publisher | html %]</td>
113                             <td nowrap='nowrap' valign="top">
114                                 <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
115                             </td>
116                             <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate | html %]</td>
117                         </tr>
118                     </table>
119
120                     <!-- hold/copy summary -->
121                     <div style="padding-top:15px;">
122                         <div>
123                             [% l("[quant,_1,Hold,Holds] with [quant,_2,total copy,total copies]", 
124                                 ctx.record_hold_count, ctx.copy_summary.0.count) %]
125                         </div>
126                         <div>[% l('[quant,_1,Copy,Copies] available', ctx.copy_summary.0.available) %]</div>
127                     </div>
128
129                 </div>
130             </td>
131         </tr>
132     </tbody>
133 </table>
134 <br />
135
136 [% FOR uri IN args.uris %]
137 <div class="rdetail_uri">
138     <a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]
139 </div>
140 [% END %]
141
142 <br />
143
144 <table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
145     <thead>
146         <tr id="rdetails_status_head">
147             <td>[% l("Location") %]</td>
148             <td>[% l("Call Number") %]</td>
149             <td>[% l("Barcode") %]</td>
150             <td>[% l("Shelving Location") %]</td>
151             [% IF ctx.is_staff %]
152             <td>[% l("Age Hold Protection") %]</td>
153             <td>[% l("Create Date") %]</td>
154             <td>[% l("Holdable?") %]</td>
155             [% END %]
156             <td>[% l("Status") %]</td>
157             <td>[% l("Due Date") %]</td>
158         </tr>
159     </thead>
160     <tbody class="copy_details_table">
161         [% last_cn = 0;
162         FOR copy_info IN ctx.copies;
163             NEXT IF copy_info.call_number_label == '##URI##' %]
164         <tr>
165             <td>[%
166                 # XXX KCLS-specific kludging
167                 org_name = ctx.get_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 | html %]</td>
174             <td>[% copy_info.barcode | html %]</td>
175             <td>[% copy_info.copy_location | html %]</td>
176             [% IF ctx.is_staff %]
177             <td>
178                 [% copy_info.age_protect ?
179                     ctx.get_crahp(copy_info.age_protect).name : l('None') | html %]
180             </td>
181             <td>[% date.format(
182                 ctx.parse_datetime(copy_info.create_date),
183                 DATE_FORMAT
184             ) %]</td>
185             <td>[%  # Show copy/volume hold links to staff (without
186                     # checking whether they have permissions to do those).
187                     overall_holdable = (copy_info.holdable == 't' AND
188                         copy_info.location_holdable == 't' AND
189                         copy_info.status_holdable == 't');
190                     IF overall_holdable;
191                         l("Place on"); %]
192                 <a href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => copy_info.id, hold_type => 'C'}) %]">[% l("copy") %]</a>
193                 [%      IF copy_info.call_number != last_cn;
194                             last_cn = copy_info.call_number;
195                             l(" / "); %]
196                 <a href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => copy_info.call_number, hold_type => 'V'}) %]">[% l("volume") %]</a>
197                 [%      END;
198                     ELSE;
199                         l("No");
200                     END %]</td>
201             [% END %]
202             <td>[% copy_info.copy_status | html %]</td>
203             <td>[%
204                 IF copy_info.due_date;
205                     date.format(
206                         ctx.parse_datetime(copy_info.due_date),
207                         DATE_FORMAT
208                     );
209                 ELSE;
210                     '-';
211                 END %]</td>
212         </tr>
213         [% END %]
214         <tr>
215         [% IF ctx.copy_offset > 0;
216             new_offset = ctx.copy_offset - ctx.copy_limit;
217             IF new_offset < 0; new_offset = 0; END %]
218             <td>
219                 <a href="[% mkurl('', {copy_offset => new_offset, copy_limit => ctx.copy_limit}) %]">&laquo; [%
220                     l('Previous [_1]', ctx.copy_offset - new_offset) %]</a>
221             </td>
222         [% END %]
223         [% IF ctx.copies.size >= ctx.copy_limit %]
224             <td>
225                 <a href="[% mkurl('', {copy_offset => ctx.copy_offset + ctx.copy_limit, copy_limit => ctx.copy_limit}) %]">[%
226                     l('Next [_1]', ctx.copy_limit) %] &raquo;</a>
227             </td>
228         [% END %]
229         </tr>
230         <tr>
231             <td>
232                 [% more_copies_limit = 50 %] [%# TODO: config %]
233                 [% IF  ctx.copy_limit != more_copies_limit AND ctx.copies.size >= ctx.copy_limit %]
234                     <div style='margin-top:10px;'>
235                         <img src="[% ctx.media_prefix %]/images/plus_sign.png" />
236                         <a href="[% mkurl('', {copy_limit => more_copies_limit, copy_offset => 0}) %]">[% l('Show more copies') %]</a>
237                     </div>
238                 [% ELSIF ctx.copy_limit == more_copies_limit %]
239                     <div style='margin-top:10px;'>
240                         <img src="[% ctx.media_prefix %]/images/minus_sign.png" />
241                         <a href="[% mkurl('', {copy_limit => 0, copy_offset => 0}) %]">[% l('Show fewer copies') %]</a>
242                     </div>
243                 [% END %]
244             </td>
245         </tr>
246         <tr>
247             <td>
248                 [% IF CGI.param('expand') == 'all' %]
249                     <img src="[% ctx.media_prefix %]/images/minus_sign.png" />
250                     <a href="[% mkurl('', {}, ['expand']) %]">[% l('Collapse all tabs') %]</a>
251                 [% ELSE %]
252                     <img src="[% ctx.media_prefix %]/images/plus_sign.png" />
253                     <a href="[% mkurl('', {expand => 'all'}) %]">[% l('Expand all tabs') %]</a>
254                 [% END %]
255             </td>
256         </tr>
257
258     </tbody>
259 </table>
260
261 <div id="rdetail_extras_expand" class="hide_me">
262     <a href="#"><img
263         src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
264     <a style="position:relative;top:-3px;" href="#">[% l('Expand all tabs') %]</a>
265 </div>
266
267 <div id="rdetail_extras_collapse" class="hide_me">
268     <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
269     <a style="position:relative;top:-3px;" href="#">[% l('Collapse all tabs') %]</a>
270 </div>