Skip to content

Commit

Permalink
dont display too much pages
Browse files Browse the repository at this point in the history
  • Loading branch information
luca3m committed Jul 2, 2014
1 parent a54678a commit 9e37dae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion views/bootstrap_classic.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%li
=link_to "Prev", url(controller, action, params.merge("page" => previous_page)), :class => :prev_next

- (1..total_pages).each do |page|
- ([1,current_page-5].max()..[total_pages,current_page+5].min()).each do |page|
%li{:class => ( "active" if page == current_page) }
=link_to page, url(controller, action, params.merge("page" => page))

Expand Down

0 comments on commit 9e37dae

Please sign in to comment.