LP#1507845: Improve search engine optimization
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / record / navigation.tt2
1 [% IF ctx.search_result_index.defined && ctx.search_result_index >= 0 %]
2 <div class="rdetail_header">
3     <span class="rdetail_results">
4         <a href='[% mkurl(ctx.opac_root _ '/results', {}, stop_parms); %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Search Results') %]</a>
5         <span class="rdetail_result_count">
6             [% l('Showing Item [_1] of [_2]', ctx.search_result_index + 1, ctx.hit_count) %]
7         </span>
8     </span>
9     [%- INCLUDE "opac/parts/pref_lib_display.tt2" %]
10     <div class="rdetail_result_nav">
11         [%
12             IF ctx.prev_search_record;
13                 prev_args = {};
14                 IF ctx.search_page > 0 AND 
15                         ctx.search_result_index % ((ctx.page_size * ctx.search_page)) == 0; # first record in the page
16                     prev_args.page = ctx.search_page - 1;
17                 END;
18                 ctx.prev_rec_url = mkurl(ctx.prev_search_record, prev_args, stop_parms);
19         %]
20         <a class='np_nav_link classic_link' title='[% l("Previous Record") %]'
21             href='[% ctx.prev_rec_url %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Previous') %]</a>
22         [% END %]
23
24         [% 
25             IF ctx.next_search_record;
26                 next_args = {};
27                 IF (ctx.page_size * (ctx.search_page + 1)) == ctx.search_result_index + 1;
28                     next_args.page = ctx.search_page + 1;
29                 END;
30                 ctx.next_rec_url = mkurl(ctx.next_search_record, next_args, stop_parms);
31         %]
32         <a class='np_nav_link classic_link' title='[% l("Next Record") %]'
33             href='[% ctx.next_rec_url %]'>[% l('Next') %] <span class="nav_arrow_fix">&#9658;</span></a>
34         [% END %]
35
36     </div>
37 </div>
38 [% END %]