{% extends 'base.jinja.html' %}

{% block page_title %}
    {{ l.playlist_page_title }}
{% endblock %}

{% block add_css %}
    {{ HOOK(H_PLAYLIST_CSS) }}
{% endblock %}

{% block add_js %}
    <script src="{{ STATIC_PREFIX }}js/lib/tablednd-fixed.js"></script>
    <script src="{{ STATIC_PREFIX }}js/playlist/playlists.js"></script>
    {{ HOOK(H_PLAYLIST_JAVASCRIPT) }}
{% endblock %}

{% block page %}
    <div class="toolbar">
        <h2>{{ l.playlist_page_title }}</h2>

        <div class="toolbar-actions">
            {{ HOOK(H_PLAYLIST_TOOLBAR_ACTIONS_START) }}
            <button class="purple playlist-add item-add"><i class="fa fa-plus icon-left"></i>{{ l.playlist_button_add }}</button>
            {{ HOOK(H_PLAYLIST_TOOLBAR_ACTIONS_END) }}
        </div>
    </div>
    <div class="alert alert-error hidden">

    </div>
    <div class="panel">
        <div class="panel-body">
            <h3>{{ l.playlist_panel_active }}</h3>

            {% with tclass='active', playlists=enabled_playlists %}
                {% include 'playlist/component/table.jinja.html' %}
            {% endwith %}
        </div>
    </div>
    <div class="panel panel-inactive">
        <div class="panel-body">
            <h3>{{ l.playlist_panel_inactive }}</h3>

            {% with tclass='inactive', playlists=disabled_playlists %}
                {% include 'playlist/component/table.jinja.html' %}
            {% endwith %}
        </div>
    </div>


    <div class="modals hidden">
        <div class="modals-outer">
            <a href="javascript:void(0);" class="modal-close">
                <i class="fa fa-close"></i>
            </a>
            <div class="modals-inner">
                {% include 'playlist/modal/add.jinja.html' %}
                {% include 'playlist/modal/edit.jinja.html' %}
            </div>
        </div>
    </div>
{% endblock %}
