summaryrefslogtreecommitdiff
path: root/templates/headers/_pagination2.html.ep
blob: 236e9bbcfd379941c49641fbbdf6bd87968e7ff6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<div>
  %= form_for '' => (class => 'pure-form') => begin
    <a href="<%= url_with->query({start => $first_page->[0]-1}) %>"><img src="/first.gif" alt="<%= l('first') . ' ' . l 'page' %>"></a>
    <a href="<%= url_with->query({start => $prev_page->[0]-1}) %>"><img src="/left.gif" alt="<%= l('previous') . ' ' . l 'page' %>"></a>
    [
      %= label_for custompage => ucfirst l 'page'
      %= number_field start => (id => 'custompage') => (size => 3) => (placeholder => $current_page)
      %= l 'of'
      %= $total_pages
    ]

% my $h = $c->req->query_params->to_hash;
% while (my ($k, $v) = each %$h) {
%   if ($k ne 'start') {
    %= hidden_field $k => $v
%   }
% }

    <a href="<%= url_with->query({start => $next_page->[0]-1}) %>"><img src="/right.gif" alt="<%= l('next') . ' ' . l 'page' %>"></a>
    <a href="<%= url_with->query({start => $last_page->[0]-1}) %>"><img src="/last.gif" alt="<%= l('last') . ' ' . l('page') %>"></a>
  % end
</div>