This repository was archived by the owner on Apr 17, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +35
-11
lines changed Expand file tree Collapse file tree 2 files changed +35
-11
lines changed Original file line number Diff line number Diff line change 11{% load bootstrap_pagination %}
22< ul class ="pagination{% if size == "small " %} pagination-sm{% endif %}{% if size == "large " %} pagination-lg{% endif %}{% block extra_classes %}{% endblock %} ">
33{% if show_first_last %}
4- < li {% if not page.has_previous %}class ="disabled "{% endif %} >
4+ {% if not page.has_previous %}
5+ < li class ="disabled ">
6+ < span > {{ first_label }}</ span >
7+ </ li >
8+ {% else %}
9+ < li >
510 < a title ="First Page " href ="{{ first_page_url|default: "# "|escape }}"> {{first_label}}</ a >
6- </ li >
11+ </ li >
12+ {% endif %}
713{% endif %}
814{% if show_prev_next %}
9- < li {% if not page.has_previous %}class ="disabled "{% endif %} >
15+ {% if not page.has_previous %}
16+ < li class ="disabled ">
17+ < span title ="Previous Page "> {{ previous_label }}</ span >
18+ </ li >
19+ {% else %}
20+ < li >
1021 < a title ="Previous Page " href ="{{ previous_page_url|default: "# "|escape }}"> {{ previous_label }}</ a >
11- </ li >
22+ </ li >
23+ {% endif %}
1224{% endif %}
1325{% for pagenum, index_range, url in page_urls %}
1426 {% if page.number == pagenum %}
1527 < li class ="active ">
16- < a title ="Current Page " href =" # " > {% if show_index_range %} {{ index_range }} {% else %} {{ pagenum }} {%endif %}</ a >
28+ < span title ="Current Page "> {% if show_index_range %} {{ index_range }} {% else %} {{ pagenum }} {%endif %}</ span >
1729 </ li >
1830 {% else %}
1931 < li >
2234 {% endif %}
2335{% endfor %}
2436{% if show_prev_next %}
25- < li {% if not page.has_next %}class ="disabled "{% endif %} >
37+ {% if not page.has_next %}
38+ < li class ="disabled ">
39+ < span title ="Next Page "> {{ next_label }}</ span >
40+ </ li >
41+ {% else %}
42+ < li >
2643 < a title ="Next Page " href ="{{ next_page_url|default: "# "|escape }}"> {{ next_label }}</ a >
27- </ li >
44+ </ li >
45+ {% endif %}
2846{% endif %}
2947{% if show_first_last %}
30- < li {% if not page.has_next %}class ="disabled "{% endif %} >
48+ {% if not page.has_next %}
49+ < li class ="disabled ">
50+ < span title ="Last Page " > {{ last_label }}</ span >
51+ </ li >
52+ {% else %}
53+ < li >
3154 < a title ="Last Page " href ="{{ last_page_url|default: "# "|escape }}"> {{last_label}}</ a >
32- </ li >
55+ </ li >
56+ {% endif %}
3357{% endif %}
3458</ ul >
Original file line number Diff line number Diff line change @@ -30,5 +30,5 @@ def test_example(self):
3030 html = lxml .html .fragment_fromstring (template .render (c ))
3131 self .assertEqual (html .get ('class' ), 'pagination' )
3232 self .assertEqual (
33- html .cssselect ('a [title=\" Current Page\" ]' )[0 ].text .strip (),
34- '2' )
33+ html .cssselect ('[title=\" Current Page\" ]' )[0 ].text .strip (),
34+ '2' )
You can’t perform that action at this time.
0 commit comments