From: Andrew Donnellan Date: Thu, 27 Aug 2020 14:14:02 +0000 (+1000) Subject: templates: Replace ifequal and ifnotequal with if X-Git-Tag: v3.0.0~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19d0f5dfa079f3da4c63a179289c503ee829729d;p=thirdparty%2Fpatchwork.git 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 --- diff --git a/patchwork/templates/patchwork/partials/pagination.html b/patchwork/templates/patchwork/partials/pagination.html index 04f4d166..ee4b555d 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 985e9bee..02d6dff8 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 4ca78dae..4a4b5582 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 %}