-
Notifications
You must be signed in to change notification settings - Fork 348
/
sliding.html.twig
41 lines (36 loc) · 1.34 KB
/
sliding.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{% if pageCount > 1 %}
{% set item = '@MopaBootstrap/Pagination/sliding_item.html.twig' %}
<ul class="{{ pagination_class|default('pagination') }}">
{% include item with {name: 'first',
text: first_text|default('«') | trans({}, 'pagination'),
page: first is defined ? first : null,
clickable: first is defined and current != first
}
%}
{% include item with {name: 'prev',
text: '‹ ' ~ prev_text|default('Previous') | trans({}, 'pagination'),
page: previous is defined ? previous : null,
clickable: previous is defined
}
%}
{% for page in pagesInRange %}
{% include item %}
{% endfor %}
{%
include item with {
name: 'next',
text: next_text|default('Next') | trans({}, 'pagination') ~ ' ›',
page: next is defined ? next : null,
clickable: next is defined
}
%}
{%
include item with {
name: 'last',
text: last_text|default('»') | trans({}, 'pagination'),
page: last is defined ? last : null,
clickable: last is defined and current != last
}
%}
</ul>
{% endif %}