diff options
author | Jelle van der Waa <jelle@archlinux.org> | 2020-08-06 22:06:57 +0200 |
---|---|---|
committer | jelle van der Waa <jelle@vdwaa.nl> | 2020-09-11 21:23:54 +0200 |
commit | ee6df5a6eeaee51b853c11ae1e2ac5ccf1fac218 (patch) | |
tree | 3eebc3099ceaf665c799b38bb7e6be6fabec6a52 | |
parent | a96d02c97224bf77a507ef3954da03f0246ed50c (diff) | |
download | archweb-ee6df5a6eeaee51b853c11ae1e2ac5ccf1fac218.tar.gz archweb-ee6df5a6eeaee51b853c11ae1e2ac5ccf1fac218.zip |
Rewrite deprecated ifequal
This tag can easily be rewritten to {% if a == b %}
-rw-r--r-- | templates/news/paginator.html | 4 | ||||
-rw-r--r-- | templates/todolists/list.html | 4 | ||||
-rw-r--r-- | templates/todolists/paginator.html | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/templates/news/paginator.html b/templates/news/paginator.html index 524c6664..06541445 100644 --- a/templates/news/paginator.html +++ b/templates/news/paginator.html @@ -7,11 +7,11 @@ title="Go to previous page" rel="prev">< Prev</a> {% endif %} {% for num in paginator.page_range %} - {% ifequal num page_obj.number %} + {% if num == page_obj.number %} <span>{{ num }}</span> {% else %} <a href="?page={{ num }}" title="Go to page {{ num }}">{{ num }}</a> - {% endifequal %} + {% endif %} {% endfor %} {% if page_obj.has_next %} <a class="next" href="?page={{ page_obj.next_page_number }}" diff --git a/templates/todolists/list.html b/templates/todolists/list.html index 75066a8d..919d8c30 100644 --- a/templates/todolists/list.html +++ b/templates/todolists/list.html @@ -42,8 +42,8 @@ <td class="wrap">{{ list.description|urlize }}</td> <td>{{ list.pkg_count }}</td> <td>{{ list.incomplete_count }}</td> - <td>{% ifequal list.incomplete_count 0 %}<span class="complete">Complete</span> - {% else %}<span class="incomplete">Incomplete</span>{% endifequal %}</td> + <td>{% if list.incomplete_count == 0 %}<span class="complete">Complete</span> + {% else %}<span class="incomplete">Incomplete</span>{% endif %}</td> </tr> {% endfor %} </tbody> diff --git a/templates/todolists/paginator.html b/templates/todolists/paginator.html index 3b077419..eab4eae4 100644 --- a/templates/todolists/paginator.html +++ b/templates/todolists/paginator.html @@ -7,11 +7,11 @@ title="Go to previous page">< Prev</a> {% endif %} {% for num in paginator.page_range %} - {% ifequal num page_obj.number %} + {% if num == page_obj.number %} <span>{{ num }}</span> {% else %} <a href="?page={{ num }}" title="Go to page {{ num }}">{{ num }}</a> - {% endifequal %} + {% endif %} {% endfor %} {% if page_obj.has_next %} <a class="next" href="?page={{ page_obj.next_page_number }}" |