Remove deprecated ifequal and ifnotequal tags

These have been replaced by `{% if x == y %}` type tags.
This commit is contained in:
Ben Sturmfels 2024-03-19 21:54:26 +11:00
parent c80ed09d70
commit 0b9ab6970c
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0
4 changed files with 12 additions and 12 deletions

View file

@ -12,7 +12,7 @@
{% if tags %} {% if tags %}
<p>Displaying casts <p>Displaying casts
tagged {% for tag in tags %}{% if not forloop.last %}{% if not forloop.first %}, {% endif %}{% endif %}<a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% ifequal forloop.revcounter 2 %} or {% endifequal %}{% endfor %} tagged {% for tag in tags %}{% if not forloop.last %}{% if not forloop.first %}, {% endif %}{% endif %}<a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% if forloop.revcounter == 2 %} or {% endif %}{% endfor %}
</p> </p>
{% endif %} {% endif %}

View file

@ -12,8 +12,8 @@
{% if authors or tags %} {% if authors or tags %}
<p>Displaying posts <p>Displaying posts
{% if authors %}by {% for author in authors %}{% if not forloop.last %}{% if not forloop.first %}, {% endif %}{% endif %}<a href="{{ author.biography_url }}">{{ author.formal_name }}</a>{% ifequal forloop.revcounter 2 %} and {% endifequal %}{% endfor %}{% endif %} {% if authors %}by {% for author in authors %}{% if not forloop.last %}{% if not forloop.first %}, {% endif %}{% endif %}<a href="{{ author.biography_url }}">{{ author.formal_name }}</a>{% if forloop.revcounter == 2 %} and {% endif %}{% endfor %}{% endif %}
{% if tags %}tagged {% for tag in tags %}{% if not forloop.last %}{% if not forloop.first %}, {% endif %}{% endif %}<a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% ifequal forloop.revcounter 2 %} or {% endifequal %}{% endfor %}{% endif %} {% if tags %}tagged {% for tag in tags %}{% if not forloop.last %}{% if not forloop.first %}, {% endif %}{% endif %}<a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% if forloop.revcounter == 2 %} or {% endif %}{% endfor %}{% endif %}
</p> </p>
{% endif %} {% endif %}
@ -25,7 +25,7 @@
{% if blog_entries.has_next %}<a class="next_page_button" href="?page={{ blog_entries.next_page_number }}{% if query_string %}&amp;{{ query_string|escape }}{% endif %}">Next page (older) &raquo;</a>{% endif %} {% if blog_entries.has_next %}<a class="next_page_button" href="?page={{ blog_entries.next_page_number }}{% if query_string %}&amp;{{ query_string|escape }}{% endif %}">Next page (older) &raquo;</a>{% endif %}
{% if blog_entries.has_previous %}<a href="?page={{ blog_entries.previous_page_number }}{% if query_string %}&amp;{{ query_string|escape }}{% endif %}">&laquo; Previous page (newer)</a>{% endif %} {% if blog_entries.has_previous %}<a href="?page={{ blog_entries.previous_page_number }}{% if query_string %}&amp;{{ query_string|escape }}{% endif %}">&laquo; Previous page (newer)</a>{% endif %}
</p> </p>
{% if blog_entries.paginator.num_pages > 1 %}<p class="pagination_list"> {% for pagenum in blog_entries.paginator.page_range %}{% ifequal pagenum blog_entries.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}</p>{% endif %} {% if blog_entries.paginator.num_pages > 1 %}<p class="pagination_list"> {% for pagenum in blog_entries.paginator.page_range %}{% if pagenum == blog_entries.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endif %} {% endfor %}</p>{% endif %}
<div class="clear"></div> <div class="clear"></div>
{% endblock %} {% endblock %}

View file

@ -1,10 +1,10 @@
{% ifequal obj.omnibus_type "news" %} {% if obj.omnibus_type == "news" %}
<p><i>A <a href="https://{{ site }}/news/">news item</a> from Software Freedom Conservancy.</i></p> <p><i>A <a href="https://{{ site }}/news/">news item</a> from Software Freedom Conservancy.</i></p>
{% endifequal %} {% endif %}
{% ifequal obj.omnibus_type "event" %} {% if obj.omnibus_type == "event" %}
<p><i>An <a href="https://{{ site }}/events/">upcoming event</a> related to the Software Freedom Conservancy.</i></p> <p><i>An <a href="https://{{ site }}/events/">upcoming event</a> related to the Software Freedom Conservancy.</i></p>
{% endifequal %} {% endif %}
{% ifequal obj.omnibus_type "blog" %} {% if obj.omnibus_type == "blog" %}
<p><i>A <a href="https://{{ site }}/blog/">blog post</a> from Software Freedom Conservancy.</i></p> <p><i>A <a href="https://{{ site }}/blog/">blog post</a> from Software Freedom Conservancy.</i></p>
{% endifequal %} {% endif %}
{% include obj.omnibus_feed_description_template %} {% include obj.omnibus_feed_description_template %}

View file

@ -12,7 +12,7 @@
<h1><a href="/feeds/news/" class="feedlink"><img src="{% static 'img/feed-icon-14x14.png' %}" alt="[RSS]"/></a> Conservancy News</h1> <h1><a href="/feeds/news/" class="feedlink"><img src="{% static 'img/feed-icon-14x14.png' %}" alt="[RSS]"/></a> Conservancy News</h1>
{% ifnotequal news.number 1 %}<p>(Page {{ news.number }} of {{ news.paginator.num_pages }})</p>{% endifnotequal %} {% if news.number > 1 %}<p>(Page {{ news.number }} of {{ news.paginator.num_pages }})</p>{% endif %}
{% for pressr in news %} {% for pressr in news %}
{% if forloop.first %} {% if forloop.first %}
@ -26,7 +26,7 @@
{% if news.has_next %}<a class="next_page_button" href="?page={{ news.next_page_number }}">Next page (older) &raquo;</a>{% endif %} {% if news.has_next %}<a class="next_page_button" href="?page={{ news.next_page_number }}">Next page (older) &raquo;</a>{% endif %}
{% if news.has_previous %}<a href="?page={{ news.previous_page_number }}">&laquo; Previous page (newer)</a>{% endif %} {% if news.has_previous %}<a href="?page={{ news.previous_page_number }}">&laquo; Previous page (newer)</a>{% endif %}
</p> </p>
{% if news.paginator.num_pages > 1 %}<p class="pagination_list"> {% for pagenum in news.paginator.page_range %}{% ifequal pagenum news.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}</p>{% endif %} {% if news.paginator.num_pages > 1 %}<p class="pagination_list"> {% for pagenum in news.paginator.page_range %}{% if pagenum == news.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endif %} {% endfor %}</p>{% endif %}
</div> </div>
<div id="sidebar" class="{% block submenuselection %}{% endblock %}"> <div id="sidebar" class="{% block submenuselection %}{% endblock %}">