[person] use the same rendering of person in similar person proposition

This commit is contained in:
nobohan 2022-02-17 14:00:38 +01:00
parent 574c3596d1
commit bfb19d0670
2 changed files with 26 additions and 26 deletions

View File

@ -11,6 +11,7 @@ and this project adheres to
## Unreleased
<!-- write down unreleased development here -->
* [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

View File

@ -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 %}
<li>
<a href="{{ path('chill_person_household_summary', { 'household_id': household.id }) }}" class="btn btn-sm btn-chill-beige"><i class="fa fa-home"></i></a>
</li>
{% endif %}
{% endmacro %}
{% block content %}
<div class="col-md-10 col-xxl person-new">
@ -31,34 +40,24 @@
</span>
</div>
<table class="table table-bordered border-dark">
<thead>
<tr>
<th class="chill-red">{{ 'Name'|trans }}</th>
<th class="chill-green">{{ 'Date of birth'|trans }}</th>
<th class="chill-orange">{{ 'Nationality'|trans }}</th>
</tr>
</thead>
<tbody>
<div class="flex-table">
{% for person in alternatePersons %}
<tr>
<td>
<a href="{{ path('chill_person_view', {'person_id': person.id } ) }}">
{{ person|chill_entity_render_string }}{% apply spaceless %}
{% if person.isOpen == false %}
<i class="icon-lock"></i>
{% endif %}
{% endapply %}
</a>
</td>
<td>{% if person.birthdate is not null %}{{ person.birthdate|format_date('long') }}{% else %}&nbsp;{% endif %}</td>
<td>
{% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %}
</td>
</tr>
<div class="item-bloc">
{{ 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) }
}) }}
</div>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{{ form_start(form, {'attr' : {'id' : 'create-form'}}) }}