summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Donnellan <ajd@linux.ibm.com>2020-08-28 00:14:02 +1000
committerStephen Finucane <stephen@that.guru>2020-08-28 00:14:02 +1000
commit19d0f5dfa079f3da4c63a179289c503ee829729d (patch)
treed1638b7c08666b1b937b0e90467c5835cccde236
parentfe0c0ca7279e35904c488dea57345e1d4f13f895 (diff)
downloadpatchwork-19d0f5dfa079f3da4c63a179289c503ee829729d.tar
patchwork-19d0f5dfa079f3da4c63a179289c503ee829729d.tar.gz
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 <ajd@linux.ibm.com> Reviewed-by: Stephen Finucane <stephen@that.guru>
-rw-r--r--patchwork/templates/patchwork/partials/pagination.html8
-rw-r--r--patchwork/templates/patchwork/partials/patch-list.html20
-rw-r--r--patchwork/templates/patchwork/profile.html4
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 %}
<div class="paginator">
{% if page.has_previous %}
<span class="prev">
@@ -18,12 +18,12 @@
{% endif %}
{% for p in page.paginator.adjacent_set %}
- {% ifequal p page.number %}
+ {% if p == page.number %}
<span class="curr" title="Current Page">{{ p }}</span>
{% else %}
<span class="page"><a href="{% listurl page=p %}"
title="Page {{ p }}">{{ p }}</a></span>
- {% endifequal %}
+ {% endif %}
{% endfor %}
{% if page.paginator.leading_set %}
@@ -42,4 +42,4 @@
<span class="next-na">&raquo;</span>
{% endif %}
</div>
-{% 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 %}
<th>
- {% ifequal order.name "name" %}
+ {% if order.name == "name" %}
<a class="colactive" href="{% listurl order=order.reversed_name %}">
<span class="glyphicon glyphicon-chevron-{{ order.updown }}"></span>
</a>
@@ -84,7 +84,7 @@ $(document).ready(function() {
{% else %}
<span class="colinactive">Patch</span>
{% endif %}
- {% endifequal %}
+ {% endif %}
</th>
<th>
@@ -100,7 +100,7 @@ $(document).ready(function() {
</th>
<th>
- {% ifequal order.name "date" %}
+ {% if order.name == "date" %}
<a class="colactive" href="{% listurl order=order.reversed_name %}">
<span class="glyphicon glyphicon-chevron-{{ order.updown }}"></span>
</a>
@@ -113,11 +113,11 @@ $(document).ready(function() {
{% else %}
<span class="colinactive">Date</span>
{% endif %}
- {% endifequal %}
+ {% endif %}
</th>
<th>
- {% ifequal order.name "submitter" %}
+ {% if order.name == "submitter" %}
<a class="colactive" href="{% listurl order=order.reversed_name %}">
<span class="glyphicon glyphicon-chevron-{{ order.updown }}"></span>
</a>
@@ -132,11 +132,11 @@ $(document).ready(function() {
{% else %}
<span class="colinactive">Submitter</span>
{% endif %}
- {% endifequal %}
+ {% endif %}
</th>
<th>
- {% ifequal order.name "delegate" %}
+ {% if order.name == "delegate" %}
<a class="colactive" href="{% listurl order=order.reversed_name %}">
<span class="glyphicon glyphicon-chevron-{{ order.updown }}"></span>
</a>
@@ -149,11 +149,11 @@ $(document).ready(function() {
{% else %}
<span class="colinactive">Delegate</span>
{% endif %}
- {% endifequal %}
+ {% endif %}
</th>
<th>
- {% ifequal order.name "state" %}
+ {% if order.name == "state" %}
<a class="colactive" href="{% listurl order=order.reversed_name %}">
<span class="glyphicon glyphicon-chevron-{{ order.updown }}"></span>
</a>
@@ -166,7 +166,7 @@ $(document).ready(function() {
{% else %}
<span class="colinactive">State</span>
{% endif %}
- {% endifequal %}
+ {% endif %}
</th>
</tr>
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.</p>
<tr>
<td>{{ email.email }}</td>
<td>
- {% ifnotequal user.email email.email %}
+ {% if user.email != email.email %}
<form action="{% url 'user-unlink' person_id=email.id %}"
method="post">
{% csrf_token %}
<input type="submit" value="Unlink"/>
</form>
- {% endifnotequal %}
+ {% endif %}
</td>
<td>
{% if email.is_optout %}