rdv: init vue component for calendar range editing + refactor vue calendar code

This commit is contained in:
nobohan
2021-08-27 17:14:33 +02:00
parent 54ea954a5a
commit ee4d23ff82
8 changed files with 152 additions and 2 deletions

View File

@@ -8,12 +8,17 @@
{% set accompanying_course_id = accompanyingCourse.id %}
{% endif %}
{% if user %}
{% if context == 'user' %}
<h2>{{ 'My calendar list' |trans }}</h2>
{% else %}
<h2>{{ 'Calendar list' |trans }}</h2>
{% endif %}
{% if context == 'user' %}
<div id="myCalendar"></div>
{% endif %}
{% if calendarItems|length == 0 %}
<p class="chill-no-data-statement">
{{ "There is no calendar items."|trans }}

View File

@@ -7,3 +7,16 @@
{% block content %}
{% include 'ChillCalendarBundle:Calendar:list.html.twig' with {'context': 'user'} %}
{% endblock %}
{% block js %}
{{ parent() }}
<script type="text/javascript">
window.userId = {{ user.id }};
</script>
{{ encore_entry_script_tags('vue_mycalendarrange') }}
{% endblock %}
{% block css %}
{{ parent() }}
{{ encore_entry_link_tags('vue_calendar') }}
{% endblock %}