TrestleAdmin/trestle

View on GitHub
app/views/kaminari/trestle/_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
    total_pages:   total number of pages
    per_page:      number of items to fetch per page
    remote:        data-remote
-%>
<li class="page-item<% if current_page.first? %> disabled<% end %>">
  <% if current_page.first? %>
    <span class="page-link">&laquo;</span>
  <% else %>
    <%= link_to content_tag(:span, "&laquo;".html_safe), url, class: "page-link", remote: remote %>
  <% end %>
</li>