Skip to content

Commit 4198812

Browse files
committed
Set Up Templates For Querying Start And End Years
Passed variables to the time_tag template [time_tag.html] that checks if an event was scheduled to start or end with the current year.
1 parent 1502c10 commit 4198812

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

templates/events/event_list.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ <h2 class="widget-title"><span aria-hidden="true" class="icon-calendar"></span>U
4545
<h3 class="event-title"><a href="{{ object.get_absolute_url }}">{{ object.title|striptags }}</a></h3>
4646
<p>
4747
{% with object.next_time as next_time %}
48+
{% with object.is_scheduled_to_start_this_year as scheduled_start_this_year %}
49+
{% with object.is_scheduled_to_end_this_year as scheduled_end_this_year %}
4850
{% include "events/includes/time_tag.html" %}
4951
{% endwith %}
52+
{% endwith %}
53+
{% endwith %}
5054

5155
{% if object.venue %}
5256
<span class="event-location">{% if object.venue.url %}<a href="{{ object.venue.url }}">{% endif %}{{ object.venue.name }}{% if object.venue.url %}</a>{% endif %}{% if object.venue.address %}, {{ object.venue.address }}{% endif %}</span>
@@ -65,8 +69,12 @@ <h3 class="widget-title just-missed">You just missed...</h3>
6569
<h3 class="event-title"><a href="{{ object.get_absolute_url }}">{{ object.title|striptags }}</a></h3>
6670
<p>
6771
{% with object.previous_time as next_time %}
72+
{% with object.is_scheduled_to_start_this_year as scheduled_start_this_year %}
73+
{% with object.is_scheduled_to_end_this_year as scheduled_end_this_year %}
6874
{% include "events/includes/time_tag.html" %}
6975
{% endwith %}
76+
{% endwith %}
77+
{% endwith %}
7078

7179
{% if object.venue %}
7280
<span class="event-location">{% if object.venue.url %}<a href="{{ object.venue.url }}">{% endif %}{{ object.venue.name }}{% if object.venue.url %}</a>{% endif %}{% if object.venue.address %}, {{ object.venue.address }}{% endif %}</span>

0 commit comments

Comments
 (0)