{% extends "agenda_culturel/page-admin.html" %}

{% load utils_extra %}
{% block title %}{% block og_title %}Derniers événements{% endblock %}{% endblock %}

{% load cat_extra %}
{% block entete_header %}
    {% css_categories %}
{% endblock %}

{% block sidemenu-bouton %}
    <li><a href="#contenu-principal" aria-label="Aller au contenu">{% picto_from_name "chevron-up" %}</a></li>
    <li><a href="#sidebar" aria-label="Aller au menu latéral">{% picto_from_name "chevron-down" %}</a></li>
{% endblock %}


{% block content %}
<div class="grid two-columns">
<article id="contenu-principal">
    <header>
        <div class="slide-buttons">
            <a href="{% url 'moderate' %}" role="button">Modérer {% picto_from_name "check-square" %}</a>
        </div>

        <h1>Derniers événements</h1>

        <form method="get" class="form django-form recent moderation-events">
                        {{ filter.form.as_div }}<br />
                        <button type="submit">Filtrer</button><br />
        </form>
        {% if filter.form.import_sources.value %}
        <div class="slide-buttons">
            <a href="{% url 'view_rimport' filter.form.import_sources.value %}" role="button">Voir l'import récurrent {% picto_from_name "chevron-right" %}</a>
        </div>
        <div style="clear: both"></div>
        {% endif %}

        {% include 'agenda_culturel/paginator_filter.html' %}
    </header>

    <div>
{% for obj in paginator_filter %}
    {% include "agenda_culturel/single-event/event-in-flat-list-inc.html" with event=obj %}
{% endfor %}
    </div>
<footer>
    {% include 'agenda_culturel/paginator_filter.html' %}
</footer>
</article>

{% include "agenda_culturel/side-nav.html" with current="recent" %}
</div>

{% endblock %}