backend: make pager object hold only numbers
This commit is contained in:
parent
46682ed7da
commit
1748621469
2 changed files with 14 additions and 10 deletions
|
@ -1,11 +1,15 @@
|
|||
% if (my $pager = stash("pager")) {
|
||||
<footer>
|
||||
<nav class="text-center">
|
||||
<%= link_to "<<" => $pager->{first_page} if exists $pager->{first_page} %>
|
||||
<%= link_to "<" => $pager->{previous_page} if exists $pager->{previous_page} %>
|
||||
<%= link_to "<<" => url_with->query({ page => $pager->{first_page} })
|
||||
if exists $pager->{first_page} %>
|
||||
<%= link_to "<" => url_with->query({ page => $pager->{previous_page} })
|
||||
if exists $pager->{previous_page} %>
|
||||
<span><%= $pager->{current_page} %></span>
|
||||
<%= link_to ">" => $pager->{next_page} if exists $pager->{next_page} %>
|
||||
<%= link_to ">>" => $pager->{last_page} if exists $pager->{last_page} %>
|
||||
<%= link_to ">" => url_with->query({ page => $pager->{next_page} })
|
||||
if exists $pager->{next_page} %>
|
||||
<%= link_to ">>" => url_with->query({ page => $pager->{last_page} })
|
||||
if exists $pager->{last_page} %>
|
||||
</nav>
|
||||
</footer>
|
||||
% }
|
||||
|
|
Reference in a new issue