Fix adding quick menus to list_with_period.html.twig

- update twig namespaces
- move twig file within Resources
This commit is contained in:
2024-06-13 11:47:07 +02:00
parent d60ba3ecb2
commit cc0030c1cd
4 changed files with 17 additions and 29 deletions

View File

@@ -1,3 +1,10 @@
{% macro button_person_before(person) %}
{{ chill_menu('person_quick_menu', {
'layout': '@ChillMain/Menu/quick_menu.html.twig',
'args' : { 'person': person }
}) }}
{% endmacro %}
{% macro button_person_after(person) %}
{% set household = person.getCurrentHousehold %}
{% if household is not null and is_granted('CHILL_PERSON_HOUSEHOLD_SEE', household) %}
@@ -9,12 +16,6 @@
</a>
</li>
{% endif %}
{{ chill_menu('person_quick_menu', {
'layout': '@ChillMainBundle/Menu/quick_menu.html.twig',
'args' : { 'person': person }
}) }}
{% endmacro %}
{% macro accompanying_period(acp, person) %}
@@ -190,6 +191,11 @@
{% endif %}
<ul class="record_actions">
{{ chill_menu('accompanying_course_quick_menu', {
'layout': '@ChillMain/Menu/quick_menu.html.twig',
'args' : { 'accompanying-course': acp }
}) }}
<li>
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': acp.id }) }}"
class="btn btn-sm btn-primary"
@@ -197,12 +203,7 @@
><i class="fa fa-random fa-fw"></i>
</a>
</li>
{{ chill_menu('accompanying_course_quick_menu', {
'layout': '@ChillMainBundle/Menu/quick_menu.html.twig',
'args' : { 'accompanying-course': acp }
}) }}
</ul>
</div>
</div>
@@ -259,7 +260,7 @@
'addAltNames': true,
'addCenter': true,
'address_multiline': false,
'customButtons': { 'after': _self.button_person_after(person) }
'customButtons': { 'after': _self.button_person_after(person), 'before': _self.button_person_before((person)) }
}) }}
{#- 'acps' is for AcCompanyingPeriodS #}