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