diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-02-27 15:30:42 +0100 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-02-27 15:30:42 +0100 |
commit | d32477f82bca6042ddccd6bbce1cc804927a89a9 (patch) | |
tree | 0f5d399ff552407d55b407b13f9bc2988c97bfa3 /templates | |
parent | eddd009cd885093cb79e085c3499bdd52882e8b8 (diff) |
Separate name space for pagination
Diffstat (limited to 'templates')
-rw-r--r-- | templates/headers/_display_folders.html.ep | 2 | ||||
-rw-r--r-- | templates/headers/_display_headers.html.ep | 4 | ||||
-rw-r--r-- | templates/headers/_pagination1.html.ep | 10 | ||||
-rw-r--r-- | templates/headers/_pagination2.html.ep | 12 |
4 files changed, 14 insertions, 14 deletions
diff --git a/templates/headers/_display_folders.html.ep b/templates/headers/_display_folders.html.ep index 7f1612f..be5bdd9 100644 --- a/templates/headers/_display_folders.html.ep +++ b/templates/headers/_display_folders.html.ep @@ -21,7 +21,7 @@ </div> <p class="pure-u-1-1 pure-u-md-1-2"> - <%= l('[_1] of [_2] messages', $this_page->[1] - $this_page->[0], $total_items) %>\ + <%= l('[_1] of [_2] messages', $pgn->{this_page}[1] - $pgn->{this_page}[0], $pgn->{total_items}) %>\ <%= l(', [_1] new', $total_new_mails) if $total_new_mails > 0 =%> <%= l(' - mailbox size: [_1]', print_sizes10 $total_size) if $total_size %> </p> diff --git a/templates/headers/_display_headers.html.ep b/templates/headers/_display_headers.html.ep index 4dd36a1..ad60fc6 100644 --- a/templates/headers/_display_headers.html.ep +++ b/templates/headers/_display_headers.html.ep @@ -63,8 +63,8 @@ </thead> <tbody> - % foreach my $msgnum ($first_item .. $last_item) { - % my $msg = $msgs->[$msgnum - $first_item]; + % foreach my $msgnum ($pgn->{first_item} .. $pgn->{last_item}) { + % my $msg = $msgs->[$msgnum - $pgn->{first_item}]; %= tag tr => (class => $msg->{unread} ? 'new-mail' : '') => (id => $msg->{message_handle}) => begin <td class="hide-small"> diff --git a/templates/headers/_pagination1.html.ep b/templates/headers/_pagination1.html.ep index 0e000f9..798f79f 100644 --- a/templates/headers/_pagination1.html.ep +++ b/templates/headers/_pagination1.html.ep @@ -1,7 +1,7 @@ <div> - <a href="<%= url_with->query({start => $prev_page->[0]}) %>"> ← </a> - <a href="<%= url_with->query({start => $first_page->[0]}) %>"> ↞ </a> - [<%= l('page [_1] of [_2]', $current_page+1, $total_pages) %>] - <a href="<%= url_with->query({start => $last_page->[0]}) %>"> ↠ </a> - <a href="<%= url_with->query({start => $next_page->[0]}) %>"> → </a> + <a href="<%= url_with->query({start => $pgn->{prev_page}[0]}) %>"> ← </a> + <a href="<%= url_with->query({start => $pgn->{first_page}[0]}) %>"> ↞ </a> + [<%= l('page [_1] of [_2]', $pgn->{current_page}+1, $pgn->{total_pages}) %>] + <a href="<%= url_with->query({start => $pgn->{last_page}[0]}) %>"> ↠ </a> + <a href="<%= url_with->query({start => $pgn->{next_page}[0]}) %>"> → </a> </div> diff --git a/templates/headers/_pagination2.html.ep b/templates/headers/_pagination2.html.ep index 63e8f63..eef2abe 100644 --- a/templates/headers/_pagination2.html.ep +++ b/templates/headers/_pagination2.html.ep @@ -1,12 +1,12 @@ <div> %= form_for '' => (class => 'pure-form') => begin - <a href="<%= url_with->query({start => $first_page->[0]}) %>"><img src="/first.gif" alt="<%= l('first') . ' ' . l 'page' %>"></a> - <a href="<%= url_with->query({start => $prev_page->[0]}) %>"><img src="/left.gif" alt="<%= l('previous') . ' ' . l 'page' %>"></a> + <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> [ %= label_for custompage => ucfirst l 'page' - %= number_field start => (id => 'custompage') => (size => 3) => (placeholder => $current_page+1) + %= number_field start => (id => 'custompage') => (size => 3) => (placeholder => $pgn->{current_page}+1) %= l 'of' - %= $total_pages + %= $pgn->{total_pages} ] % my $h = $c->req->query_params->to_hash; @@ -16,7 +16,7 @@ % } % } - <a href="<%= url_with->query({start => $next_page->[0]}) %>"><img src="/right.gif" alt="<%= l('next') . ' ' . l 'page' %>"></a> - <a href="<%= url_with->query({start => $last_page->[0]}) %>"><img src="/last.gif" alt="<%= l('last') . ' ' . l('page') %>"></a> + <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 </div> |