<commit_before>{#
 * Copyright (C) 2019 Xibo Signage Ltd
 *
 * Xibo - Digital Signage - http://www.xibo.org.uk
 *
 * This file is part of Xibo.
 *
 * Xibo is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * Xibo is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Xibo.  If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "authed.twig" %}
{% import "forms.twig" as forms %}

{% block pageContent %}

    <div class="row">
        <div class="col-lg-6">
           {# Playlist selection #}
            {% set attributes = [
                { name: "data-placeholder--id", value: null },
                { name: "data-placeholder--value", value: "" },
                { name: "data-search-url", value:  urlFor("playlistdashboard.search") },
                { name: "data-search-term", value: "name" },
                { name: "data-id-property", value: "playlistId" },
                { name: "data-text-property", value: "name" }
            ] %}

            {% set title %}{% trans "Playlist" %}{% endset %}
            {% set helpText %}{% trans "Please select a Playlist to manage" %}{% endset %}
            {{ forms.dropdown("playlistId", "single", title, "", [playlist], "playlistId", "name", helpText, "playlist-control pagedSelect", "", "", "", attributes) }}

        </div>
    </div>
    <div class="row">
        <div class="col-lg-6">
            <div id="spots">

            </div>
        </div>
        <div class="col-lg-6">
            <div class="well">
                <h3>{% trans "Playlist Content" %}</h3>
                <p>Fill empty Spots by clicking on ‘Add’ to select the media file you wish to use.</p>

                <p>Replace existing media files by clicking on a Spot and select the new media file you wish to use.</p>

                <p>{{ libraryUpload.maxSizeMessage }}</p>
            </div>
        </div>
    </div>

{% endblock %}

{% block javaScript %}
    {# Add common file #}
    {% include "common.twig" %}
    <script src="{{ theme.rootUri() }}dist/playlistEditor.bundle.min.js"></script>
    <script type="text/javascript">
        // Define some global variables to keep hold of
        let template;
        let uploadUrl;

        $(document).ready(function() {

            // We need to have the URL of hte upload form available
            uploadUrl = "{{ urlFor("playlistdashboard.library.add") }}";

            // Bind our buttons on the dashboard
            // Listen to the playlist selector change
            $("div.playlist-control select").on("change", function() {
                loadPlaylistIntoSpotEditor($(this).val());
            });

            // Upload server status check for browsers with CORS support:
            if ($.support.cors) {
                $.ajax({<commit_msg>Playlist Dashboard User should not view Reshow Welcome resolves xibosignage/xibo#2045<commit_after>{#
 * Copyright (C) 2019 Xibo Signage Ltd
 *
 * Xibo - Digital Signage - http://www.xibo.org.uk
 *
 * This file is part of Xibo.
 *
 * Xibo is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * Xibo is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Xibo.  If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "authed.twig" %}
{% import "forms.twig" as forms %}

{% block pageContent %}

    <div class="row">
        <div class="col-lg-6">
           {# Playlist selection #}
            {% set attributes = [
                { name: "data-placeholder--id", value: null },
                { name: "data-placeholder--value", value: "" },
                { name: "data-search-url", value:  urlFor("playlistdashboard.search") },
                { name: "data-search-term", value: "name" },
                { name: "data-id-property", value: "playlistId" },
                { name: "data-text-property", value: "name" }
            ] %}

            {% set title %}{% trans "Playlist" %}{% endset %}
            {% set helpText %}{% trans "Please select a Playlist to manage" %}{% endset %}
            {{ forms.dropdown("playlistId", "single", title, "", [playlist], "playlistId", "name", helpText, "playlist-control pagedSelect", "", "", "", attributes) }}

        </div>
    </div>
    <div class="row">
        <div class="col-lg-6">
            <div id="spots">

            </div>
        </div>
        <div class="col-lg-6">
            <div class="well">
                <h3>{% trans "Playlist Content" %}</h3>
                <p>Fill empty Spots by clicking on ‘Add’ to select the media file you wish to use.</p>

                <p>Replace existing media files by clicking on a Spot and select the new media file you wish to use.</p>

                <p>{{ libraryUpload.maxSizeMessage }}</p>
            </div>
        </div>
    </div>

{% endblock %}

{% block javaScript %}
    {# Add common file #}
    {% include "common.twig" %}
    <script src="{{ theme.rootUri() }}dist/playlistEditor.bundle.min.js"></script>
    <script type="text/javascript">
        // Define some global variables to keep hold of
        let template;
        let uploadUrl;

        $(document).ready(function() {

            // Hide reshow welcome on this page
            $('#reshowWelcomeMenuItem').parent().remove();

            // We need to have the URL of hte upload form available
            uploadUrl = "{{ urlFor("playlistdashboard.library.add") }}";

            // Bind our buttons on the dashboard
            // Listen to the playlist selector change
            $("div.playlist-control select").on("change", function() {
                loadPlaylistIntoSpotEditor($(this).val());
            });

            // Upload server status check for browsers with CORS support:
            if ($.support.cors) {
                $.ajax({
{'fraction_non_alphanumeric': 0.13584164400120882, 'fraction_numerical': 0.003626473254759746, 'mean_word_length': 2.1549094375595805, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7532210', 'n_tokens_mistral': 1920, 'n_tokens_neox': 1802, 'n_words': 625}