diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e8ddfa02..a618b36b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to ## Unreleased +* [person] use the same rendering of person in similar person proposition (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/348) * [person] move similar person matcher to PersonACLAwareRepository and replace the SimilarPersonMatcher uses (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/451) ## Test releases diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig index 3a9083310..575016408 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig @@ -17,6 +17,15 @@ {% block title %}{{ 'Add a person'|trans }}{% endblock title %} +{% macro button_person_after(person) %} + {% set household = person.getCurrentHousehold %} + {% if household is not null %} +
  • + +
  • + {% endif %} +{% endmacro %} + {% block content %}
    @@ -31,34 +40,24 @@
    - - - - - - - - - +
    {% for person in alternatePersons %} -
    - - - - +
    + + {{ person|chill_entity_render_box({ + 'render': 'bloc', + 'addLink': true, + 'addInfo': true, + 'addAge': true, + 'addAltNames': true, + 'addCenter': true, + 'address_multiline': false, + 'customButtons': { 'after': _self.button_person_after(person) } + }) }} +
    {% endfor %} - -
    {{ 'Name'|trans }}{{ 'Date of birth'|trans }}{{ 'Nationality'|trans }}
    - - {{ person|chill_entity_render_string }}{% apply spaceless %} - {% if person.isOpen == false %} - - {% endif %} - {% endapply %} - - {% if person.birthdate is not null %}{{ person.birthdate|format_date('long') }}{% else %} {% endif %} - {% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %} -
    + + {% endif %} {{ form_start(form, {'attr' : {'id' : 'create-form'}}) }}