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

{% block subtitle %}
<span class="icon">
    <i class="fa fa-user"></i>
</span>
{{ block.super }}
{% if user.is_superuser %}
    &mdash; {% translate "administrator" %}
{% endif %}
{% endblock %}


{% block content-container %}
<section class="container grid-2 gap-4">
    <div>
        <h2 class="title is-2 mb-3">{% translate "Next diffusions" %}</h2>
        <div class="box box-shadow p-3" style="max-height: 35rem; overflow-y:auto;">
            {% for object in next_diffs|slice:"0:25" %}
            {% page_widget "item" object.episode diffusion=object timetable=True admin=True is_tiny=True %}
            {% empty %}
            <div>{% translate "No diffusion to display" %}</div>
            {% endfor %}
        </div>
    </div>

    <div>
        <h2 class="title is-2 mb-3">{% translate "Programs" %}</h2>
        <div class="box box-shadow p-3" style="max-height: 35rem; overflow-y:auto;">
            {% for object in programs %}
            {% page_widget "item" object admin=True is_tiny=True %}
            {% empty %}
            <div>{% translate "No program to display" %}</div>
            {% endfor %}
        </div>
    </div>

    {% if comments %}
    <div>
        <h2 class="title is-2 mb-3">{% translate "Last Comments" %}</h2>
        <div class="box box-shadow p-3" style="max-height: 35rem; overflow-y:auto;">
            {% for object in comments|slice:"0:25" %}
            {% page_widget "item" object admin=True is_tiny=True %}
            {% endfor %}
       </div>
    </div>
    {% endif %}

</section>
{% endblock %}
