mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Duplicate module
Signed-off-by: Mathieu Jaumotte <mathieu.jaumotte@champs-libres.coop>
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
' ' ~ person.lastName }}{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
<h2>Ancien dossier</h2>
|
||||
<h2>{{ 'Old person'|trans }}</h2>
|
||||
{{ person2 }}
|
||||
<a class="sc-button bt-show" target="_blank" href="{{ path('chill_person_view', { person_id : person2.id }) }}"></a>
|
||||
|
||||
|
||||
<h2>Nouveau Dossier</h2>
|
||||
<h2>{{ 'New person'|trans }}</h2>
|
||||
{{ person }}
|
||||
<a class="sc-button bt-show" target="_blank" href="{{ path('chill_person_view', { person_id : person.id }) }}"></a>
|
||||
|
||||
|
@@ -8,9 +8,12 @@
|
||||
|
||||
{% block personcontent %}
|
||||
|
||||
<h2>{{ title|default('Person duplicate')|trans }}</h2>
|
||||
|
||||
<table>
|
||||
|
||||
{% if duplicatePersons|length > 0 %}
|
||||
<h2>{{ title|default('Person duplicate')|trans }}</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="chill-red">{% trans %}Name{% endtrans %}</th>
|
||||
@@ -20,46 +23,104 @@
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{% for duplicatePerson in duplicatePersons %}
|
||||
<tr>
|
||||
<td>
|
||||
{% set is_open = duplicatePerson.isOpen() %}
|
||||
<a href="{{ path('chill_person_view', { person_id : duplicatePerson.getId }) }}" {% if chill_person.fields.accompanying_period == 'visible' %}{% if is_open %} alt="{{ 'An accompanying period is open'|trans|e('html_attr') }}"{% else %} alt="{{ 'Any accompanying periods are open'|trans|e('html_attr') }}" {% endif %}{% endif %}>
|
||||
{{ duplicatePerson|chill_entity_render_box }}
|
||||
{% apply spaceless %}
|
||||
{% if chill_person.fields.accompanying_period == 'visible' %}
|
||||
{% if is_open == false %}
|
||||
<i class="fa fa-lock" ></i>
|
||||
{% else %}
|
||||
<i class="fa fa-unlock" ></i>
|
||||
{% for duplicatePerson in duplicatePersons %}
|
||||
<tr>
|
||||
<td>
|
||||
{% set is_open = duplicatePerson.isOpen() %}
|
||||
<a href="{{ path('chill_person_view', { person_id : duplicatePerson.getId }) }}" {% if chill_person.fields.accompanying_period == 'visible' %}{% if is_open %} alt="{{ 'An accompanying period is open'|trans|e('html_attr') }}"{% else %} alt="{{ 'Any accompanying periods are open'|trans|e('html_attr') }}" {% endif %}{% endif %}>
|
||||
{{ duplicatePerson|chill_entity_render_box }}
|
||||
{% apply spaceless %}
|
||||
{% if chill_person.fields.accompanying_period == 'visible' %}
|
||||
{% if is_open == false %}
|
||||
<i class="fa fa-lock" ></i>
|
||||
{% else %}
|
||||
<i class="fa fa-unlock" ></i>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if duplicatePerson.birthdate is not null %}
|
||||
{{ duplicatePerson.birthdate|format_date('long') }}
|
||||
{% else %}
|
||||
{{ 'Unknown date of birth'|trans }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if duplicatePerson.nationality is not null %}
|
||||
{{ duplicatePerson.nationality.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
{{ 'Without nationality'|trans }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li><a class="sc-button bt-show" target="_blank" href="{{ path('chill_person_view', { person_id : duplicatePerson.id }) }}"></a></li>
|
||||
<li><a class="sc-button bt-duplicate" href="{{ path('chill_person_duplicate_confirm', { person1_id : person.id, person2_id : duplicatePerson.id }) }}"></a></li>
|
||||
<li><a class="sc-button bt-not-duplicate" href="{{ path('chill_person_duplicate_not_duplicate', {person1_id : person.id, person2_id : duplicatePerson.id}) }}"></a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
{% if notDuplicatePersons|length > 0 %}
|
||||
<h2>{{ 'Person flaged as duplicate' | trans }}</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="chill-red">{% trans %}Name{% endtrans %}</th>
|
||||
<th class="chill-green">{% trans %}Date of birth{% endtrans %}</th>
|
||||
<th class="chill-orange">{% trans %}Nationality{% endtrans %}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{% for notDuplicatePerson in notDuplicatePersons %}
|
||||
<tr>
|
||||
<td>
|
||||
{% set is_open = notDuplicatePerson.isOpen() %}
|
||||
<a href="{{ path('chill_person_view', { person_id : notDuplicatePerson.getId }) }}" {% if chill_person.fields.accompanying_period == 'visible' %}{% if is_open %} alt="{{ 'An accompanying period is open'|trans|e('html_attr') }}"{% else %} alt="{{ 'Any accompanying periods are open'|trans|e('html_attr') }}" {% endif %}{% endif %}>
|
||||
{{ notDuplicatePerson|chill_entity_render_box }}
|
||||
{% apply spaceless %}
|
||||
{% if chill_person.fields.accompanying_period == 'visible' %}
|
||||
{% if is_open == false %}
|
||||
<i class="fa fa-lock" ></i>
|
||||
{% else %}
|
||||
<i class="fa fa-unlock" ></i>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if notDuplicatePerson.birthdate is not null %}
|
||||
{{ notDuplicatePerson.birthdate|format_date('long') }}
|
||||
{% else %}
|
||||
{{ 'Unknown date of birth'|trans }}
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if duplicatePerson.birthdate is not null %}
|
||||
{{ duplicatePerson.birthdate|format_date('long') }}
|
||||
{% else %}
|
||||
{{ 'Unknown date of birth'|trans }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if duplicatePerson.nationality is not null %}
|
||||
{{ duplicatePerson.nationality.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
{{ 'Without nationality'|trans }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li><a class="sc-button bt-show" target="_blank" href="{{ path('chill_person_view', { person_id : duplicatePerson.id }) }}"></a></li>
|
||||
<li><a class="sc-button bt-duplicate" href="{{ path('chill_person_duplicate_confirm', { person_id : person.id, person2_id : duplicatePerson.id }) }}"></a></li>
|
||||
<li><a class="sc-button bt-not-duplicate" href="{{ path('chill_person_duplicate_not_duplicate', {person_id : person.id, person2_id : duplicatePerson.id}) }}"></a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
{% if notDuplicatePerson.nationality is not null %}
|
||||
{{ notDuplicatePerson.nationality.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
{{ 'Without nationality'|trans }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li><a class="sc-button bt-show" target="_blank" href="{{ path('chill_person_view', { person_id : notDuplicatePerson.id }) }}"></a></li>
|
||||
<li><a class="sc-button bt-not-duplicate" href="{{ path('chill_person_remove_duplicate_not_duplicate', {person1_id : person.id, person2_id : notDuplicatePerson.id}) }}"></a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user