2019-10-09 01:19:57 +02:00
|
|
|
|
- params = assigns[:params] || []
|
|
|
|
|
|
|
|
|
|
= if @page.total_pages > 1 do
|
2020-12-10 07:22:44 +01:00
|
|
|
|
nav.pagination.hide-mobile-t
|
2019-10-09 01:19:57 +02:00
|
|
|
|
= if not first_page?(@page) do
|
|
|
|
|
= link("« First", to: first_page_path(@page, @route, params))
|
2019-11-30 00:54:05 +01:00
|
|
|
|
= link("‹ Prev", to: prev_page_path(@page, @route, params), class: "js-prev")
|
2019-10-09 01:19:57 +02:00
|
|
|
|
|
2020-12-10 07:22:44 +01:00
|
|
|
|
= if left_gap?(@page) do
|
|
|
|
|
span.page.gap
|
|
|
|
|
' …
|
2019-10-09 01:19:57 +02:00
|
|
|
|
|
2020-12-10 07:22:44 +01:00
|
|
|
|
= for number <- left_page_numbers(@page) do
|
|
|
|
|
= link(number, to: page_path(@route, params, number))
|
2019-10-09 01:19:57 +02:00
|
|
|
|
|
|
|
|
|
span.page-current = @page.page_number
|
|
|
|
|
|
2020-12-10 07:22:44 +01:00
|
|
|
|
= for number <- right_page_numbers(@page) do
|
|
|
|
|
= link(number, to: page_path(@route, params, number))
|
2019-10-09 01:19:57 +02:00
|
|
|
|
|
2020-12-10 07:22:44 +01:00
|
|
|
|
= if right_gap?(@page) do
|
|
|
|
|
span.page.gap
|
|
|
|
|
' …
|
2019-10-09 01:19:57 +02:00
|
|
|
|
|
|
|
|
|
= if not last_page?(@page) do
|
2019-11-30 00:54:05 +01:00
|
|
|
|
= link("Next ›", to: next_page_path(@page, @route, params), class: "js-next")
|
2020-06-16 19:03:58 +02:00
|
|
|
|
= link("Last »", to: last_page_path(@page, @route, params))
|
2020-12-10 07:22:44 +01:00
|
|
|
|
|
|
|
|
|
nav.pagination.hide-desktop-t
|
|
|
|
|
= if first_page?(@page) do
|
|
|
|
|
span « First
|
|
|
|
|
span ‹ Prev
|
|
|
|
|
- else
|
|
|
|
|
= link("« First", to: first_page_path(@page, @route, params))
|
|
|
|
|
= link("‹ Prev", to: prev_page_path(@page, @route, params), class: "js-prev")
|
|
|
|
|
|
|
|
|
|
.dropdown
|
|
|
|
|
a.page-current.pagination__dropdown
|
|
|
|
|
=> @page.page_number
|
|
|
|
|
i.fa.fa-caret-down
|
|
|
|
|
|
|
|
|
|
.dropdown__content
|
|
|
|
|
= 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 last_page?(@page) do
|
|
|
|
|
span Next ›
|
|
|
|
|
span Last »
|
|
|
|
|
- else
|
|
|
|
|
= link("Next ›", to: next_page_path(@page, @route, params), class: "js-next")
|
|
|
|
|
= link("Last »", to: last_page_path(@page, @route, params))
|