]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac/parts/result/table.tt2
LP2061136 - Stamping 1405 DB upgrade script
[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=""
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     [% accordion(alt.value) %]
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     [% accordion(alt.value) %]
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="" 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>[% pub_string = attrs.pubplace _ attrs.publisher _ attrs.pubdate;
233                                                                         accordion(pub_string, 'publisher'); %]</td>
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     [% accordion(alt.value) %]
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>[% prod_string = attrs.prodplace _ attrs.producer _ attrs.proddate;
257                                                                  accordion(prod_string, 'producer'); %]</td>
258                                                             </tr>
259                                                         [% ELSIF attrs.distributor %]
260                                                             <tr name="results_pub_tr">
261                                                                 <td valign="top">
262                                                                     <strong>[% l('Distributor:') %]</strong>
263                                                                 </td>
264                                                                 <td>[% dist_string = attrs.distplace _ attrs.distributor _ attrs.distdate; 
265                                                                   accordion(dist_string, 'distributor'); %]</td>
266                                                             </tr>
267                                                         [% ELSIF attrs.manufacturer %]
268                                                             <tr name="results_pub_tr">
269                                                                 <td valign="top">
270                                                                     <strong>[% l('Manufacturer:') %]</strong>
271                                                                 </td>
272                                                                 <td>[% man_string = attrs.manplace _ attrs.manufacturer _ attrs.mandate;
273                                                                   accordion(man_string, 'manufacturer'); %]</td>
274                                                             </tr>
275                                                         [% END %]
276                                                         [% IF attrs.isbns.size > 0 %]
277                                                             <tr name="results_isbn_tr">
278                                                                 <td valign="top">
279                                                                     <strong>[% l('ISBN:') %]</strong>
280                                                                 </td>
281                                                                 <td>[% attrs.isbns.0 | html %]</td>
282                                                             </tr>
283                                                         [% END %]
284                                                         [%- IF attrs.issns.size > 0 %]
285                                                             <tr name="results_issn_tr">
286                                                                 <td valign="top">
287                                                                     <strong>[% l('ISSN:') %]</strong>
288                                                                 </td>
289                                                                 <td>[% attrs.issns.0 | html %]</td>
290                                                             </tr>
291                                                         [%- END %]
292                                                         [%- IF openurl.enabled == 'true';
293                                                             FOREACH issn IN args.issns;
294                                                                 NEXT IF issn == '';
295                                                                 res_urls = ResolverResolver.resolve_issn(issn, openurl.baseurl);
296                                                                 FOREACH res IN res_urls;
297                                                         %]
298                                                         <tr name="results_issn_tr">
299                                                             <td valign="top">
300                                                                 <strong><a href="[% res.target_url %]">
301                                                                 [% res.public_name | html %]</a></strong>
302                                                             </td>
303                                                             <td>[% res.target_coverage | html %]
304                                                             [%- IF res.target_embargo != '';
305                                                                     ' - ';
306                                                                     res.target_embargo | html;
307                                                                 END;
308                                                             -%]
309                                                             </td>
310                                                         </tr>
311                                                                 [% END %]
312                                                             [% END %]
313                                                         [% END %]
314
315                                                         [% IF attrs.edition %]
316                                                             <tr name="results_edition_tr">
317                                                                 <td valign="top">
318                                                                     <strong>[% l('Edition:') %]</strong>
319                                                                 </td>
320                                                                 <td>[% accordion(attrs.edition, 'edition'); %]
321 [%-
322 FOR entry IN attrs.graphic_editions;
323     FOR alt IN entry.graphic;
324         diratt = "";
325         IF alt.dir;
326             diratt = ' dir="' _ alt.dir _ '"';
327         END;
328 -%]
329 <div class="graphic880"[% diratt %]>
330     [% accordion(alt.value) %]
331 </div>
332 [%-
333     END;
334 END;
335 -%]
336 </td>
337                                                             </tr>
338                                                         [% END %]
339                                                         [% IF attrs.phys_desc %]
340                                                             <tr name="results_phys_desc_tr">
341                                                                 <td nowrap="nowrap" valign="top">
342                                                                     <strong>[% l('Phys. Desc.:') %]</strong>
343                                                                 </td>
344                                                                 <td>
345                                                                     [% accordion(args.phys_desc, 'phys_desc'); %]
346                                                                 </td>
347                                                             </tr>
348                                                         [% END %]
349                                                         [% FOR uri IN args.uris %]
350                                                             <tr name='bib_uri_list' class='result_table_title_cell'>
351                                                                 <td valign='top'>
352                                                                     <strong>[% l('Electronic resource') %]</strong>
353                                                                 </td>
354                                                                 <td><a href="[% uri.href | html %]" class="uri_link" target="_blank" rel="noopener">[% uri.link | html %]</a>
355                                                                     [%- IF uri.note -%]
356                                                                         [%- '- <span property="description">' _ uri.note _ '</span>' %]
357                                                                     [%- ELSE -%]
358                                                                         [% IF ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %]
359                                                                             [% link_note = ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %]
360                                                                             [% '- <span property="description">'; link_note | html; '</span>' %]
361                                                                         [% END %]
362                                                                     [%- END -%]</td>
363                                                             </tr>
364                                                             [% END %]
365                                                          [% END %]
366                                                             [%- IF args.holdings.size > 0;
367                                                                 FOREACH copy IN args.holdings;
368                                                                     IF copy.part_label != '';
369                                                                         has_parts = 'true';
370                                                                         LAST;
371                                                                     END;
372                                                                 END;
373                                                             %]
374                                                             <tr name='bib_cn_list' class='result_table_title_cell'>
375                                                                 <td colspan='2'>
376                                                                     <table title="[% l('Record Holdings Details') %]"
377                                                                            class='result_holdings_table'>
378                                                                         <thead><tr>
379                                                                             <th>[% l('Library') %]</th>
380                                                                             <th>[% l('Shelving location') %]</th>
381                                                                             <th>[% l('Call number') %]</th>
382                                                                             [%- IF has_parts == 'true'; %]
383                                                                             <th>[% l('Part') %]</th>
384                                                                             [%- END %]
385                                                                             <th>[% l('Status') %]</th>
386                                                                         </tr></thead>
387                                                                         <tbody>
388                                                                 [% FOR copy IN args.holdings %]
389                                                                         <tr>
390                                                                             <td>
391 [%- copy_info = copy;
392     INCLUDE "opac/parts/library_name_link.tt2"; %]
393                                                                             </td>
394                                                                             <td>[% copy.location | html %]</td>
395                                                                             <td>[% copy.label | html %]</td>
396                                                                             [%- IF has_parts == 'true'; %]
397                                                                             <td>[% copy.part_label %]</td>
398                                                                             [%- END %]
399                                                                             <td>[% copy.status | html %]</td>
400                                                                         </tr>
401                                                                 [% END %]
402                                                                         </tbody>
403                                                                     </table>
404                                                                 </td>
405                                                             </tr>
406                                                             [%- has_parts = 'false';
407                                                                 END;
408                                                              %]
409                                                         [% END %] <!-- END detail_record_view -->
410                                                     </table>
411                                                     [% 
412                                                         IF ebook_api.enabled == 'true';
413                                                             INCLUDE "opac/parts/ebook_api/avail.tt2";
414                                                         END;
415                                                     %]
416                                                     [% UNLESS rec.mmr_id;
417                                                             PROCESS "opac/parts/result/copy_counts.tt2";
418                                                         END; %]
419                                                     [%- IF ctx.get_org_setting(ctx.physical_loc || ctx.search_ou, 'circ.course_materials_opt_in') == 1 %]
420                                                         [%- courseStrings = [] %]
421                                                         [% FOREACH course IN rec.courses %]
422                                                             [% courseString = course.name _ ' (' _ course.course_number _ ')' %]
423                                                             [% courseStrings.push(courseString); %]
424                                                         [% END %]
425                                                         [% IF courseStrings.size > 0 %]
426                                                             <span><strong>[% l('Associated Courses: ') %]</strong></span>
427                                                             <span>[% courseStrings.join(', ') %]</span>
428                                                         [% END %]
429                                                     [% END %]
430                                                     [% IF rec.user_circulated %]
431                                                     <div class="result_item_circulated">
432                                                         <img src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]" alt=""/>
433                                                         <span>[% l('I have checked this item out before') %]</span>
434                                                     </div>
435                                                     [% END %]
436                                                     [% IF ctx.bookbag;
437                                                         rec_id = rec.id;
438                                                         FOR note IN ctx.bookbag_items_by_bre_id.$rec_id.notes %]
439                                                     <div class="result-bookbag-item-note">
440                                                         [% note.note | html %]
441                                                     </div>
442                                                         [% END %]
443                                                     [% END %]
444                                                 </div>
445                                                 <div class="result_table_utils_cont">
446                                                     <div class="result_table_utils">
447 [%- search_ou = ctx.search_ou;
448     num_holdable_copies = attrs.marc_xml.findnodes('//*[local-name()="holdings" and @has_holdable="true"]').size || 0;
449     IF ctx.place_unfillable ||
450         ( num_holdable_copies > 0
451             && (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
452         )
453 %]
454
455                                                         [% del_parms = ['tag','subfield','term','_special',
456                                                                     'sort','page'];
457                                                         add_parms = {hold_target => rec.id, 
458                                                                      hold_type => hold_type, 
459                                                                      hold_source_page => mkurl()};
460
461                                                         IF is_advanced;
462                                                             # Do not pass "advanced params" to hold code
463                                                             # Instead, pass the scrubed query in one-line form
464                                                             del_parms = del_parms.merge(['query', 'bool', 
465                                                                              'qtype', 'contains', '_adv']);
466                                                             add_parms.import(
467                                                                 {query => ctx.naive_query_scrub(ctx.user_query)});
468                                                         END; %]
469
470                                                         <div class="results_aux_utils place_hold"><a
471                                                                 href="[% mkurl(ctx.opac_root _ '/place_hold',
472                                                                     add_parms, del_parms) %]"
473                                                                 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
474                                                                     class="no-dec" rel="nofollow" vocab=""><img
475                                                                 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
476                                                                 alt=""/><span class="result_place_hold">[% l('Place Hold') %]</span></a>
477                                                         </div>
478 [%- END -%]
479
480                                                         [%- IF ebook_api.enabled == 'true' && args.ebook %]
481                                                         <div id="[%- rec.id -%]_ebook_checkout" class="results_aux_utils result_util ebook_action hidden">
482                                                             <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_checkout',
483                                                                 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'checkout'},
484                                                                 ['query','tag','subfield','term','_special','sort','page']) %]"
485                                                                 [% html_text_attr('title', l('Check Out [_1]', attrs.title)) %]
486                                                                     class="no-dec" rel="nofollow" vocab=""><img
487                                                                 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
488                                                                 alt=""/><span class="result_place_hold">[% l('Check Out E-Item') %]</span></a>
489                                                         </div>
490                                                         <div id="[%- rec.id -%]_ebook_place_hold" class="results_aux_utils result_util ebook_action hidden">
491                                                             <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_place_hold',
492                                                                 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'place_hold'},
493                                                                 ['query','tag','subfield','term','_special','sort','page']) %]"
494                                                                 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
495                                                                     class="no-dec" rel="nofollow" vocab=""><img
496                                                                 src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
497                                                                 alt=""/><span class="result_place_hold">[% l('Place Hold on E-Item') %]</span></a>
498                                                         </div>
499                                                         [%- END -%]
500
501                                                     [% IF !ctx.is_meta %]
502                                                         <div class="results_aux_utils result_util">
503                                                         [% IF !ctx.is_staff %]
504                                                             [%
505                                                                 addhref = mkurl(ctx.opac_root _ '/mylist/add',
506                                                                         {record => rec.id, anchor => 'record_' _ rec.id}, 1);
507                                                                 delhref = mkurl(ctx.opac_root _ '/mylist/delete',
508                                                                         {record => rec.id, anchor => 'record_' _ rec.id}, 1);
509                                                             %]
510                                                             <a href="[% addhref %]" id="mylist_add_[% rec.id %]"
511                                                                 data-recid="[% rec.id %]" data-action="add"
512                                                                 class="mylist_action [% IF ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
513                                                                 title="[% l("Add [_1] to basket", attrs.title) | html %]" rel="nofollow" vocab="">
514                                                                 <img src="[% ctx.media_prefix %]/images/add-to-cart.png[% ctx.cache_key %]" alt="" />
515                                                                 [% l("Add to basket") %]
516                                                             </a>
517                                                             <a href="[% delhref %]" id="mylist_delete_[% rec.id %]"
518                                                                 data-recid="[% rec.id %]" data-action="delete"
519                                                                 class="mylist_action [% IF !ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
520                                                                 title="[% l("Remove [_1] from basket", attrs.title) | html %]" rel="nofollow" vocab="">
521                                                                 <img src="[% ctx.media_prefix %]/images/add-to-cart.png[% ctx.cache_key %]" alt="" />
522                                                                 [% l("Remove from basket") %]
523                                                             </a>
524                                                             [%  IF ctx.user;
525                                                                 INCLUDE "opac/parts/bookbag_actions.tt2";
526                                                                 END;
527                                                             %]
528                                                         [% END %]
529                                                         </div>
530                                                     [% END %]
531                                                         [% IF ENV.OILS_CONTENT_CAFE_USER %]
532                                                         [% ident = attrs.isbn_clean || attrs.upc %]
533                                                         <div class="results_aux_utils result_util">
534                                                             <a target='_blank' 
535                                                                [% html_text_attr('title', l('Reviews and More for [_1]', attrs.title)) %]
536                                                                 href="[% ctx.ext_proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
537                                                                     ENV.OILS_CONTENT_CAFE_USER %]&amp;Password=[%-
538                                                                     ENV.OILS_CONTENT_CAFE_PASS %]&amp;ItemKey=[% ident | uri %]&amp;Options=Y" rel="noopener nofollow" vocab="">
539                                                                 <img src='[% ctx.media_prefix %]/images/starz.png[% ctx.cache_key %]' alt=""/>
540                                                                 <span class="results_reviews">[% l('Reviews &amp; More') %]</span>
541                                                             </a>
542                                                         </div>
543                                                         [% END %]
544                                                     </div>
545                                                 </div>
546
547                                             </td>
548
549                                         </tr>
550                                         [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
551                                         <tr>
552                                             <td></td>
553                                             <td align='center'> <!-- Chilifresh reviews link --> 
554                                                 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
555                                             </td>
556                                         </tr>
557                                         <tr>
558                                             <td></td>
559                                             <td colspan='5'> <!-- Chilifresh reviews panel -->
560                                                 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center"></div>
561                                             </td>
562                                         </tr>
563                                         [%- END %]
564                     [% END %]
565                     </tbody>
566                 </table>
567             </div>
568 </div>
569 <div class="result_footer_nav1">
570     [% ctx.results_count_header %]
571 </div>
572 <script>
573 resultBlock = document.getElementById('result_block');
574 resultButton = document.getElementById('return_to_hits');
575 facetSidebar = document.getElementById('facet_sidebar');
576 facetButton =  document.getElementById('refine_hits');
577 function getFacety() {
578     resultBlock.setAttribute('class', 'result_block_hidden');
579     resultButton.setAttribute('class', 'results_header_btns result_block_visible');
580     facetSidebar.setAttribute('class', 'facet_sidebar_visible');
581     facetButton.setAttribute('class', 'result_block_hidden');
582     window.location.hash = 'return_to_hits';
583 }
584 function getResulty() {
585     resultBlock.setAttribute('class', 'result_block_visible');
586     resultButton.setAttribute('class', 'result_block_hidden');
587     facetSidebar.setAttribute('class', 'facet_sidebar_hidden');
588     facetButton.setAttribute('class', 'results_header_btns result_block_visible');
589     window.location.hash = 'refine_hits';
590 }
591 </script>