summaryrefslogtreecommitdiff
path: root/templates/_pagination2.html.ep
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de>2022-05-01 22:06:03 +0200
committerJannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de>2022-05-01 22:06:03 +0200
commit72ae9b3f63ddbe296f3e4e8f8db2d29303163d68 (patch)
treef0db960b784719df0c7318720880c73b5330b937 /templates/_pagination2.html.ep
parent7c8bd21ccbca8a3166289ab0e5511cc82d2822aa (diff)
use more tag helpers in templates
Diffstat (limited to 'templates/_pagination2.html.ep')
-rw-r--r--templates/_pagination2.html.ep19
1 files changed, 11 insertions, 8 deletions
diff --git a/templates/_pagination2.html.ep b/templates/_pagination2.html.ep
index f838841..e03dbb0 100644
--- a/templates/_pagination2.html.ep
+++ b/templates/_pagination2.html.ep
@@ -1,19 +1,22 @@
<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>\
+<a href="<%= url_with->query({start => $prev_page->[0]-1}) %>"> <img src="/left.gif" alt="<%= l('previous') . ' ' . l 'page' %>"> </a>
-<form>
- [<label for=custompage><%= ucfirst l 'page' %></label>
- <input type=number name=start id=custompage placeholder="<%= $current_page %>" size=3 />
- <%= l 'of' %> <%= $total_pages %>]
+%= form_for '' => begin
+ [
+ %= 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') {
- <input type=hidden name="<%=$k%>" value="<%=$v%>" />
+ %= hidden_field $k => $v
% }
% }
-</form>\
+% end
<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> \ No newline at end of file
+<a href="<%= url_with->query({start => $last_page->[0]-1}) %>"> <img src="/last.gif" alt="<%= l('last') . ' ' . l('page') %>"> </a>