Skip to content

Commit

Permalink
Retire les usages du templatetag obsolète {% ifnotequal %} (préparati…
Browse files Browse the repository at this point in the history
…on pour Django 4)
  • Loading branch information
Arnaud-D committed Oct 1, 2023
1 parent e127949 commit 195f807
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions templates/misc/pagination.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% endcaptureas %}

<ul class="pagination pagination-{{ position }}">
{% ifnotequal nb 1 %}
{% if nb != 1 %}
<li class="prev">
{% with prev=nb|add:-1 %}
<a href="{% append_query_params page=prev %}{{ full_anchor }}" class="ico-after arrow-left blue" rel="prev">
Expand All @@ -21,18 +21,18 @@
</a>
{% endwith %}
</li>
{% endifnotequal %}
{% endif %}


{% for page in pages %}
{% if page %}
<li>
<a
{% ifnotequal page nb %}
{% if page != nb %}
href="{% append_query_params page=page %}{{ full_anchor }}"
{% else %}
class="current"
{% endifnotequal %}
{% endif %}
{% if page|add:-1 == nb %}
rel="next"
{% elif page|add:1 == nb %}
Expand Down
4 changes: 2 additions & 2 deletions templates/misc/paginator.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
{% if page_nb %}
<li>
<a
{% ifnotequal page_nb page_obj.number %}
{% if page_nb != page_obj.number %}
href="{% append_query_params page=page_nb %}{{ full_anchor }}"
{% else %}
class="current"
{% endifnotequal %}
{% endif %}
{% if page_nb|add:-1 == page_obj.number %}
rel="next"
{% elif page_nb|add:1 == page_obj.number %}
Expand Down

0 comments on commit 195f807

Please sign in to comment.