summaryrefslogtreecommitdiff
path: root/templates/headers/_pagination2.html.ep
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de>2022-05-03 18:22:43 +0200
committerJannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de>2022-05-03 18:22:43 +0200
commita6e6f8be88a93699765f25aee0e6109a3eb0b307 (patch)
treec4ba131bdf3af616ff70072876d384924bf408ce /templates/headers/_pagination2.html.ep
parentebe37a68d39dbc1cc4f6af1c05301d5a5fc29c13 (diff)
reworked templates based on purecss
Diffstat (limited to 'templates/headers/_pagination2.html.ep')
-rw-r--r--templates/headers/_pagination2.html.ep22
1 files changed, 22 insertions, 0 deletions
diff --git a/templates/headers/_pagination2.html.ep b/templates/headers/_pagination2.html.ep
new file mode 100644
index 0000000..236e9bb
--- /dev/null
+++ b/templates/headers/_pagination2.html.ep
@@ -0,0 +1,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>