diff options
author | 2015-02-22 01:04:16 +0100 | |
---|---|---|
committer | 2015-02-22 01:04:16 +0100 | |
commit | 62e98a914e6110b50f1c88a5af1a23d3c0f6fcd6 (patch) | |
tree | 22a6e3877f11d69acd1020b86b3f27b3867f8792 /views | |
parent | less pages, add ... item (diff) | |
download | frontend-62e98a914e6110b50f1c88a5af1a23d3c0f6fcd6.tar.gz frontend-62e98a914e6110b50f1c88a5af1a23d3c0f6fcd6.tar.bz2 frontend-62e98a914e6110b50f1c88a5af1a23d3c0f6fcd6.zip |
more pagination tuning
Diffstat (limited to 'views')
-rw-r--r-- | views/pagination.erb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/views/pagination.erb b/views/pagination.erb index 68d1a6b..af43309 100644 --- a/views/pagination.erb +++ b/views/pagination.erb @@ -13,14 +13,14 @@ <% end %> </li> <% min = [1, current_page - 3].max ; max = [max_pages, current_page + 3].min %> - <% if min > 10 %> + <% if min > 3 %> <li><a href="1">1</a></li> <li class="disabled"><a href="#">…</a></li> <% end %> <% (min..max).each do |page| %> <li <% if page == current_page %><%= 'class="active"' %><% end %>><a href="<%= page %>"><%= page %></a></li> <% end %> - <% if (max_pages - max) > 10 %> + <% if (max_pages - max) > 3 %> <li class="disabled"><a href="#">…</a></li> <li><a href="<%= max_pages %>"><%= max_pages %></a></li> <% end %> |