Simplied page nav a little further...

by dropping the '->to_abs' calls.  Makes no difference to the links
and saves a little clutter.
This commit is contained in:
barnold 2022-09-18 14:51:16 +01:00
parent 106c859e64
commit 7579138d99
1 changed files with 4 additions and 8 deletions

View File

@ -2,22 +2,18 @@
Page <%= $pager->current_page %> of <%= $pager->last_page %>
&nbsp;&nbsp;&nbsp;
<%= link_to url_with(page_number => 1)
->to_abs => begin %>◄ First<% end %>
<%= link_to url_with(page_number => 1) => begin %>◄ First<% end %>
% if (my $prev = $pager->previous_page) {
<%= link_to url_with(page_number => $prev)
->to_abs => begin %>◄ Prev<% end %>
<%= link_to url_with(page_number => $prev) => begin %>◄ Prev<% end %>
% } else {
◄ Prev
% }
% if (my $next = $pager->next_page) {
<%= link_to url_with(page_number => $next)
->to_abs => begin %>Next ►<% end %>
<%= link_to url_with(page_number => $next) => begin %>Next ►<% end %>
% } else {
Next ►
% }
<%= link_to url_with(page_number => $pager->last_page)
->to_abs => begin %>Last ►<% end %>
<%= link_to url_with(page_number => $pager->last_page) => begin %>Last ►<% end %>