Skip to content

Commit

Permalink
Replace deprecated {% ifequal %} and {% ifnotequal %} with {% if %}
Browse files Browse the repository at this point in the history
  • Loading branch information
jdufresne committed May 5, 2020
1 parent 62fe124 commit f240c7c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions schedule/templates/profiles/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ <h2>{% trans "Schedule" %}</h2>
<a href="{% url "event" event.pk %}" title="{% trans "Event details" %} {{ event }}">
<img src="{{ settings.MEDIA_URL }}icons/time_go.png" alt="{% trans "Event details" %}">
</a>
{% ifequal request.user other_user %}
{% if request.user == other_user %}
<a href="{% url "edit_event" calendar.slug event.pk %}" title="{% trans "Edit event" %} {{ event }}">
<img src="{{ settings.MEDIA_URL }}icons/time_edit.png" alt="{% trans "Edit event" %}">
</a>
<a href="{% url "delete_event" event.pk %}" title="{% trans "Delete event" %} {{ event }}">
<img src="{{ settings.MEDIA_URL }}icons/time_delete.png" alt="{% trans "Delete event" %}">
</a>
{% endifequal %}
{% endif %}
{% endblock schedule_event_controls %}
</td>
</tr>
Expand Down
8 changes: 4 additions & 4 deletions schedule/templates/schedule/_day_cell.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load scheduletags %}
{% ifnotequal day.start.month month.start.month %}
{% if day.start.month != month.start.month %}
<td class="muted"></td>
{% else %}
{% if day.has_occurrences %}
Expand All @@ -10,8 +10,8 @@
<a href="{% url "day_calendar" calendar.slug %}{% querystring_for_date day.start 3 %}">
<strong>{{day.start.day}}</strong>
</a>
{% ifnotequal size "small" %}
{% if size != "small" %}
{% include "schedule/_day_cell_big.html" %}
{% endifnotequal %}
{% endif %}
</td>
{% endifnotequal %}
{% endif %}
8 changes: 4 additions & 4 deletions schedule/templates/schedule/_day_cell_big.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#occurrenceModal">

<div class="starttime">
{% ifequal o.class 0 %}{{ o.occurrence.start|time:"G:i" }}{% endifequal %}
{% ifequal o.class 1 %}{{ o.occurrence.start|time:"G:i" }}{% endifequal %}
{% ifequal o.class 2 %}(All day){% endifequal %}
{% ifequal o.class 3 %}Ends at {{ o.occurrence.end|time:"G:i" }}{% endifequal %}
{% if o.class == 0 %}{{ o.occurrence.start|time:"G:i" }}{% endif %}
{% if o.class == 1 %}{{ o.occurrence.start|time:"G:i" }}{% endif %}
{% if o.class == 2 %}(All day){% endif %}
{% if o.class == 3 %}Ends at {{ o.occurrence.end|time:"G:i" }}{% endif %}
</div>
<div class="eventdesc">
{% title o.occurrence %}
Expand Down

0 comments on commit f240c7c

Please sign in to comment.