{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}

{% set activeRouteKey = 'chill_calendar_calendar_list' %}

{% block title 'Update calendar'|trans %}

{% block content %}
<div class="calendar-edit">

    {% include '@ChillCalendar/Calendar/edit.html.twig' with {'context': 'accompanyingCourse'} %}

</div>
{% endblock %}

{% block js %}
    {{ parent() }}
    <script type="text/javascript">
        window.entity = {{ entity_json|json_encode|raw }};
        window.startDate = {{ entity.startDate|date('Y-m-d H:i:s')|json_encode|raw }};
        window.endDate = {{ entity.endDate|date('Y-m-d H:i:s')|json_encode|raw }};
        window.mainUser = {{ entity.mainUser.id }};
    </script>
    {{ encore_entry_script_tags('vue_calendar') }}
{% endblock %}

{% block css %}
    {{ parent() }}
    {{ encore_entry_link_tags('vue_calendar') }}
    {{ encore_entry_link_tags('page_calendar') }}
{% endblock %}

{% block block_post_menu %}
    <div id="calendarControls"></div>
{% endblock %}
