mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +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:
@@ -10,13 +10,10 @@
|
||||
<div id="accompanying-course"></div> {# <== insert accompanyingCourse vue component #}
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('accompanying_course') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
window.accompanyingCourseId = {{ accompanyingCourse.id|e('js') }};
|
||||
window.vueRootComponent = 'app';
|
||||
</script>
|
||||
{{ encore_entry_script_tags('accompanying_course') }}
|
||||
{% endblock %}
|
@@ -9,18 +9,20 @@
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<pre>
|
||||
{{ accompanyingCourse.id }}
|
||||
{{ accompanyingCourse.openingDate|format_date('short') }}
|
||||
{{ accompanyingCourse.closingDate|format_date('short') }}
|
||||
{{ accompanyingCourse.closingMotive|chill_entity_render_box }}
|
||||
{{ accompanyingCourse.remark|raw }}
|
||||
{{ accompanyingCourse.user }}
|
||||
usagers:
|
||||
{% for p in accompanyingCourse.participations %}
|
||||
{{ p.person.id }} | <a href="{{ path('chill_person_accompanying_period_list', { person_id: p.person.id }) }}">{{ p.person.fullnamecanonical }}</a> | {{ p.startdate|format_date('short') }} | {{ p.enddate|format_date('short') }}
|
||||
{% endfor %}
|
||||
{{ accompanyingCourse.id }}
|
||||
{{ accompanyingCourse.openingDate|format_date('short') }}
|
||||
{{ accompanyingCourse.closingDate|format_date('short') }}
|
||||
{{ accompanyingCourse.closingMotive|chill_entity_render_box }}
|
||||
{{ accompanyingCourse.remark|raw }}
|
||||
{{ accompanyingCourse.user }}
|
||||
usagers:
|
||||
{% for p in accompanyingCourse.participations %}
|
||||
{{ p.person.id }} | <a href="{{ path('chill_person_accompanying_period_list', { person_id: p.person.id }) }}">{{ p.person.fullnamecanonical }}</a> | {{ p.startdate|format_date('short') }} | {{ p.enddate|format_date('short') }}
|
||||
{% endfor %}
|
||||
</pre>
|
||||
|
||||
{{ dump() }}
|
||||
|
||||
{# ==> insert accompanyingCourse vue component #}
|
||||
<div id="accompanying-course"></div>
|
||||
{% endblock %}
|
||||
|
@@ -156,4 +156,7 @@
|
||||
|
||||
<h2>{{ 'Last events on accompanying course'|trans }}</h2>
|
||||
|
||||
|
||||
{# ==> insert accompanyingCourse vue component #}
|
||||
<div id="accompanying-course"></div>
|
||||
{% endblock %}
|
||||
|
@@ -16,7 +16,13 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('accompanying_course') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
window.accompanyingCourseId = {{ accompanyingCourse.id|e('js') }};
|
||||
window.vueRootComponent = 'banner';
|
||||
</script>
|
||||
{{ encore_entry_script_tags('accompanying_course') }}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user