LP1851831 Group perm editor null descriptions OK
[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         <!-- stash these in JS for the web staff client to find -->
6         <script>
7             window.search_result_hit_count = [% ctx.hit_count %];
8             window.search_result_index = [% ctx.search_result_index %];
9         </script>
10         <span class="rdetail_result_count">
11             [% l('Showing Item [_1] of [_2]', ctx.search_result_index + 1, ctx.hit_count) %]
12         </span>
13     </span>
14     [%- INCLUDE "opac/parts/pref_lib_display.tt2" %]
15     <div class="rdetail_result_nav">
16         [%
17             IF ctx.prev_search_record;
18                 prev_args = {};
19                 IF ctx.search_page > 0 AND 
20                         ctx.search_result_index % ((ctx.page_size * ctx.search_page)) == 0; # first record in the page
21                     prev_args.page = ctx.search_page - 1;
22                 END;
23                 ctx.prev_rec_url = mkurl(ctx.prev_search_record, prev_args, stop_parms);
24         %]
25         <a class='np_nav_link classic_link' title='[% l("Previous Record") %]'
26             href='[% ctx.prev_rec_url %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Previous') %]</a>
27         [% END %]
28
29         [% 
30             IF ctx.next_search_record;
31                 next_args = {};
32                 IF (ctx.page_size * (ctx.search_page + 1)) == ctx.search_result_index + 1;
33                     next_args.page = ctx.search_page + 1;
34                 END;
35                 ctx.next_rec_url = mkurl(ctx.next_search_record, next_args, stop_parms);
36         %]
37         <a class='np_nav_link classic_link' title='[% l("Next Record") %]'
38             href='[% ctx.next_rec_url %]'>[% l('Next') %] <span class="nav_arrow_fix">&#9658;</span></a>
39         [% END %]
40
41     </div>
42 </div>
43 [% END %]