You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
580 B

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