2019-10-09 01:19:57 +02:00
|
|
|
|
- params = assigns[:params] || []
|
|
|
|
|
|
|
|
|
|
= if @page.total_pages > 1 do
|
|
|
|
|
nav.pagination
|
|
|
|
|
= if not first_page?(@page) do
|
|
|
|
|
= link("« First", to: first_page_path(@page, @route, params))
|
|
|
|
|
= link("‹ Prev", to: prev_page_path(@page, @route, params))
|
|
|
|
|
|
|
|
|
|
= if left_gap?(@page) do
|
|
|
|
|
span.page.gap
|
|
|
|
|
' …
|
|
|
|
|
|
|
|
|
|
= for number <- left_page_numbers(@page) do
|
|
|
|
|
= link(number, to: page_path(@route, params, number))
|
|
|
|
|
|
|
|
|
|
span.page-current = @page.page_number
|
|
|
|
|
|
|
|
|
|
= for number <- right_page_numbers(@page) do
|
|
|
|
|
= link(number, to: page_path(@route, params, number))
|
|
|
|
|
|
|
|
|
|
= if right_gap?(@page) do
|
|
|
|
|
span.page.gap
|
|
|
|
|
' …
|
|
|
|
|
|
|
|
|
|
= if not last_page?(@page) do
|
|
|
|
|
= link("Next ›", to: next_page_path(@page, @route, params))
|
2019-11-17 22:30:20 +01:00
|
|
|
|
/= link("Last »", to: last_page_path(@page, @route, params))
|