Skip to content

Commit fe68d6b

Browse files
authored
Merge pull request #1834 from MTG/remove-ifequal
Remove ifequal templatetag, removed in django 4
2 parents 7fa5f2f + a6e3d70 commit fe68d6b

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

templates/accounts/attribution.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
{% regroup page.object_list by created|date:"F jS, Y" as downloads %}
2222

23-
{% ifequal format "regular" %}
23+
{% if format == "regular" %}
2424
{% for group in downloads %}
2525
<h4 class="v-spacing-top-4">Downloaded on {{group.grouper}}</h4>
2626
<ul>
@@ -35,9 +35,9 @@ <h4 class="v-spacing-top-4">Downloaded on {{group.grouper}}</h4>
3535
{% endfor %}
3636
</ul>
3737
{% endfor %}
38-
{% endifequal %}
38+
{% endif %}
3939

40-
{% ifequal format "html" %}
40+
{% if format == "html" %}
4141
<p>
4242
{% for group in downloads %}
4343
{% filter force_escape %}<h4>Downloaded on {{group.grouper}}</h4>{% endfilter %}<br />
@@ -56,9 +56,9 @@ <h4 class="v-spacing-top-4">Downloaded on {{group.grouper}}</h4>
5656
{% filter force_escape %}</ul>{% endfilter %}<br />
5757
{% endfor %}
5858
</p>
59-
{% endifequal %}
59+
{% endif %}
6060

61-
{% ifequal format "plaintext" %}
61+
{% if format == "plaintext" %}
6262
<p>
6363
{% for group in downloads %}
6464
Downloaded on {{group.grouper}}<br />
@@ -74,7 +74,7 @@ <h4 class="v-spacing-top-4">Downloaded on {{group.grouper}}</h4>
7474
{% endfor %}
7575
{% endfor %}
7676
</p>
77-
{% endifequal %}
77+
{% endif %}
7878

7979
</div>
8080

templates/accounts/upload.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h5>Moderation</h5>
3333
<div class="col-md-6 col-lg-3">
3434
<div class="padding-right-2">
3535
<h5>Formats</h5>
36-
<p>We prefer {% for ext in lossless_file_extensions %}<strong>{{ ext }}</strong>{% if not forloop.last %}{% ifequal forloop.revcounter 2 %} and {% else %}, {% endifequal %}{% else %}{% endif %}{% endfor %}, but we support {% for ext in lossy_file_extensions %}<strong>{{ ext }}</strong>{% if not forloop.last %}{% ifequal forloop.revcounter 2 %} and {% else %}, {% endifequal %}{% else %}{% endif %}{% endfor %} too. For very large files, please use some compressed format.</p>
36+
<p>We prefer {% for ext in lossless_file_extensions %}<strong>{{ ext }}</strong>{% if not forloop.last %}{% if forloop.revcounter == 2 %} and {% else %}, {% endif %}{% else %}{% endif %}{% endfor %}, but we support {% for ext in lossy_file_extensions %}<strong>{{ ext }}</strong>{% if not forloop.last %}{% if forloop.revcounter == 2 %} and {% else %}, {% endif %}{% else %}{% endif %}{% endfor %} too. For very large files, please use some compressed format.</p>
3737
</div>
3838
</div>
3939
</div>
@@ -46,7 +46,7 @@ <h5>Formats</h5>
4646

4747
<div id="drag-tip">
4848
<h1 class="text-light-grey">Drag files here...</h1>
49-
<p>...or click on 'Add files' (valid file extensions: {% for ext in all_file_extensions %}<strong>{{ ext }}</strong>{% if not forloop.last %}{% ifequal forloop.revcounter 2 %} and {% else %}, {% endifequal %}{% else %}{% endif %}{% endfor %}).</p>
49+
<p>...or click on 'Add files' (valid file extensions: {% for ext in all_file_extensions %}<strong>{{ ext }}</strong>{% if not forloop.last %}{% if forloop.revcounter == 2 %} and {% else %}, {% endif %}{% else %}{% endif %}{% endfor %}).</p>
5050
</div>
5151
<ul id="file-list" class="file-list"></ul>
5252
<div class="progress-container h-spacing-2" id="progress-container"></div>

templates/moderation/assign_sounds.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ <h3>Unassigned sound tickets ({{ num_sounds_pending }})</h3>
1414
<div class="v-spacing-top-4 v-spacing-2">
1515
<span class="text-light-grey"><b>Sort by:</b></span>
1616
<select id="sort-by" name="order" onchange="this.form.submit()">
17-
<option value="days" {% ifequal order "" %}selected{% endifequal %}>Days in queue</option>
18-
<option value="username" {% ifequal order "username" %}selected{% endifequal %}>Username</option>
19-
<option value="new_count" {% ifequal order "new_count" %}selected{% endifequal %}>Sounds in queue</option>
20-
<option value="num_uploaded_sounds" {% ifequal order "num_uploaded_sounds" %}selected{% endifequal %}>Uploaded sounds</option>
17+
<option value="days" {% if order == "" %}selected{% endif %}>Days in queue</option>
18+
<option value="username" {% if order == "username" %}selected{% endif %}>Username</option>
19+
<option value="new_count" {% if order == "new_count" %}selected{% endif %}>Sounds in queue</option>
20+
<option value="num_uploaded_sounds" {% if order == "num_uploaded_sounds" %}selected{% endif %}>Uploaded sounds</option>
2121
</select>
2222
</div>
2323
</form>

templates/molecules/paginator.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
{% endif %}
1414

1515
{% for num in page_numbers %}
16-
{% ifequal num current_page %}
16+
{% if num == current_page %}
1717
<li class="bw-pagination_circle bw-pagination_selected"><a class="text-white" href="{{ url }}{{ num }}{% if anchor %}#{{anchor}}{% endif %}" title="Page {{ num }}">{{ num }}</a></li>
1818
{% else %}
1919
<li><a href="{{ url }}{{ num }}{% if anchor %}#{{anchor}}{% endif %}" title="Page {{ num }}">{{ num }}</a></li>
20-
{% endifequal %}
20+
{% endif %}
2121
{% endfor %}
2222

2323
{% if show_last %}

templates/search/facet.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% if facet and facet|length > 1%}
33
<div class="bw-search__filter-section">
44
<div class="bw-search__filter-section-name caps text-light-grey between"><span>{{ title }}</span></div>
5-
{% ifequal type "list" %}
5+
{% if type == "list" %}
66
<ul class="bw-search__filter-value-list">
77
{% for f in facet %}
88
<li class="bw-search__filter-value padding-bottom-1">
@@ -13,8 +13,8 @@
1313
</li>
1414
{% endfor %}
1515
</ul>
16-
{% endifequal %}
17-
{% ifequal type "range" %}
16+
{% endif %}
17+
{% if type == "range" %}
1818
<ul class="bw-search__filter-value-list">
1919
{% for f in facet %}
2020
<li class="bw-search__filter-value padding-bottom-1">
@@ -25,13 +25,13 @@
2525
</li>
2626
{% endfor %}
2727
</ul>
28-
{% endifequal %}
29-
{% ifequal type "cloud" %}
28+
{% endif %}
29+
{% if type == "cloud" %}
3030
<div class="bw-search__filter-tags-list">
3131
{% for f in facet %}
3232
{% bw_tag f.display_value 1 '' f.add_filter_url f.weight %}
3333
{% endfor %}
3434
</div>
35-
{% endifequal %}
35+
{% endif %}
3636
</div>
3737
{% endif %}

0 commit comments

Comments
 (0)