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