diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig index b88f93928..43f5be76e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig @@ -6,6 +6,19 @@ {{ 'Resume Accompanying Course'|trans }} {% endblock %} +{% macro button_person(person) %} + {% if person.isSharingHousehold %} +
  • + + + n°  + {{ person.getCurrentHousehold.id }} + +
  • + {% endif %} +{% endmacro %} + {% block content %}
    @@ -27,25 +40,11 @@ {% if participation.enddate is null %}
    {{ participation.person|chill_entity_render_box({ - 'render': 'bloc', 'addLink': false, 'addInfo': true + 'render': 'bloc', 'addLink': false, 'addInfo': true, 'customButtons': _self.button_person(participation.person) }) }}
    {% endif %} {% endfor %} - {# AJOUTER ACTIONS - - #}
    {% if withoutHousehold|length > 0 %} {% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' with {} %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig index ddf1c0854..a5c433e90 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig @@ -7,6 +7,7 @@ * addEntity bool * addInfo bool * hLevel integer + * customButtons Twig\Markup (html) #} {% macro raw(person, options) %} @@ -92,13 +93,17 @@ {%- endif -%} - {%- if is_granted('CHILL_PERSON_SEE', person) -%} - {%- endif -%} {%- endif -%} diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index 320d78d7a..d0ea40b72 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -58,6 +58,7 @@ class PersonRender extends AbstractChillEntityRender 'addEntity' => $options['addEntity'] ?? false, 'addInfo' => $options['addInfo'] ?? false, 'hLevel' => $options['hLevel'] ?? 3, + 'customButtons' => $options['customButtons'] ?? null, ]; return diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig index 7813c0cbc..294e03f4b 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig @@ -8,6 +8,7 @@ * addEntity bool * addInfo bool * hLevel integer + * customButtons Twig\Markup (html) #} {% macro raw(thirdparty, options) %} @@ -77,9 +78,15 @@ diff --git a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php index 00f7effd3..2433ba7e0 100644 --- a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php +++ b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php @@ -52,6 +52,7 @@ class ThirdPartyRender extends AbstractChillEntityRender 'addEntity' => $options['addEntity'] ?? false, 'addInfo' => $options['addInfo'] ?? false, 'hLevel' => $options['hLevel'] ?? 3, + 'customButtons' => $options['customButtons'] ?? null, ]; return