<commit_before>{% extends 'base.html.twig' %}

{# Title suffix of page #}
{% block title %} :: Zeitplan{% endblock %}

{% block body %}
    <div class="ui main container">
        <div class="page-header">
            <h1>{{ 'Schedule'|trans }}</h1>
        </div>

        <div id="sched-screen-list">
            {% for screen in screens %}
                <div class="item visible" data-guid="{{ screen.getGuid() }}">
                    <span title="Anzeigen/Ausblenden" class="selector" data-guid="{{ screen.getGuid() }}"></span>
                    <p title="Name: {{ screen.getName() }}" class="screen-name">{{ screen.getName() }}</p>
                    <p title="Ort: {{ screen.getLocation() }}" class="screen-loction">{{ screen.getLocation() }}</p>
                </div>
            {% endfor %}
        </div>

        <div id='calendar'></div>
    </div>


    <div class="dialog">
        <select name="screen" id="screen-prototype">
            {% for screen in screens %}
                <option value="{{ screen.getGuid() }}">{{ screen.getName() }}</option>
            {% endfor %}
        </select>
    </div>

    <div class="dialog">
        <select name="screen" id="screen-prototype">
            {% for screen in screens %}
                <option value="{{ screen.getGuid() }}">{{ screen.getName() }}</option>
            {% endfor %}
        </select>
        <select name="presentation" id="presentation-prototype">
            {% for instance in presentations %}
                {% for presentation in instance %}
                    <option value="{{ presentation.getId() }}">{{ presentation.getTitle() }}</option>
                {% endfor %}
            {% endfor %}
        </select>
    </div>

    <div id="diag-place" class="dialog">
        <form action="{{ path('management-add-scheduled') }}" method="post" class="form-horizontal">
        <p>
            <span class="label">{{ 'Presentation'|trans }}:</span>
            <span id="inp-pres" class="input"></span>
        </p>
        <p>
            <span class="label">{{ 'Screen'|trans }}:</span>
            <span id="inp-screen" class="input"></span>
        </p>
        <p>
            <span class="label">{{ 'StartTime'|trans }}:</span>
            <span class="input"><input id="date-start" name="start" class="date-pick" type="text"></span>
        </p>
        <p>
            <span class="label">{{ 'EndTime'|trans }}:</span>
            <span class="input"><input id="date-end" name="end" class="date-pick" type="text"></span>
        </p>
        </form>
    </div>

{% endblock %}

{# Styles for placement in <head> tag #}
{% block stylesheets %}
    <link rel="stylesheet" href="{{ asset('js/fullcalendar-3.1.0/fullcalendar.min.css') }}" media="all">
    <link rel="stylesheet" href="{{ asset('js/fullcalendar-3.1.0/fullcalendar.print.min.css') }}" media="print">

    <link rel="stylesheet" href="{{ asset('css/jquery.datetimepicker.css') }}">

    <link rel="stylesheet" type="text/css" href="{{ asset('js/jquery-ui/jquery-ui.min.css') }}">

    <style>
        #calendar {
            /*
            max-width: 900px;
            margin: 0 auto;
             */
            width:100%;
        }
    </style>
{% endblock %}

{# Scripts for placement at the end of <body> tag #}
{% block scripts %}
    <script>
        var uri_get_schedule = '{{ path('management-get-schedule') }}';
        var uri_add_scheduled = '{{ path('management-add-scheduled') }}';
        var uri_change_scheduled = '{{ path('management-change-scheduled') }}';
        var uri_delete_scheduled = '{{ path('management-delete-scheduled') }}';
    </script>
    {% javascripts
    '@moment' '@fullcalendar'
    '@AppBundle/Resources/public/js/scheduler.js'
    %}
    <script src="{{ asset_url }}"></script>
    <script src="{{ asset('js/jquery-ui/jquery-ui.min.js') }}"></script>

    <script src="{{ asset('js/jquery.datetimepicker.full.min.js') }}"></script>

    <script>
        var showCreateDialog = function(start, stop, success) {
            $('#diag-place').find('#date-start').val(start.format('DD-MM-YYYY HH:mm'));
            $('#diag-place').find('#date-end').val(stop.format('DD-MM-YYYY HH:mm'));
            $('#diag-place').dialog('option', 'successCallback', success);
            $('#diag-place').dialog('open');
        };
        $(document).ready(function(){
            $('#diag-place').dialog({
                resizable: false,
                height: "auto",
                width: 400,
                modal: true,
                autoOpen: false,
                buttons: {
                    "Speichern": function() {
                        var succ = $(this).dialog('option', 'successCallback');
                        var form = $(this).children('form');

                        ajaxLoadShow();
                        $.ajax({
                            type: "POST",
                            url: form.attr('action'),
                            data: form.serialize()
                        })
                            .fail(function(){
                                $.notify("Beim Eintragen ist leider ein Fehler aufgetreten.", "error");
                            })
                            .done(function(){
                                $.notify("Die Präsentation wurde eingetragen.", "success");
                                var cb = $('#diag-place').dialog('option', 'successCallback');
                                cb();
                            })
                            .always(function(){
                                ajaxLoadHide();
                            });

                        $(this).dialog("close");
                    },
                    Cancel: function() {
                        $(this).dialog("close");
                    }
                },
                open: function() {
                    var diag = $(this);
                    diag.find('#inp-screen').empty();
                    diag.find('#inp-screen').append($('#screen-prototype').clone());
                    diag.find('#inp-pres').empty();
                    diag.find('#inp-pres').append($('#presentation-prototype').clone());

                    diag.find('#inp-screen').children('select').val($(getSelectedScreen()).data('guid'));

                    $.datetimepicker.setLocale('de');
                    $(this).find(".date-pick").datetimepicker({
                        format: 'd.m.Y H:i'
                    });
                }
            });
        });
    </script>
    {% endjavascripts %}



{% endblock %}<commit_msg>make scheduler work without assetic<commit_after>{% extends 'base.html.twig' %}

{# Title suffix of page #}
{% block title %} :: Zeitplan{% endblock %}

{% block body %}
    <div class="ui main container">
        <div class="page-header">
            <h1>{{ 'Schedule'|trans }}</h1>
        </div>

        <div id="sched-screen-list">
            {% for screen in screens %}
                <div class="item visible" data-guid="{{ screen.getGuid() }}">
                    <span title="Anzeigen/Ausblenden" class="selector" data-guid="{{ screen.getGuid() }}"></span>
                    <p title="Name: {{ screen.getName() }}" class="screen-name">{{ screen.getName() }}</p>
                    <p title="Ort: {{ screen.getLocation() }}" class="screen-loction">{{ screen.getLocation() }}</p>
                </div>
            {% endfor %}
        </div>

        <div id='calendar'></div>
    </div>


    <div class="dialog">
        <select name="screen" id="screen-prototype">
            {% for screen in screens %}
                <option value="{{ screen.getGuid() }}">{{ screen.getName() }}</option>
            {% endfor %}
        </select>
    </div>

    <div class="dialog">
        <select name="screen" id="screen-prototype">
            {% for screen in screens %}
                <option value="{{ screen.getGuid() }}">{{ screen.getName() }}</option>
            {% endfor %}
        </select>
        <select name="presentation" id="presentation-prototype">
            {% for instance in presentations %}
                {% for presentation in instance %}
                    <option value="{{ presentation.getId() }}">{{ presentation.getTitle() }}</option>
                {% endfor %}
            {% endfor %}
        </select>
    </div>

    <div id="diag-place" class="dialog">
        <form action="{{ path('management-add-scheduled') }}" method="post" class="form-horizontal">
        <p>
            <span class="label">{{ 'Presentation'|trans }}:</span>
            <span id="inp-pres" class="input"></span>
        </p>
        <p>
            <span class="label">{{ 'Screen'|trans }}:</span>
            <span id="inp-screen" class="input"></span>
        </p>
        <p>
            <span class="label">{{ 'StartTime'|trans }}:</span>
            <span class="input"><input id="date-start" name="start" class="date-pick" type="text"></span>
        </p>
        <p>
            <span class="label">{{ 'EndTime'|trans }}:</span>
            <span class="input"><input id="date-end" name="end" class="date-pick" type="text"></span>
        </p>
        </form>
    </div>

{% endblock %}

{# Styles for placement in <head> tag #}
{% block stylesheets %}
    <link rel="stylesheet" href="{{ asset('js/fullcalendar-3.1.0/fullcalendar.min.css') }}" media="all">
    <link rel="stylesheet" href="{{ asset('js/fullcalendar-3.1.0/fullcalendar.print.min.css') }}" media="print">

    <link rel="stylesheet" href="{{ asset('css/jquery.datetimepicker.css') }}">

    <link rel="stylesheet" type="text/css" href="{{ asset('js/jquery-ui/jquery-ui.min.css') }}">

    <style>
        #calendar {
            /*
            max-width: 900px;
            margin: 0 auto;
             */
            width:100%;
        }
    </style>
{% endblock %}

{# Scripts for placement at the end of <body> tag #}
{% block scripts %}
    <script>
        var uri_get_schedule = '{{ path('management-get-schedule') }}';
        var uri_add_scheduled = '{{ path('management-add-scheduled') }}';
        var uri_change_scheduled = '{{ path('management-change-scheduled') }}';
        var uri_delete_scheduled = '{{ path('management-delete-scheduled') }}';
    </script>
    <script src="{{ asset('js/lib/moment.min.js') }}"></script>
    <script src="{{ asset('js/lib/fullcalendar.min.js') }}"></script>
    <script src="{{ asset('js/lib/fullcalendar-locale-all.js') }}"></script>
    <script src="{{ asset('js/jquery-ui/jquery-ui.min.js') }}"></script>

    <script src="{{ asset('js/jquery.datetimepicker.full.min.js') }}"></script>
    <script src="{{ asset('js/scheduler.js') }}"></script>

    <script>
        var showCreateDialog = function(start, stop, success) {
            $('#diag-place').find('#date-start').val(start.format('DD-MM-YYYY HH:mm'));
            $('#diag-place').find('#date-end').val(stop.format('DD-MM-YYYY HH:mm'));
            $('#diag-place').dialog('option', 'successCallback', success);
            $('#diag-place').dialog('open');
        };
        $(document).ready(function(){
            $('#diag-place').dialog({
                resizable: false,
                height: "auto",
                width: 400,
                modal: true,
                autoOpen: false,
                buttons: {
                    "Speichern": function() {
                        var succ = $(this).dialog('option', 'successCallback');
                        var form = $(this).children('form');

                        ajaxLoadShow();
                        $.ajax({
                            type: "POST",
                            url: form.attr('action'),
                            data: form.serialize()
                        })
                            .fail(function(){
                                $.notify("Beim Eintragen ist leider ein Fehler aufgetreten.", "error");
                            })
                            .done(function(){
                                $.notify("Die Präsentation wurde eingetragen.", "success");
                                var cb = $('#diag-place').dialog('option', 'successCallback');
                                cb();
                            })
                            .always(function(){
                                ajaxLoadHide();
                            });

                        $(this).dialog("close");
                    },
                    Cancel: function() {
                        $(this).dialog("close");
                    }
                },
                open: function() {
                    var diag = $(this);
                    diag.find('#inp-screen').empty();
                    diag.find('#inp-screen').append($('#screen-prototype').clone());
                    diag.find('#inp-pres').empty();
                    diag.find('#inp-pres').append($('#presentation-prototype').clone());

                    diag.find('#inp-screen').children('select').val($(getSelectedScreen()).data('guid'));

                    $.datetimepicker.setLocale('de');
                    $(this).find(".date-pick").datetimepicker({
                        format: 'd.m.Y H:i'
                    });
                }
            });
        });
    </script>
{% endblock %}
{'fraction_non_alphanumeric': 0.18688007213706043, 'fraction_numerical': 0.002705139765554554, 'mean_word_length': 1.6427720413026212, 'pattern_counts': {'":': 2, '<': 173, '<?xml version=': 0, '>': 173, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3621926', 'n_tokens_mistral': 3745, 'n_tokens_neox': 3497, 'n_words': 671}