{% extends "agenda/base.html" %}
{% load compress %}
{% load i18n %}
{% load static %}

{% block body_tag %}{% if not request.event.settings.schedule_display or request.event.settings.schedule_display == "proportional" %} class="body-schedule"{% endif %}{% endblock %}

{% block container_width %}{% if not show_talk_list %} main-schedule{% endif %}{% endblock %}

{% block agenda_custom_header %}
    {% compress js %}
        <script src="{% static 'common/js/tabbed.js' %}"></script>
    {% endcompress %}
{% endblock %}

{% block agenda_content %}
    <div id="fahrplan" class="{% if show_talk_list %}list{% else %}grid{% endif %}">
        {% if schedule != schedule.event.current_schedule %}
            <div class="alert alert-warning m-3"><span>
                {% if not schedule.version %}
                    {% translate "You are currently viewing the editable schedule version, which is unreleased and may change at any time." %}
                {% else %}
                    {% blocktranslate trimmed with current_url=schedule.event.urls.schedule %}
                        You are currently viewing an older schedule version.
                    {% endblocktranslate %}
                {% endif %}
                {% if request.event.current_schedule %}
                    {% blocktranslate trimmed with current_url=schedule.event.urls.schedule %}
                        You can find the current version <a href="{{ current_url }}">here</a>.
                    {% endblocktranslate %}
                {% endif %}
            </span></div>
        {% endif %}

        {% include "agenda/header_row.html" with with_margin=True with_extra=True %}

        <script type="text/javascript" src="{{ request.event.urls.schedule }}widget/v2.{{ request.event.locale|slice:":2" }}.js" async></script>

        <pretalx-schedule
            event-url="{{ request.event.urls.base }}"
            version="{{ schedule.version|default:'wip'|urlencode }}"
            locale="{{ request.LANGUAGE_CODE }}"
            timezone="{{ request.event.timezone }}"
            {% if show_talk_list %}format="list"{% endif %}
            style="--pretalx-clr-primary: {{ request.event.primary_color|default:'#3aa57c' }}"
        ></pretalx-schedule>
        <noscript>
            <div class="alert alert-info m-4">
                <div></div>
                <div>
                    {% blocktranslate trimmed with href=request.event.urls.schedule_nojs %}
                        To see our schedule, please either enable JavaScript or go <a href="{{ href }}">here</a> for our NoJS schedule.
                    {% endblocktranslate %}
                </div>
            </div>
        </noscript>
    </div>

{% endblock %}
