mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
load vue banner component for each page of AccompanyingCourse context
* vue css and js loaded from layout.html.twig * rename 'show' template to 'edit' template * overwrite js block for 'edit' template (load all component, not only banner)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
{% extends 'ChillPersonBundle:AccompanyingCourse:layout.html.twig' %}
|
||||
|
||||
{% set title = 'DRAFT' == accompanyingCourse.step ? 'New accompanying course' : 'Edit accompanying course' %}
|
||||
|
||||
{% block title %}
|
||||
{{ title|trans }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="accompanying-course"></div> {# <== insert accompanyingCourse vue component #}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
window.accompanyingCourseId = {{ accompanyingCourse.id|e('js') }};
|
||||
window.vueRootComponent = 'app';
|
||||
</script>
|
||||
{{ encore_entry_script_tags('accompanying_course') }}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user