Sha256: a34727261252aefd2d86214ade64c8812535788bdeda2d62a4858e2cc2434d33

Contents?: true

Size: 1.09 KB

Versions: 2

Compression:

Stored size: 1.09 KB

Contents

<% if pagination.has_multiple_pages? %>
  <div class="pager">
    <% if pagination.has_first_page? %>
      <%= link_to t('pager.first'), pagination.first_page_path, class: 'first' %>
    <% end %>
    <% if pagination.has_previous_page? %>
      <%= link_to t('pager.previous'), pagination.previous_page_path, class: 'previous' %>
    <% end %>
    <% if pagination.navigation.has_less_pages? %>
      <span class="ellipsis">...</span>
    <% end %>
    <% pagination.navigation.pages.each do |page| %>
      <% if pagination.is_current_page? page %>
        <span class="page current"><%= page %></span>
      <% else %>
        <%= link_to page, pagination.page_path(page), class: 'page' %>
      <% end %>
    <% end %>
    <% if pagination.navigation.has_more_pages? %>
      <span class="ellipsis">...</span>
    <% end %>
    <% if pagination.has_next_page? %>
      <%= link_to t('pager.next'), pagination.next_page_path, class: 'next' %> 
    <% end %>
    <% if pagination.has_last_page? %>
      <%= link_to t('pager.last'), pagination.last_page_path, class: 'last' %>
    <% end %>
  </div>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_pagination-2.0.10 app/views/rails_pagination/_pager.html.erb
rails_pagination-2.0.9 app/views/rails_pagination/_pager.html.erb