LP#1268636 additional label repairs
[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',{}, general_search_parms.merge(expert_search_parms)) %]">[% 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">
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                     <label class="results_header_lbl" for="opac.result.sort">[% l('Sort by') %]
42                     [% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') submit_on_change=1 %]
43                     </label>
44
45                     <div class='results_header_sel' id='simple-detail-view-links'>
46                         [% IF CGI.param('detail_record_view') %]
47                         <a href="[% mkurl('', {detail_record_view => ''}) %]">[% l('Show Fewer Details') %]</a> [% ELSE %]
48                         <a href="[% mkurl('', {detail_record_view => 1}) %]">[% l('Show More Details') %]</a>
49                         [% END %]
50                     </div>
51
52                     <label class="results_header_lbl" for="limit_to_available">
53                         <input type="checkbox" id="limit_to_available" name="modifier" value="available"
54                             onchange="limit_to_avail_onchange(this, true)"
55                             [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
56                         [% l('Limit to available items') %]
57                     </label>
58                     [% IF CGI.param('detail_record_view') %]
59                         <input type="hidden" name="detail_record_view" value="1" />
60                     [% END %]
61             </div>
62         </div>
63     </div>
64     </form>
65     <div id="content-wrapper">
66         <div id="main-content">
67             <div id="results-page">
68                 [% path = "opac/parts/result/" _
69                     (ctx.records.size ? "table.tt2" : "lowhits.tt2");
70                 INCLUDE $path %]
71             </div>
72             <div class="common-full-pad"></div>    
73         </div>
74         <br class="clear-both" />
75     </div>
76 [%- END %]