Sha256: b56072ae71dc14faccb24e4ccce5499906704d53f6f3c2ed849defe1f2d3a963

Contents?: true

Size: 716 Bytes

Versions: 16

Compression:

Stored size: 716 Bytes

Contents

<div class="pagination">

  <% if @items.prev? %>
    <%= link_to _("&larr; Previous"), params.merge(:page => @items.prev.number) %>
  <% else %>
    <span class="disabled"><%= _("&larr; Previous") %></span>
  <% end %>

  <% last_page = 0 -%>

  <% build_pagination(@pager) do |n| -%>
    <% if @items.number == n -%>
      <span class="current"><%= n %></span>
    <% else -%>
      <%= "..." if last_page + 1 < n %>
      <%= link_to n, params.merge(:page => n) %>
    <% end -%>
    <% last_page = n -%>

  <% end -%>

  <% if @items.next? %>
    <%= link_to _("Next &rarr;"), params.merge(:page => @items.next.number) %>
  <% else %>
    <span class="disabled"><%= _("Next &rarr;") %></span>
  <% end %>

</div>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fesplugas-typus-0.9.0 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.1 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.10 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.11 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.12 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.13 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.14 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.15 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.2 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.3 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.4 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.5 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.6 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.7 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.8 app/views/admin/shared/_pagination.html.erb
fesplugas-typus-0.9.9 app/views/admin/shared/_pagination.html.erb