eaea06639290dfde0f9ceed0a731c8b7c11e7d66
[working/Evergreen.git] / Open-ILS / src / templates / opac / results.tt2
1 [%- PROCESS "opac/parts/header.tt2";
2     WRAPPER "opac/parts/base.tt2";
3     INCLUDE "opac/parts/topnav.tt2";
4
5     IF is_advanced || is_special;
6         ctx.page_title = l("Search Results");
7     ELSE;
8         ctx.page_title = l("Search Results: ") _ CGI.param('query') | html;
9     END;
10
11     page = CGI.param('page');
12     page = page.match('^\d+$') ? page : 0; # verify page is a sane value
13
14     page_count = ctx.page_size == 0 ? 1 : POSIX.ceil(ctx.hit_count / ctx.page_size);
15
16     PROCESS "opac/parts/misc_util.tt2";
17     PROCESS get_library;
18 -%]
19     <h2 class="sr-only">[% l('Search Results') %]</h2>
20     <form action="[% ctx.opac_root %]/results" method="get">
21     [% INCLUDE "opac/parts/searchbar.tt2" took_care_of_form=1 %]
22     <div class="almost-content-wrapper">
23         <div id="results_header_bar">
24             <div id="results_header_inner">
25                 <div class="results_header_btns">
26                     <a href="[% mkurl(ctx.opac_root _ '/home', {$loc_name => loc_value}, 1) %]">[% l('Another Search') %]</a>
27                 </div>
28                 <div class="results_header_btns">
29                     <a href="[% mkurl(ctx.opac_root _ '/advanced',{}, general_search_parms.merge(expert_search_parms)) %]">[% l('Advanced Search') %]</a>
30                 </div>
31                 <div id="refine_hits" class="results_header_btns result_block_visible"><a onclick="getFacety();">[% l('Refine these results') %]</a></div>
32                 <div id="return_to_hits" class="results_header_btns"><a onclick="getResulty();">[% l('Back to results') %]</a></div>
33                 [% IF ctx.mylist.size %]
34                 <div class="results_header_btns">
35                     [%- IF ctx.user; %]
36                     <a href="[% mkurl(ctx.opac_root _ '/myopac/lists') %]">[% l('View My List') %]</a>
37                     [%- ELSE %]
38                     <a href="[% mkurl(ctx.opac_root _ '/mylist') %]">[% l('View My List') %]</a>
39                     [%- END %]
40                 </div>
41                 [% END %]
42                     <label class="results_header_lbl" for="opac.result.sort">[% l('Sort by') %]
43                     [% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') submit_on_change=1 %]
44                     </label>
45
46                     <div class='results_header_sel' id='simple-detail-view-links'>
47                         [% IF CGI.param('detail_record_view') %]
48                         <a href="[% mkurl('', {detail_record_view => ''}) %]">[% l('Show Fewer Details') %]</a> [% ELSE %]
49                         <a href="[% mkurl('', {detail_record_view => 1}) %]">[% l('Show More Details') %]</a>
50                         [% END %]
51                     </div>
52
53                     <label class="results_header_lbl" for="limit_to_available">
54                         <input type="checkbox" id="limit_to_available" name="modifier" value="available"
55                             onchange="limit_to_avail_onchange(this, true)"
56                             [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
57                         [% l('Limit to available items') %]
58                     </label>
59                     [% IF CGI.param('detail_record_view') %]
60                         <input type="hidden" name="detail_record_view" value="1" />
61                     [% END %]
62             </div>
63         </div>
64     </div>
65     </form>
66     <div id="content-wrapper">
67         <div id="main-content">
68             <div id="results-page">
69                 [% path = "opac/parts/result/" _
70                     (ctx.records.size ? "table.tt2" : "lowhits.tt2");
71                 INCLUDE $path %]
72             </div>
73             <div class="common-full-pad"></div>    
74         </div>
75         <br class="clear-both" />
76     </div>
77 [%- END %]