@@ -15,23 +15,44 @@ <h3>Unpublished documents pagination</h3>
15
15
</ li >
16
16
< li class ="pagination__list-pages ">
17
17
< ol >
18
- < li class ="pagination__list-item ">
19
- < a class ="pagination__page-link-current "
20
- href ="{{ request.path }}?{% if query_string %}{{ query_string }}&{% endif %}page={{ paginator.current_page }} "
21
- aria-label ="Current page, Page {{ paginator.current_page }} "
22
- aria-current ="true ">
23
- < span > Current page</ span > {{ paginator.current_page }}
24
- </ a >
25
- </ li >
26
- {% for page in paginator.next_pages %}
18
+ {% if paginator.show_first_page %}
27
19
< li class ="pagination__list-item ">
28
20
< a class ="pagination__page-link "
29
- href ="{{ request.path }}?{% if query_string %}{{ query_string }}&{% endif %}page={{ page }} "
30
- aria-label ="Go to page {{ page }} ">
31
- < span > Page</ span > {{ page }}
21
+ href ="{{ request.path }}?{% if query_string %}{{ query_string }}&{% endif %}page=1 "
22
+ aria-label ="Go to page 1 ">
23
+ < span > Page</ span > 1
32
24
</ a >
33
25
</ li >
26
+ {% endif %}
27
+ {% if paginator.show_first_page_divider %}< li class ="pagination__list-divider "> ⋯</ li > {% endif %}
28
+ {% for page in paginator.page_range %}
29
+ < li class ="pagination__list-item ">
30
+ {% if page == paginator.current_page %}
31
+ < a class ="pagination__page-link-current "
32
+ href ="{{ request.path }}?{% if query_string %}{{ query_string }}&{% endif %}page={{ page }} "
33
+ aria-label ="Current page, Page {{ page }} "
34
+ aria-current ="true ">
35
+ < span > Current page</ span > {{ page }}
36
+ </ a >
37
+ {% else %}
38
+ < a class ="pagination__page-link "
39
+ href ="{{ request.path }}?{% if query_string %}{{ query_string }}&{% endif %}page={{ page }} "
40
+ aria-label ="Go to page {{ page }} ">
41
+ < span > Page</ span > {{ page }}
42
+ </ a >
43
+ {% endif %}
44
+ </ li >
34
45
{% endfor %}
46
+ {% if paginator.show_last_page_divider %}< li class ="pagination__list-divider "> ⋯</ li > {% endif %}
47
+ {% if paginator.show_last_page %}
48
+ < li class ="pagination__list-item ">
49
+ < a class ="pagination__page-link "
50
+ href ="{{ request.path }}?{% if query_string %}{{ query_string }}&{% endif %}page={{ paginator.number_of_pages }} "
51
+ aria-label ="Go to page {{ paginator.number_of_pages }} ">
52
+ < span > Page</ span > {{ paginator.number_of_pages }}
53
+ </ a >
54
+ </ li >
55
+ {% endif %}
35
56
</ ol >
36
57
</ li >
37
58
< li class ="pagination__list-item ">
0 commit comments