]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac/parts/result/table.tt2
LP#1721575: Batch Actions In the Public Catalog
[Evergreen.git] / Open-ILS / src / templates / opac / parts / result / table.tt2
1 [%  PROCESS "opac/parts/misc_util.tt2";
2
3     USE ResolverResolver;
4
5     ctx.result_start = 1 + ctx.page_size * page;
6     ctx.result_stop = ctx.page_size * (page + 1);
7     IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
8
9     result_count = ctx.result_start;
10
11 %]
12
13 [% PROCESS "opac/parts/result/paginate.tt2" %] 
14 [% ctx.results_count_header = PROCESS results_count_header;
15     ctx.results_count_header %]
16 [% IF ctx.bookbag %]
17 <div id="result-bookbag-heading">
18     <div class="result-bookbag-name">[% ctx.bookbag.name | html %]</div>
19     <div class="result-bookbag-description">[% ctx.bookbag.description | html %]</div>
20 </div>
21 [% END %]
22 <div id="result_table_div">
23     <div class="facet_sidebar_hidden" id="facet_sidebar">
24     [%- IF ctx.is_staff %]
25     <h3 class="sr-only">[% l('Saved Searches') %]</h3>
26     [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
27     [%-  END %]
28     <h3 class="sr-only">[% l('Search Results facets') %]</h3>
29     [% INCLUDE 'opac/parts/result/facets.tt2' %]
30     <h3 class="sr-only">[% l('Search Results List') %]</h3>
31     </div>
32             <div id="result_block" class="result_block_visible">
33                 [% IF !ctx.is_meta %]
34                 <div id="record_selector_block" class="hidden">
35                     <input type="checkbox" id="select_all_records"></input>
36                     <label for="select_all_records">[% l('Select [_1] - [_2]', ctx.result_start, ctx.result_stop) %]</label>
37                     <span id="selected_records_summary">
38                         <a href="[% mkurl(ctx.opac_root _ '/mylist') %]" class="no-dec" rel="nofollow" vocab="">
39                           <span id="selected_records_count">[% ctx.mylist.size %]</span>
40                           [% IF ctx.mylist.size == 1; %]
41                               [% l('selected title') %]
42                           [% ELSE; %]
43                               [% l('selected titles') %]
44                           [% END; %]
45                         </a>
46                         <span id="hit_selected_record_limit" class="hidden">Reached limit!</span>
47                     <span>
48                     <a id="clear_basket" href="#">[% l('Clear cart') %]</a>
49                 </div>
50                 [% END %]
51                 <table id="result_table_table" title="[% l('Search Results') %]"
52                   class="table_no_border_space table_no_cell_pad">
53                     <thead class="sr-only">
54                       <tr>
55                         <th>[% l('Search result number') %]</th>
56                         <th>[% l('Book jacket cover art') %]</th>
57                         <th>[% l('Item details and Actions') %]</th>
58                       </tr>
59                     </thead>
60                     <tbody id="result_table">
61                     [%  FOR rec IN ctx.records;
62                             attrs = {};
63                             attrs.marc_xml = rec.marc_xml;
64                             attrs.mr_constituent_ids = [];
65                             FOREACH mr_constituent_id IN rec.mr_constituent_ids;
66                                 attrs.mr_constituent_ids.push(mr_constituent_id);
67                             END;
68                             PROCESS get_marc_attrs args=attrs;
69                             IF show_detail_view;
70                                 attrs.title = attrs.title_extended;
71                             END;
72                             # note: rec.id refers to the record identifier, regardless
73                             # of the type of record. i.e. rec.id = mmr_id ? mmr_id : bre_id
74                             IF rec.mmr_id;
75                                 IF rec.mr_constituent_count > 1;
76                                     # metarecords link to record list page
77                                     record_url_path = ctx.opac_root _ '/results'; 
78                                     add_parms = {metarecord => rec.mmr_id};
79                                     del_parms = ['page'];
80                                 ELSE;
81                                     # for MR, bre_id refers to the master and in
82                                     # this case, only, record
83                                     record_url_path = ctx.opac_root _ '/record/' _ attrs.mr_constituent_ids.0;
84                                     add_parms = { badges => rec.badges.join(',') };
85                                     del_parms = ['quux'];
86                                 END;
87                                 hold_type = 'M';
88                             ELSE;
89                                 record_url_path = ctx.opac_root _ '/record/' _ rec.bre_id; 
90                                 add_parms = { badges => rec.badges.join(',') };
91                                 del_parms = ['quux'];
92                                 hold_type = 'T';
93                             END;
94
95                             IF is_advanced; 
96                                     # Do not pass "advanced params" to result detail code.
97                                     # Instead, pass the scrubed query in one-line form
98                                     del_parms = del_parms.merge(['query', 'bool', 
99                                                      'qtype', 'contains', '_adv']);
100                                     add_parms.import(
101                                          {query => ctx.naive_query_scrub(ctx.user_query)} );
102                             END;
103                             is_selected = ctx.mylist.grep('^' _ rec.id _ '$').size;
104                         %]
105                         <tr class="result_table_row [% IF is_selected %]result_table_row_selected[% END %]">
106                                             <td class="results_row_count" name="results_row_count">
107                                                 [% IF !ctx.is_meta; %]
108                                                 <input type="checkbox" id="select-[% rec.bre_id %]" name="selected_record"
109                                                     [% IF is_selected %] checked="checked" [% END %]
110                                                     title="[% l('Add to Basket') %]"
111                                                     class="result_record_selector hidden" value="[% rec.bre_id %]"></input>
112                                                 [% END %]
113                                                 [% result_count; result_count = result_count + 1 %].
114                                             </td>
115                                             <td class='result_table_pic_header'>
116                                                 <a href="[% mkurl(record_url_path, add_parms, del_parms); %]">
117                                                  <img alt="[% l('Book cover') %]"
118                                                         name='item_jacket' class='result_table_pic' width="55"
119                                                         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/r/[% rec.bre_id | uri %]' /></a><br />
120                                             </td>
121                                             <td class='result_table_title_cell' name='result_table_title_cell'>
122                                                <div class="result_metadata">
123                                                     [% IF rec.mmr_id %]
124                                                     <abbr class="unapi-id" 
125                                                       title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:metabib-metarecord/[% rec.mmr_id %]'>
126                                                     </abbr>
127                                                     [% ELSE %]
128                                                     <abbr class="unapi-id" 
129                                                       title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.bre_id %]'>
130                                                     </abbr>
131                                                     [% END %]
132                                                     <a class='record_title search_link' name='record_[% rec.id %]'
133                                                         href="[% mkurl(record_url_path, add_parms, del_parms); %]"
134                                                         [% html_text_attr('title', l('Display record details for "[_1]"', attrs.title)) %]>
135                                                         [% IF attrs.hl.title; attrs.hl.title; ELSE; attrs.title | html; END %]
136                                                      </a>
137                                                      [% IF rec.mr_constituent_count.defined && rec.mr_constituent_count > 1 %]
138                                                      <span title="[% l('This group contains [_1] records', rec.mr_constituent_count) %]">
139                                                       ([% rec.mr_constituent_count %])
140                                                      </span>
141                                                      [% END %]
142
143 [%-
144 FOR entry IN attrs.graphic_titles;
145     FOR alt IN entry.graphic;
146         diratt = "";
147         IF alt.dir;
148             diratt = ' dir="' _ alt.dir _ '"';
149         END;
150 -%]
151 <div class="graphic880"[% diratt %]>
152     [% alt.value | html %]
153 </div>
154 [%-
155     END;
156 END;
157 -%]
158  
159                                                     <div>
160                                                         <a title="[% l("Perform an Author Search") %]"
161                                                                 class="record_author"
162                                                                 href="[%- 
163                                                                     authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', ' ');
164                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, general_search_parms.merge(expert_search_parms, browse_search_parms, facet_search_parms))
165                                                                     -%]" rel="nofollow" vocab="">[% IF attrs.hl.author; attrs.hl.author; ELSE; attrs.author | html; END %]</a>
166 [%-
167 FOR entry IN attrs.graphic_authors;
168     FOR alt IN entry.graphic;
169         diratt = "";
170         IF alt.dir;
171             diratt = ' dir="' _ alt.dir _ '"';
172         END;
173 -%]
174 <div class="graphic880"[% diratt %]>
175     [% alt.value | html %]
176 </div>
177 [%-
178     END;
179 END;
180 -%]
181
182                                                     </div>
183                                                     <div class='result_table_title_cell'>
184                                                     [%- IF attrs.format_label; %]
185                                                         [% FOR format IN attrs.all_formats %]
186                                                             <img title="[% format.label | html %]" 
187                                                                 alt="[% format.label | html %]" 
188                                                                 src="[% format.icon %]" /> 
189                                                             [% format.label | html %]
190                                                         [% END %]
191                                                     [%- END %]
192                                                     [%- UNLESS show_detail_view;
193                                                             IF attrs.pubdate;
194                                                                 pubdate_clean = attrs.pubdate | html;
195                                                                 l(" ([_1])", pubdate_clean);
196                                                             ELSIF attrs.copyright;
197                                                                 copyright_clean = attrs.copyright | html;
198                                                                 l(" ([_1])", copyright_clean);                                                                
199                                                             END;
200                                                         END
201                                                     -%]
202                                                     </div>
203                                                     [% IF rec.popularity > 0.0 AND ctx.hide_badge_scores != 'true' %]
204                                                       <div>
205                                                         <span><strong>[% l('Popularity:') %]</strong> [% rec.popularity %] / 5.0</span>
206                                                       </div>
207                                                     [% END %]
208                                                     <table 
209                                                        role="presentation"
210                                                        title="[% l('Record Holdings Summary') %]"
211                                                        class="table_no_border_space table_no_cell_pad table_no_border results_info_table">
212                                                         [% UNLESS rec.mmr_id OR show_detail_view %]
213                                                            [% IF args.holdings.size > 0 %]
214                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
215                                                             <td valign='top'>
216                                                                 <strong>[% l('Call number:') %]</strong>
217                                                             </td>
218                                                             <td>[% args.holdings.0.label | html %]</td>
219                                                         </tr>
220                                                            [% END %]
221                                                         [% END %]
222
223                                                         [%- IF show_detail_view -%]
224                                                         <!-- These fields are visible when viewing the results page in 'detailed' mode -->
225                                                         [% UNLESS rec.mmr_id %]
226                                                         <!-- Do not show publication-specific information on a metarecord search results page -->
227                                                         [% IF attrs.publisher %]
228                                                             <tr name="results_pub_tr">
229                                                                 <td valign="top">
230                                                                     <strong>[% l('Publisher:') %]</strong>
231                                                                 </td>
232                                                                 <td>[% attrs.pubplace | html; %] [% attrs.publisher | html; %] [% attrs.pubdate | html; %]
233 [%-
234 FOR entry IN attrs.graphic_pubinfos;
235     FOR alt IN entry.graphic;
236         diratt = "";
237         IF alt.dir;
238             diratt = ' dir="' _ alt.dir _ '"';
239         END;
240 -%]
241 <div class="graphic880"[% diratt %]>
242     [% alt.value | html %]
243 </div>
244 [%-
245     END;
246 END;
247 -%]
248 </td>
249                                                             </tr>
250                                                         [% ELSIF attrs.producer %]
251                                                             <tr name="results_pub_tr">
252                                                                 <td valign="top">
253                                                                     <strong>[% l('Producer:') %]</strong>
254                                                                 </td>
255                                                                 <td>[% attrs.prodplace | html; %] [% attrs.producer | html; %] [% attrs.proddate | html; %]</td>
256                                                             </tr>
257                                                         [% ELSIF attrs.distributor %]
258                                                             <tr name="results_pub_tr">
259                                                                 <td valign="top">
260                                                                     <strong>[% l('Distributor:') %]</strong>
261                                                                 </td>
262                                                                 <td>[% attrs.distplace | html; %] [% attrs.distributor | html; %] [% attrs.distdate | html; %]</td>
263                                                             </tr>
264                                                         [% ELSIF attrs.manufacturer %]
265                                                             <tr name="results_pub_tr">
266                                                                 <td valign="top">
267                                                                     <strong>[% l('Manufacturer:') %]</strong>
268                                                                 </td>
269                                                                 <td>[% attrs.manplace | html; %] [% attrs.manufacturer | html; %] [% attrs.mandate | html; %]</td>
270                                                             </tr>
271                                                         [% END %]
272                                                         [% IF attrs.isbns.size > 0 %]
273                                                             <tr name="results_isbn_tr">
274                                                                 <td valign="top">
275                                                                     <strong>[% l('ISBN:') %]</strong>
276                                                                 </td>
277                                                                 <td>[% attrs.isbns.0 | html %]</td>
278                                                             </tr>
279                                                         [% END %]
280                                                         [%- IF attrs.issns.size > 0 %]
281                                                             <tr name="results_issn_tr">
282                                                                 <td valign="top">
283                                                                     <strong>[% l('ISSN:') %]</strong>
284                                                                 </td>
285                                                                 <td>[% attrs.issns.0 | html %]</td>
286                                                             </tr>
287                                                         [%- END %]
288                                                         [%- IF openurl.enabled == 'true';
289                                                             FOREACH issn IN args.issns;
290                                                                 NEXT IF issn == '';
291                                                                 res_urls = ResolverResolver.resolve_issn(issn, openurl.baseurl);
292                                                                 FOREACH res IN res_urls;
293                                                         %]
294                                                         <tr name="results_issn_tr">
295                                                             <td valign="top">
296                                                                 <strong><a href="[% res.target_url %]">
297                                                                 [% res.public_name | html %]</a></strong>
298                                                             </td>
299                                                             <td>[% res.target_coverage | html %]
300                                                             [%- IF res.target_embargo != '';
301                                                                     ' - ';
302                                                                     res.target_embargo | html;
303                                                                 END;
304                                                             -%]
305                                                             </td>
306                                                         </tr>
307                                                                 [% END %]
308                                                             [% END %]
309                                                         [% END %]
310
311                                                         [% IF attrs.edition %]
312                                                             <tr name="results_edition_tr">
313                                                                 <td valign="top">
314                                                                     <strong>[% l('Edition:') %]</strong>
315                                                                 </td>
316                                                                 <td>[% attrs.edition | html %]
317 [%-
318 FOR entry IN attrs.graphic_editions;
319     FOR alt IN entry.graphic;
320         diratt = "";
321         IF alt.dir;
322             diratt = ' dir="' _ alt.dir _ '"';
323         END;
324 -%]
325 <div class="graphic880"[% diratt %]>
326     [% alt.value | html %]
327 </div>
328 [%-
329     END;
330 END;
331 -%]
332 </td>
333                                                             </tr>
334                                                         [% END %]
335                                                         [% IF attrs.phys_desc %]
336                                                             <tr name="results_phys_desc_tr">
337                                                                 <td nowrap="nowrap" valign="top">
338                                                                     <strong>[% l('Phys. Desc.:') %]</strong>
339                                                                 </td>
340                                                                 <td>
341                                                                     [% args.phys_desc | html %]
342                                                                 </td>
343                                                             </tr>
344                                                         [% END %]
345                                                         [% FOR uri IN args.uris %]
346                                                             <tr name='bib_uri_list' class='result_table_title_cell'>
347                                                                 <td valign='top'>
348                                                                     <strong>[% l('Electronic resource') %]</strong>
349                                                                 </td>
350                                                                 <td><a href="[% uri.href %]" class="uri_link" target="_blank">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
351                                                             </tr>
352                                                             [% END %]
353                                                          [% END %]
354                                                             [%- IF args.holdings.size > 0;
355                                                                 FOREACH copy IN args.holdings;
356                                                                     IF copy.part_label != '';
357                                                                         has_parts = 'true';
358                                                                         LAST;
359                                                                     END;
360                                                                 END;
361                                                             %]
362                                                             <tr name='bib_cn_list' class='result_table_title_cell'>
363                                                                 <td colspan='2'>
364                                                                     <table title="[% l('Record Holdings Details') %]"
365                                                                            class='result_holdings_table'>
366                                                                         <thead><tr>
367                                                                             <th>[% l('Library') %]</th>
368                                                                             <th>[% l('Shelving location') %]</th>
369                                                                             <th>[% l('Call number') %]</th>
370                                                                             [%- IF has_parts == 'true'; %]
371                                                                             <th>[% l('Part') %]</th>
372                                                                             [%- END %]
373                                                                             <th>[% l('Status') %]</th>
374                                                                         </tr></thead>
375                                                                         <tbody>
376                                                                 [% FOR copy IN args.holdings %]
377                                                                         <tr>
378                                                                             <td>
379 [%- copy_info = copy;
380     INCLUDE "opac/parts/library_name_link.tt2"; %]
381                                                                             </td>
382                                                                             <td>[% copy.location | html %]</td>
383                                                                             <td>[% copy.label | html %]</td>
384                                                                             [%- IF has_parts == 'true'; %]
385                                                                             <td>[% copy.part_label %]</td>
386                                                                             [%- END %]
387                                                                             <td>[% copy.status | html %]</td>
388                                                                         </tr>
389                                                                 [% END %]
390                                                                         </tbody>
391                                                                     </table>
392                                                                 </td>
393                                                             </tr>
394                                                             [%- has_parts = 'false';
395                                                                 END;
396                                                              %]
397                                                         [% END %] <!-- END detail_record_view -->
398                                                     </table>
399                                                     [% 
400                                                         IF ebook_api.enabled == 'true';
401                                                             INCLUDE "opac/parts/ebook_api/avail.tt2";
402                                                         END;
403                                                     %]
404                                                     [% PROCESS "opac/parts/result/copy_counts.tt2" %]
405                                                     [% IF rec.user_circulated %]
406                                                     <div class="result_item_circulated">
407                                                         <img src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]" alt="[% l('Checked Out Before') %]"/>
408                                                         <span>[% l('I have checked this item out before') %]</span>
409                                                     </div>
410                                                     [% END %]
411                                                     [% IF ctx.bookbag;
412                                                         rec_id = rec.id;
413                                                         FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
414                                                     <div class="result-bookbag-item-note">
415                                                         [% note.note | html %]
416                                                     </div>
417                                                         [% END %]
418                                                     [% END %]
419                                                 </div>
420                                                 <div class="result_table_utils_cont">
421                                                     <div class="result_table_utils">
422 [%- search_ou = ctx.search_ou;
423     num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
424     IF ctx.place_unfillable ||
425         ( num_holdable_copies > 0
426             && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
427         )
428 %]
429
430                                                         [% del_parms = ['tag','subfield','term','_special',
431                                                                     'sort','page'];
432                                                         add_parms = {hold_target => rec.id, 
433                                                                      hold_type => hold_type, 
434                                                                      hold_source_page => mkurl()};
435
436                                                         IF is_advanced;
437                                                             # Do not pass "advanced params" to hold code
438                                                             # Instead, pass the scrubed query in one-line form
439                                                             del_parms = del_parms.merge(['query', 'bool', 
440                                                                              'qtype', 'contains', '_adv']);
441                                                             add_parms.import(
442                                                                 {query => ctx.naive_query_scrub(ctx.user_query)});
443                                                         END; %]
444
445                                                         <div class="results_aux_utils place_hold"><a
446                                                                 href="[% mkurl(ctx.opac_root _ '/place_hold',
447                                                                     add_parms, del_parms) %]"
448                                                                 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
449                                                                     class="no-dec" rel="nofollow" vocab=""><img
450                                                                 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
451                                                                 alt=""/><span class="result_place_hold">[% l('Place Hold') %]</span></a>
452                                                         </div>
453 [%- END -%]
454
455                                                         [%- IF ebook_api.enabled == 'true' && args.ebook %]
456                                                         <div id="[%- rec.id -%]_ebook_checkout" class="results_aux_utils result_util ebook_action hidden">
457                                                             <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_checkout',
458                                                                 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'checkout'},
459                                                                 ['query','tag','subfield','term','_special','sort','page']) %]"
460                                                                 [% html_text_attr('title', l('Check Out [_1]', attrs.title)) %]
461                                                                     class="no-dec" rel="nofollow" vocab=""><img
462                                                                 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
463                                                                 alt=""/><span class="result_place_hold">[% l('Check Out E-Item') %]</span></a>
464                                                         </div>
465                                                         <div id="[%- rec.id -%]_ebook_place_hold" class="results_aux_utils result_util ebook_action hidden">
466                                                             <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_place_hold',
467                                                                 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'place_hold'},
468                                                                 ['query','tag','subfield','term','_special','sort','page']) %]"
469                                                                 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
470                                                                     class="no-dec" rel="nofollow" vocab=""><img
471                                                                 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
472                                                                 alt=""/><span class="result_place_hold">[% l('Place Hold on E-Item') %]</span></a>
473                                                         </div>
474                                                         [%- END -%]
475
476                                                     [% IF !ctx.is_meta %]
477                                                         <div class="results_aux_utils result_util">
478                                                         [% IF !ctx.is_staff %]
479                                                             [%
480                                                                 addhref = mkurl(ctx.opac_root _ '/mylist/add',
481                                                                         {record => rec.id, anchor => 'record_' _ rec.id}, 1);
482                                                                 delhref = mkurl(ctx.opac_root _ '/mylist/delete',
483                                                                         {record => rec.id, anchor => 'record_' _ rec.id}, 1);
484                                                             %]
485                                                             <a href="[% addhref %]" id="mylist_add_[% rec.id %]"
486                                                                 data-recid="[% rec.id %]" data-action="add"
487                                                                 class="mylist_action [% IF ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
488                                                                 title="[% l("Add [_1] to basket", attrs.title) %]" rel="nofollow" vocab="">
489                                                                 <img src="[% ctx.media_prefix %]/images/add-to-cart.png[% ctx.cache_key %]" alt="" />
490                                                                 [% l("Add to basket") %]
491                                                             </a>
492                                                             <a href="[% delhref %]" id="mylist_delete_[% rec.id %]"
493                                                                 data-recid="[% rec.id %]" data-action="delete"
494                                                                 class="mylist_action [% IF !ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
495                                                                 title="[% l("Remove [_1] from basket", attrs.title) %]" rel="nofollow" vocab="">
496                                                                 <img src="[% ctx.media_prefix %]/images/add-to-cart.png[% ctx.cache_key %]" alt="" />
497                                                                 [% l("Remove from basket") %]
498                                                             </a>
499                                                             [%  IF ctx.user;
500                                                                 INCLUDE "opac/parts/bookbag_actions.tt2";
501                                                                 END;
502                                                             %]
503                                                         [% END %]
504                                                         </div>
505                                                     [% END %]
506                                                         [% IF ENV.OILS_CONTENT_CAFE_USER %]
507                                                         [% ident = attrs.isbn_clean || attrs.upc %]
508                                                         <div class="results_aux_utils result_util">
509                                                             <a target='_blank' 
510                                                                [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
511                                                                 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
512                                                                     ENV.OILS_CONTENT_CAFE_USER %]&amp;Password=[%-
513                                                                     ENV.OILS_CONTENT_CAFE_PASS %]&amp;ItemKey=[% ident | uri %]&amp;Options=Y" rel="nofollow" vocab="">
514                                                                 <img src='[% ctx.media_prefix %]/images/starz.png[% ctx.cache_key %]' alt="[% l('Ratings Icon') %]"/>
515                                                                 <span class="results_reviews">[% l('Reviews &amp; More') %]</span>
516                                                             </a>
517                                                         </div>
518                                                         [% END %]
519                                                     </div>
520                                                 </div>
521
522                                             </td>
523
524                                         </tr>
525                                         [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
526                                         <tr>
527                                             <td/>
528                                             <td align='center'> <!-- Chilifresh reviews link --> 
529                                                 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
530                                             </td>
531                                         </tr>
532                                         <tr>
533                                             <td/>
534                                             <td colspan='5'> <!-- Chilifresh reviews panel -->
535                                                 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
536                                             </td>
537                                         </tr>
538                                         [%- END %]
539                     [% END %]
540                     </tbody>
541                 </table>
542             </div>
543 </div>
544 <div class="result_footer_nav1">
545     [% ctx.results_count_header %]
546 </div>
547 <script>
548 resultBlock = document.getElementById('result_block');
549 resultButton = document.getElementById('return_to_hits');
550 facetSidebar = document.getElementById('facet_sidebar');
551 facetButton =  document.getElementById('refine_hits');
552 function getFacety() {
553     resultBlock.setAttribute('class', 'result_block_hidden');
554     resultButton.setAttribute('class', 'results_header_btns result_block_visible');
555     facetSidebar.setAttribute('class', 'facet_sidebar_visible');
556     facetButton.setAttribute('class', 'result_block_hidden');
557     window.location.hash = 'return_to_hits';
558 }
559 function getResulty() {
560     resultBlock.setAttribute('class', 'result_block_visible');
561     resultButton.setAttribute('class', 'result_block_hidden');
562     facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
563     facetButton.setAttribute('class', 'results_header_btns result_block_visible');
564     window.location.hash = 'refine_hits';
565 }
566 </script>