AlchemyCMS/alchemy_cms

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

Summary

Maintainability
Test Coverage
<%# Link to the "Previous" page
  - available local variables
    url:           url to the previous 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.first? -%>
  <span class="previous_page disabled">
    <%= render_icon("arrow-left-s") %>
  </span>
<% else -%>
  <%= link_to url, rel: 'prev', remote: remote, class: 'previous_page', title: Alchemy.t(:previous_page, scope: 'pagination') do %>
    <%= render_icon("arrow-left-s") %>
  <% end %>
<% end -%>