cartodb/app/views/shared/_paginate.html.erb
2020-06-15 10:58:47 +08:00

16 lines
532 B
Plaintext

<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>