AlchemyCMS/alchemy_cms

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

Summary

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