summaryrefslogtreecommitdiff
path: root/templates/displayheaders/_pagination2.html.ep
blob: 8bff0bf370f78db5176e2b671307c7e445d8e83e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%= form_for '' => (class => 'pure-form') => begin
  <a href="<%= url_with->query({start => $pgn->{first_page}[0]}) %>">
    <img src="/first.gif" alt="<%= l('first') . ' ' . l 'page' %>">
  </a>
  <a href="<%= url_with->query({start => $pgn->{prev_page}[0]}) %>">
    <img src="/left.gif" alt="<%= l('previous') . ' ' . l 'page' %>">
  </a>

  <div style="white-space: nowrap">
  [
%=  label_for custompage => ucfirst l('page') => (style => 'display: inline') 
    <%= number_field start
        => (id => 'custompage')
        => (size => 3)
        => (placeholder => $pgn->{current_page}+1)
        => (min => 1)
        => (max => $pgn->{total_pages}
        => (style => 'display: inline')) %>
%=  l 'of'
%=  $pgn->{total_pages}
  ]
  </div>

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