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