From 19d0f5dfa079f3da4c63a179289c503ee829729d Mon Sep 17 00:00:00 2001 From: Andrew Donnellan Date: Fri, 28 Aug 2020 00:14:02 +1000 Subject: templates: Replace ifequal and ifnotequal with if Django 3.1 deprecates the ifequal and ifnotequal tags, for removal in 4.0. Replace all occurrences of ifequal and ifnotequal with if. Signed-off-by: Andrew Donnellan Reviewed-by: Stephen Finucane --- .../templates/patchwork/partials/pagination.html | 8 ++++---- .../templates/patchwork/partials/patch-list.html | 20 ++++++++++---------- patchwork/templates/patchwork/profile.html | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/patchwork/templates/patchwork/partials/pagination.html b/patchwork/templates/patchwork/partials/pagination.html index 04f4d16..ee4b555 100644 --- a/patchwork/templates/patchwork/partials/pagination.html +++ b/patchwork/templates/patchwork/partials/pagination.html @@ -1,6 +1,6 @@ {% load listurl %} -{% ifnotequal page.paginator.num_pages 1 %} +{% if page.paginator.num_pages != 1 %}
{% if page.has_previous %} @@ -18,12 +18,12 @@ {% endif %} {% for p in page.paginator.adjacent_set %} - {% ifequal p page.number %} + {% if p == page.number %} {{ p }} {% else %} {{ p }} - {% endifequal %} + {% endif %} {% endfor %} {% if page.paginator.leading_set %} @@ -42,4 +42,4 @@ » {% endif %}
-{% endifnotequal %} +{% endif %} diff --git a/patchwork/templates/patchwork/partials/patch-list.html b/patchwork/templates/patchwork/partials/patch-list.html index 985e9be..02d6dff 100644 --- a/patchwork/templates/patchwork/partials/patch-list.html +++ b/patchwork/templates/patchwork/partials/patch-list.html @@ -71,7 +71,7 @@ $(document).ready(function() { {% endif %} - {% ifequal order.name "name" %} + {% if order.name == "name" %} @@ -84,7 +84,7 @@ $(document).ready(function() { {% else %} Patch {% endif %} - {% endifequal %} + {% endif %} @@ -100,7 +100,7 @@ $(document).ready(function() { - {% ifequal order.name "date" %} + {% if order.name == "date" %} @@ -113,11 +113,11 @@ $(document).ready(function() { {% else %} Date {% endif %} - {% endifequal %} + {% endif %} - {% ifequal order.name "submitter" %} + {% if order.name == "submitter" %} @@ -132,11 +132,11 @@ $(document).ready(function() { {% else %} Submitter {% endif %} - {% endifequal %} + {% endif %} - {% ifequal order.name "delegate" %} + {% if order.name == "delegate" %} @@ -149,11 +149,11 @@ $(document).ready(function() { {% else %} Delegate {% endif %} - {% endifequal %} + {% endif %} - {% ifequal order.name "state" %} + {% if order.name == "state" %} @@ -166,7 +166,7 @@ $(document).ready(function() { {% else %} State {% endif %} - {% endifequal %} + {% endif %} diff --git a/patchwork/templates/patchwork/profile.html b/patchwork/templates/patchwork/profile.html index 4ca78da..4a4b558 100644 --- a/patchwork/templates/patchwork/profile.html +++ b/patchwork/templates/patchwork/profile.html @@ -55,13 +55,13 @@ address.

{{ email.email }} - {% ifnotequal user.email email.email %} + {% if user.email != email.email %}
{% csrf_token %}
- {% endifnotequal %} + {% endif %} {% if email.is_optout %} -- cgit v1.2.3