app/views/kaminari/_paginator.html.haml in kaminari-0.10.4 vs app/views/kaminari/_paginator.html.haml in kaminari-0.11.0

- old
+ new

@@ -1,23 +1,18 @@ -# The container tag - available local variables - current_page: the page number of currently displayed 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 paginator: the paginator that renders the pagination tags inside = paginator.render do %nav.pagination - = current_page > 1 ? prev_link_tag : prev_span_tag + = first_page_tag unless current_page.first? + = prev_page_tag unless current_page.first? - each_page do |page| - - if page.current? - = current_page_tag - - elsif page.left_outer? || page.right_outer? || page.inside_window? - - if page.first? - = first_page_link_tag - - elsif page.last? - = last_page_link_tag - - else - = page_link_tag + - if page.left_outer? || page.right_outer? || page.inside_window? + = page_tag page - elsif !page.was_truncated? - = truncated_span_tag - = num_pages > current_page ? next_link_tag : next_span_tag + = gap_tag + = next_page_tag unless current_page.last? + = last_page_tag unless current_page.last?