Remove pager theme functions and theme pager
-
highlight current page
Fixed.
I changed default value of
« First
to<-
andLast »
to->
but user can change it from views ui.Edited by Azz-eddine BERRAMOU -
The
« First
andLast »
configured in the view ui, just remove them, pager will take the default ones<-
and->
, i think we shouldn't remove that option and make them always<-
and->
, user can set the label of the view.Edited by Azz-eddine BERRAMOU -
Thanks for explanation. Currently pagination shows 9 pages in a row and then three dots (which mean that there are some more pages). Second screenshot shows previous version of the pagination. The left and right arrows allow the user jump to the previous and next pages respectively. Also, here are:
- First and last pages are represented as a number (it's possible to jump right to the first or last page).
- Highlighted current, previous and next pages around the current one (in case when it's 4th page).
Here is how the pagination worked for other count of pages:
On page 1: [1] 2 ... 15 ->
On page 2: <- 1 [2] 3 ... 15 ->
On page 3: <- 1 2 [3] 4 ... 15 ->
On page 4: <- 1 ... 3 [4] 5 ... 15 ->
On page 15: <- 1 ... 14 [15]
Here
[x]
means current highlighted page,<-
and->
are represented as icons with.left.arrow
and.right.arrow
Fomantic UI classes.Please feel free to ask questions, if any.
-
Actually it would be good to have something like
<- 1 << ... 3 [4] 5 ... >> 15 ->
-
[]
active page Highlighted -
>>
Go to next page -
<<
Go to previous page -
...
ellipsis if there are further next pages
It doesn't make sense to represent previous and next page with
...
I suggest let...
for ellipsis as Drupal did{% if ellipses.next %} <div class="pager__item pager__item--ellipsis disabled item" role="presentation">…</div> {% endif %}
and represent Go to previous page by
angle.double.left.icon
and Go to next page by.angle.double .right.icon
Result:What do you think? I didn't commit this yet.
Edited by Azz-eddine BERRAMOU -
-
It doesn't make sense to represent previous and next page with
...
Old pagination didn't use
...
in navigation purposes. Menu item with...
had class.disabled
and didn't receive pointer events (default behavior provided by Fomantic UI).and represent Go to previous page by
angle.double.left.icon
and Go to next page by.angle.double .right.icon
Navigation to the previous and to the next pages is pretty simple: they surround current page. Also, it's possible to use related arrows at the beginning and at the end of the pager. For example, here is how old pagination looks like for the 4th page:
Here the user may click 3rd and 5th pages before and after the current one respectively.
Here is how the pagination worked for other pages:
On page 1: [1] 2 ... 15 ->
On page 2: <- 1 [2] 3 ... 15 ->
On page 3: <- 1 2 [3] 4 ... 15 ->
On page 4: <- 1 ... 3 [4] 5 ... 15 ->
On page 15: <- 1 ... 14 [15]
Please let me know if something is not clear.
-
With recent changes pagination looks like:
Some pages are doubled, first one in the previous example and last one here:
For the 3rd page old pagination looked like:
If a page with pagination has path like
dev.site.com/content?page=37&foo=bar
then there is a warning:Warning: A non-numeric value encountered in __TwigTemplate_ad7d09fb1d5af834983d36126012d0c35a52d0fbb186721e77d73a470ba6a7ae->doDisplay() (line 137 of sites/default/files/php/twig/5dea5ceba26e0_pager.html.twig_3aUPv7dAsKgu0LiqTfaS5LLs8/nF924rhrtYvMtR_t4CsBLPHK2RuVdm4SIRU3LrUOgtg.php).
And pager looks like:
Please let me know if something is not clear.
-
-
Thanks for the commit. On the 5th page current pagination looks like:
Here is old variation:
Here is left arrow which switches pagination to the previous page, first page, three dots (
.disabled.item
), previous page, current highlighted page, next page, three dots, last page and right arrow which switches pagination to the next page.