520d4299c350ca6a3660e9de3f786f7924d8b0c8
[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     <form action="[% ctx.opac_root %]/results" method="get">
20     [% INCLUDE "opac/parts/searchbar.tt2" took_care_of_form=1 %]
21     <div class="almost-content-wrapper">
22         <div id="results_header_bar">
23             <div id="results_header_inner">
24                 <div class="results_header_btns">
25                     <a href="[% mkurl(ctx.opac_root _ '/home', {$loc_name => loc_value}, 1) %]">[% l('Another Search') %]</a>
26                 </div>
27                 <div class="results_header_btns">
28                     <a href="[% mkurl(ctx.opac_root _ '/advanced') %]">[% l('Advanced Search') %]</a>
29                 </div>
30                 <div id="refine_hits" class="results_header_btns result_block_visible"><a onclick="getFacety();">[% l('Refine these results') %]</a></div>
31                 <div id="return_to_hits" class="results_header_btns"><a onclick="getResulty();">[% l('Back to results') %]</a></div>
32                 [% IF ctx.mylist.size %]
33                 <div class="results_header_btns cached_list_div">
34                     [%- IF ctx.user; %]
35                     <a href="[% mkurl(ctx.opac_root _ '/myopac/lists') %]">[% l('View My List') %]</a>
36                     [%- ELSE %]
37                     <a href="[% mkurl(ctx.opac_root _ '/mylist') %]">[% l('View My List') %]</a>
38                     [%- END %]
39                 </div>
40                 [% END %]
41                 <div class="results_header_div"></div>
42                     <label class="results_header_lbl">[% l('Sort by') %]
43                     [% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') submit_on_change=1 %]
44                     </label>
45                     <div class="results_header_div"></div>
46
47                     <div class='results_header_sel' id='simple-detail-view-links'>
48                         [% IF CGI.param('detail_record_view') %]
49                         <a href="[% mkurl('', {detail_record_view => ''}) %]">[% l('Show Fewer Details') %]</a> [% ELSE %]
50                         <a href="[% mkurl('', {detail_record_view => 1}) %]">[% l('Show More Details') %]</a>
51                         [% END %]
52                     </div>
53                     <div class="results_header_div"></div>
54
55                     <label class="results_header_lbl">
56                         <input type="checkbox" id="limit_to_available" name="modifier" value="available"
57                             onchange="limit_to_avail_onchange(this, true)"
58                             [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
59                         [% l('Limit to available items') %]
60                     </label>
61                     [% IF CGI.param('detail_record_view') %]
62                         <input type="hidden" name="detail_record_view" value="1" />
63                     [% END %]
64                 <div class="clear-both"></div>
65             </div>
66         </div>
67     </div>
68     </form>
69     <div id="content-wrapper">
70         <div id="main-content">
71             <div id="results-page">
72                 [% path = "opac/parts/result/" _
73                     (ctx.records.size ? "table.tt2" : "lowhits.tt2");
74                 INCLUDE $path %]
75             </div>
76             <div class="common-full-pad"></div>    
77         </div>
78         <br class="clear-both" />
79     </div>
80 [%- END %]