{% comment %}
Context:
- object_list: list of logs
- timetable: defaults to False
- widget: defaults to "item"
{% endcomment %}
{% load aircox %}

{% with timetable|default:False as timetable %}
{% with widget|default:"item" as widget %}
    {% for object in object_list %}
    {% if object.episode %}
        {% page_widget widget object.episode diffusion=object timetable=True %}
    {% elif object|is_log %}
        {% include "./track_item.html" with object=object.track log=object timetable=True %}
    {% else %}
        <div class="preview list-item logs">
            <header class="headings">
                <span class="heading title">
                    <span class="icon pr-2">
                        <i class="fas fa-music"></i>
                    </span>
                    {{ station.music_stream_title }}
                </span>
            </header>
            <div class="media d-block content">
            {% for obj in object %}
            {% include "./track_item.html" with object=obj.track log=obj timetable=True %}
            {% endfor %}
            </div>
        </div>
    {% endif %}
    {% endfor %}
{% endwith %}
{% endwith %}
