Factorisation du code de navigation
This commit is contained in:
parent
e129abee6f
commit
9e7842f198
@ -37,18 +37,6 @@
|
||||
</table>
|
||||
<footer>
|
||||
<span>
|
||||
{% if paginator_filter.has_previous %}
|
||||
<a href="?page=1" role="button">« premier</a>
|
||||
<a href="?page={{ paginator_filter.previous_page_number }}" role="button">précédent</a>
|
||||
{% endif %}
|
||||
|
||||
<span>
|
||||
Page {{ paginator_filter.number }} sur {{ paginator_filter.paginator.num_pages }}
|
||||
</span>
|
||||
|
||||
{% if paginator_filter.has_next %}
|
||||
<a href="?page={{ paginator_filter.next_page_number }}" role="button">suivant</a>
|
||||
<a href="?page={{ paginator_filter.paginator.num_pages }}" role="button">dernier »</a>
|
||||
{% endif %}
|
||||
{% include 'agenda_culturel/paginator.html' %}
|
||||
</span>
|
||||
</footer>
|
@ -72,19 +72,7 @@
|
||||
|
||||
<footer>
|
||||
<span>
|
||||
{% if paginator_filter.has_previous %}
|
||||
<a href="?page=1" role="button">« premier</a>
|
||||
<a href="?page={{ paginator_filter.previous_page_number }}" role="button">précédent</a>
|
||||
{% endif %}
|
||||
|
||||
<span>
|
||||
Page {{ paginator_filter.number }} sur {{ paginator_filter.paginator.num_pages }}
|
||||
</span>
|
||||
|
||||
{% if paginator_filter.has_next %}
|
||||
<a href="?page={{ paginator_filter.next_page_number }}" role="button">suivant</a>
|
||||
<a href="?page={{ paginator_filter.paginator.num_pages }}" role="button">dernier »</a>
|
||||
{% endif %}
|
||||
{% include 'agenda_culturel/paginator.html' %}
|
||||
</span>
|
||||
</footer>
|
||||
</article>
|
||||
|
13
src/agenda_culturel/templates/agenda_culturel/paginator.html
Normal file
13
src/agenda_culturel/templates/agenda_culturel/paginator.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% if paginator_filter.has_previous %}
|
||||
<a href="?page=1" role="button">« premier</a>
|
||||
<a href="?page={{ paginator_filter.previous_page_number }}" role="button">précédent</a>
|
||||
{% endif %}
|
||||
|
||||
<span>
|
||||
Page {{ paginator_filter.number }} sur {{ paginator_filter.paginator.num_pages }}
|
||||
</span>
|
||||
|
||||
{% if paginator_filter.has_next %}
|
||||
<a href="?page={{ paginator_filter.next_page_number }}" role="button">suivant</a>
|
||||
<a href="?page={{ paginator_filter.paginator.num_pages }}" role="button">dernier »</a>
|
||||
{% endif %}
|
@ -104,19 +104,7 @@
|
||||
|
||||
<footer>
|
||||
<span>
|
||||
{% if paginator_filter.has_previous %}
|
||||
<a href="?page=1" role="button">« premier</a>
|
||||
<a href="?page={{ paginator_filter.previous_page_number }}" role="button">précédent</a>
|
||||
{% endif %}
|
||||
|
||||
<span>
|
||||
Page {{ paginator_filter.number }} sur {{ paginator_filter.paginator.num_pages }}
|
||||
</span>
|
||||
|
||||
{% if paginator_filter.has_next %}
|
||||
<a href="?page={{ paginator_filter.next_page_number }}" role="button">suivant</a>
|
||||
<a href="?page={{ paginator_filter.paginator.num_pages }}" role="button">dernier »</a>
|
||||
{% endif %}
|
||||
{% include 'agenda_culturel/paginator.html' %}
|
||||
</span>
|
||||
</footer>
|
||||
</article>
|
||||
|
Loading…
Reference in New Issue
Block a user