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