{% extends "aldryn_events/plugins/upcoming/base.html" %}
{% load i18n %}

{% block plugin %}
<div class="plugin plugin-events">
    {% if plugin_configuration_error %}
        {% if request.user.is_staff or request.user.is_superuser %}
            <p class="config-errors">{{ plugin_configuration_error }}</p>
        {% endif %}
    {% else %}
        <ul class="events-upcoming">
            {% if instance.past_events %}{% trans "Past events" %}{% else %}{% trans "Upcoming events" %}{% endif %}
            {% for event in events %}
                <li>
                    <p>
                        <a href="{{ event.get_absolute_url }}">{{ event.get_title }}</a> <span class="date">{{ event.start }}</span>
                    </p>
                </li>
            {% empty %}
                <li><p>{% trans "No upcoming events." %}</p></li>
            {% endfor %}
        </ul>
    {% endif %}
</div>
{% endblock plugin %}
