{% extends "aircox/page_list.html" %}
{% comment %}List of diffusions as a timetable{% endcomment %}
{% load i18n aircox humanize %}

{% block title %}
{% if not page or not page.title %}
{% with station.name as station %}
{% blocktrans %}This week on {{ station }}{% endblocktrans %}
{% endwith %}
{% else %}
{{ block.super }}
{% endif %}
{% endblock %}

{% block subtitle %}{{ date|date:"l d F Y" }}{% endblock %}

{% block before_list %}
{% with "diffusion-list" as url_name %}
{% include "aircox/widgets/dates_menu.html" %}
{% endwith %}
{% endblock %}

{% block pages_list %}
{% with hide_schedule=True %}
<section role="list">
    <div id="timetable-{{ date|date:"Y-m-d" }}">
        {% for diffusion in object_list %}
        <div class="columns {% if diffusion.is_now %}has-background-primary{% endif %}">
            <div class="column is-one-fifth has-text-right">
                <time datetime="{{ diffusion.start|date:"c" }}">
                {{ diffusion.start|date:"H:i" }} - {{ diffusion.end|date:"H:i" }}
                </time>
            </div>
            <div class="column">
                {% with diffusion.episode as object %}
                {% include "aircox/widgets/episode_item.html" %}
                {% endwith %}
            </div>
        </div>
        {% endfor %}
    </div>
</section>
{% endwith %}
{% endblock %}

