{% extends 'events/management/base.html' %}

{% from 'events/tracks/_track_list.html' import render_list %}

{% block title %}
    {%- trans %}Program{% endtrans -%}
{% endblock %}

{% block description %}
    {%- trans -%}
        Tracks represent the subject matter of the conference.
        They represent both the basis for the Scientific Program and a taxonomy that can be used to classify
        submissions during the Call for Abstracts process.
    {%- endtrans -%}
{% endblock %}

{% block content %}
    <div class="action-box">
        <div class="section">
            <div class="icon icon-file-text"></div>
            <div class="text">
                <div class="label">
                    {% trans %}Program{% endtrans %}
                </div>
                {% trans -%}Configure the conference page displaying the scientific program.{%- endtrans %}
            </div>
            <div class="toolbar">
                <div class="group">
                    <button class="i-button icon-settings"
                            data-href="{{ url_for('.edit_program', event) }}"
                            data-title="{% trans %}Configure program{% endtrans %}"
                            data-qtip-position="right"
                            data-reload-after
                            data-ajax-dialog>
                        {% trans %}Configure{% endtrans %}
                    </button>
                </div>
            </div>
        </div>
    </div>

    <div class="flexrow f-a-center">
        <h3 class="f-self-stretch">{% trans %}List of tracks and track groups{% endtrans %}</h3>
        <a href=""
           class="i-button highlight icon-plus hide-if-locked"
           data-href="{{ url_for('.create_track_group', event) }}"
           data-title="{% trans %}Add new track group{% endtrans %}"
           data-update="#track-list-container"
           data-ajax-dialog>
            {%- trans %}Add track group{% endtrans -%}
        </a>
        <a href=""
           class="i-button highlight icon-plus hide-if-locked"
           data-href="{{ url_for('.create_track', event) }}"
           data-title="{% trans %}Add new track{% endtrans %}"
           data-update="#track-list-container"
           data-ajax-dialog>
            {%- trans %}Add track{% endtrans -%}
        </a>
    </div>

    <div id="track-list-container" data-url="{{ url_for('.sort_tracks', event) }}">
        {{ render_list(event, list_items) }}
    </div>
    <script>
        setupTrackManagement();
    </script>
{% endblock %}
