1
0

_paginator.html.haml 591 B

12345678910111213141516
  1. -# The container tag
  2. -# available local variables
  3. -# current_page: a page object for the currently displayed page
  4. -# total_pages: total number of pages
  5. -# per_page: number of items to fetch per page
  6. -# remote: data-remote
  7. -# paginator: the paginator that renders the pagination tags inside
  8. = paginator.render do
  9. %nav.pagination
  10. = prev_page_tag unless current_page.first?
  11. - each_page do |page|
  12. - if page.display_tag?
  13. = page_tag page
  14. - elsif !page.was_truncated?
  15. = gap_tag
  16. = next_page_tag unless current_page.last?