You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
532 B

<div class="paginate">
<% if collection.prev_page %>
<%= link_to('Previous', params.merge({:page => collection.prev_page}), {:class => 'previous'}) %>
<% end %>
<ul>
<% collection.page_range.each do |i| %>
<li<%= ' class="selected"'.html_safe if i == collection.current_page %>>
<%= link_to(i, params.merge({:page => i})) %>
</li>
<% end %>
</ul>
<% if collection.next_page %>
<%= link_to('Next', params.merge({:page => collection.next_page}), {:class => 'next'}) %>
<% end %>
</div>