]> git.parisson.com Git - mezzo.git/commitdiff
[Event] : add archives
authorEmilie <zawadzki@ircam.fr>
Mon, 13 Feb 2017 11:00:16 +0000 (12:00 +0100)
committerEmilie <zawadzki@ircam.fr>
Mon, 13 Feb 2017 11:00:16 +0000 (12:00 +0100)
app/templates/agenda/event_list.html

index 0e699732b9edb243b2b5f63bb00d6ce9c7f3b23c..86a1923f1ceda01f6f797996077b10c50d94d996 100644 (file)
                     <h1 class="section-title section-title--uppercase section-title--main">{% trans "Events" %}</h1>
                 </div>
             </div>
-
             <div class="row">
-
+                {% now "c" as todays_date %}
                 <div class="mb2 col-md-12 col-md-push-2 page__content" data-summary-content>
                     <div class="page__content">
                         <div class="container">
                             {% for event in events.object_list %}
-                                {% include 'agenda/includes/event_linecard.html' %}
+                                {% if event.start|date:"c" > todays_date %}
+                                    {% include 'agenda/includes/event_linecard.html' %}
+                                {% else %}
+                                    <h2>{% trans "Past Events" %}</h2>
+                                    {% include 'agenda/includes/event_linecard.html' %}
+                                {% endif %}
                             {% endfor %}
                         </div>
                     </div>