{% extends "common/base.html" %}
{% load i18n %}

{% block title %}{% trans "Events" %}{% endblock %}

{% block content %}
    {% if current_events or future_events or past_events %}
    <h1>{% trans "Events" %}</h1>
    {% endif %}
    {% if current_events %}
    <ul>
        {% for event in current_events %}
            <li><a href="{{ event.urls.base }}">
                {{ event.name }}
                ({{ event.get_date_range_display }})
            </a></li>
        {% endfor %}
    </ul>
    {% else %}
    <p>{% trans "No events are currently ongoing." %}</p>
    {% endif %}
    {% if future_events %}
    <h2>{% trans "Upcoming events" %}</h2>
    <ul>
        {% for event in future_events %}
            <li><a href="{{ event.urls.base }}">
                {{ event.name }}
                ({{ event.get_date_range_display }})
            </a></li>
        {% endfor %}
    </ul>
    {% endif %}
    {% if past_events %}
    <h2>{% trans "Past events" %}</h2>
    <ul>
        {% for event in past_events %}
            <li><a href="{{ event.urls.base }}">
                {{ event.name }}
                ({{ event.get_date_range_display }})
            </a></li>
        {% endfor %}
    </ul>
    {% endif %}
{% endblock %}
