AlchemyCMS/alchemy_cms

View on GitHub
app/views/kaminari/alchemy/_last_page.html.erb

Summary

Maintainability
Test Coverage
<%# Link to the "Last" page
  - available local variables
    url:           url to the last page
    current_page:  a page object for the currently displayed page
    num_pages:     total number of pages
    per_page:      number of items to fetch per page
    remote:        data-remote
-%>
<% if current_page.last? %>
  <span class="last-page disabled">
    <%= render_icon("skip-right") %>
  </span>
<% else %>
  <%= link_to url, remote: remote, title: Alchemy.t(:last, scope: 'pagination'), class: 'last-page' do %>
    <%= render_icon("skip-right") %>
  <% end %>
<% end %>