diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig index 43f5be76e..ac1d1748b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig @@ -10,10 +10,8 @@ {% if person.isSharingHousehold %}
  • + class="btn btn-chill-pink" title="{{ 'Show household'|trans ~ ' n° ' ~ person.getCurrentHousehold.id }}"> - n°  - {{ person.getCurrentHousehold.id }}
  • {% endif %} @@ -40,7 +38,8 @@ {% if participation.enddate is null %}
    {{ participation.person|chill_entity_render_box({ - 'render': 'bloc', 'addLink': false, 'addInfo': true, 'customButtons': _self.button_person(participation.person) + 'render': 'bloc', 'addLink': false, 'addInfo': true, + 'customButtons': { 'before': _self.button_person(participation.person) } }) }}
    {% endif %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig index a5c433e90..3d00fe0ea 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig @@ -1,13 +1,17 @@ {# Template to render a person - * render [raw|label|bloc] + * render string ['raw'|'label'|'bloc'] OPTIONS - * addAltNames bool - * addLink bool - * addEntity bool - * addInfo bool - * hLevel integer - * customButtons Twig\Markup (html) + * addAltNames bool + * addLink bool + * addEntity bool + * addInfo bool + * hLevel integer + * customButtons [ + 'before' Twig\Markup, (injected with macro) + 'replace' Twig\Markup, + 'after' Twig\Markup + ] #} {% macro raw(person, options) %} @@ -94,14 +98,21 @@ diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index d0ea40b72..8a54e4d38 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -58,7 +58,7 @@ class PersonRender extends AbstractChillEntityRender 'addEntity' => $options['addEntity'] ?? false, 'addInfo' => $options['addInfo'] ?? false, 'hLevel' => $options['hLevel'] ?? 3, - 'customButtons' => $options['customButtons'] ?? null, + 'customButtons' => $options['customButtons'] ?? [], ]; return diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 96dd17357..be834632d 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -119,6 +119,7 @@ address_country_code: Code pays 'Alreay existing person': 'Dossiers déjà encodés' 'Add the person': 'Ajouter la personne' +Show person: Voir le dossier de la personne 'Confirm the creation': 'Confirmer la création' 'You will create this person': 'Vous allez créer le dossier suivant' Return: Retour @@ -351,6 +352,7 @@ Addresses history for household: Historique des adresses Household accompanying period: Parcours d'accompagnement du ménage Household summary: Résumé du ménage Edit household address: Modifier l'adresse du ménage +Show household: Voir le ménage # accompanying course work Accompanying Course Actions: Actions d'accompagnements diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig index 294e03f4b..49299bfaf 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig @@ -1,14 +1,17 @@ {# Template to render a thirdparty - * render [raw|label|bloc] + * render string ['raw'|'label'|'bloc'] OPTIONS * with_valid_from bool - * addAltNames bool - * addLink bool - * addEntity bool - * addInfo bool - * hLevel integer - * customButtons Twig\Markup (html) + * addLink bool + * addEntity bool + * addInfo bool + * hLevel integer + * customButtons [ + 'before' Twig\Markup, (injected with macro) + 'replace' Twig\Markup, + 'after' Twig\Markup + ] #} {% macro raw(thirdparty, options) %} @@ -78,14 +81,21 @@ diff --git a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php index 2433ba7e0..346c4dcc3 100644 --- a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php +++ b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php @@ -52,7 +52,7 @@ class ThirdPartyRender extends AbstractChillEntityRender 'addEntity' => $options['addEntity'] ?? false, 'addInfo' => $options['addInfo'] ?? false, 'hLevel' => $options['hLevel'] ?? 3, - 'customButtons' => $options['customButtons'] ?? null, + 'customButtons' => $options['customButtons'] ?? [], ]; return diff --git a/src/Bundle/ChillThirdPartyBundle/config/services/templating.yaml b/src/Bundle/ChillThirdPartyBundle/config/services/templating.yaml index 690f6008d..6b12d3aa0 100644 --- a/src/Bundle/ChillThirdPartyBundle/config/services/templating.yaml +++ b/src/Bundle/ChillThirdPartyBundle/config/services/templating.yaml @@ -1,6 +1,6 @@ services: Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender: arguments: - $templating: '@templating.engine.twig' + $engine: '@Symfony\Component\Templating\EngineInterface' tags: - - 'chill.render_entity' \ No newline at end of file + - 'chill.render_entity' diff --git a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml index 5ca560f88..d7cc22eb5 100644 --- a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml @@ -20,7 +20,7 @@ Third party updated: Le tiers a été mis à jour Third party created: Le tiers a été créé Active, shown to users: Actif, visible par les utilisateurs Inactive, not shown to users: Inactif, invisible par les utilisateurs - +Show thirdparty: Voir le tiers The party is visible in those centers: Le tiers est visible dans ces centres No third parties: Aucun tiers @@ -28,4 +28,4 @@ No third parties: Aucun tiers # ROLES CHILL_3PARTY_3PARTY_CREATE: Ajouter un Tiers CHILL_3PARTY_3PARTY_SHOW: Voir un Tiers -CHILL_3PARTY_3PARTY_UPDATE: Modifier un Tiers \ No newline at end of file +CHILL_3PARTY_3PARTY_UPDATE: Modifier un Tiers