mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
Add person alt names in list & view
This commit is contained in:
@@ -4,6 +4,8 @@ services:
|
||||
$similarPersonMatcher: '@Chill\PersonBundle\Search\SimilarPersonMatcher'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
|
||||
$personRepository: '@Chill\PersonBundle\Repository\PersonRepository'
|
||||
$configPersonAltNameHelper: '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
|
||||
tags: ['controller.service_arguments']
|
||||
|
||||
Chill\PersonBundle\Controller\TimelinePersonController:
|
||||
|
@@ -1,4 +1,6 @@
|
||||
services:
|
||||
Chill\PersonBundle\Templating\Entity\PersonRender:
|
||||
arguments:
|
||||
$configAltNamesHelper: '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
|
||||
tags:
|
||||
- 'chill.render_entity'
|
||||
|
@@ -42,7 +42,7 @@
|
||||
<td>
|
||||
{% set is_open = person.isOpen() %}
|
||||
<a href="{{ path('chill_person_view', { person_id : person.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 %}>
|
||||
{{person.firstName}} {{person.lastName}}
|
||||
{{ person|chill_entity_render_box }}
|
||||
{% spaceless %}
|
||||
{% if chill_person.fields.accompanying_period == 'visible' %}
|
||||
{% if is_open == false %}
|
||||
|
@@ -62,6 +62,12 @@ This view should receive those arguments:
|
||||
|
||||
<dt>{{ 'Last name'|trans }} :</dt>
|
||||
<dd>{{ person.lastName }}</dd>
|
||||
{% for el in person.altNames %}
|
||||
{% if el.key in alt_names|keys %}
|
||||
<dt>{{ alt_names[el.key]|localize_translatable_string }} :</dt>
|
||||
<dd>{{ el.label }}</dd>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<dt>{{ 'Gender'|trans }} :</dt>
|
||||
<dd>{{ ( person.gender|default('Not given'))|trans }}</dd>
|
||||
|
Reference in New Issue
Block a user