Remove double display of person id in the banner when there is a deathdate

This commit is contained in:
2025-12-03 11:38:39 +01:00
parent 0caad2b7cd
commit 0ba5cd849c
2 changed files with 14 additions and 8 deletions

View File

@@ -0,0 +1,6 @@
kind: Fixed
body: Remove double display of person id in the banner when there is a deathdate
time: 2025-12-03T11:38:32.653635449+01:00
custom:
Issue: "441"
SchemaChange: No schema change

View File

@@ -81,25 +81,25 @@
</div>
{%- if options['addInfo'] -%}
<p class="moreinfo">
{% if person.gender is not null %}{{ person.gender.icon|chill_entity_render_box }}{% endif %}
{% if person.gender is not null %}{{ person.gender.icon|chill_entity_render_box }} {% endif %}
{%- if person.deathdate is not null -%}
{%- if person.birthdate is not null -%}
{# must be on one line to avoid spaces with dash #}
<time datetime="{{ person.birthdate|date('Y-m-d') }}" title="{{ 'birthdate'|trans|e('html_attr') }}">{{ person.birthdate|format_date("medium") }}</time>&#x2013;
{%- else -%}
{{ 'Date of death'|trans }}:
<span>{{ 'Date of death'|trans }}: </span>
{%- endif -%}
{#- must be on one line to avoid spaces with dash -#}
<time datetime="{{ person.deathdate|date('Y-m-d') }}" title="{{ 'deathdate'|trans }}">{{ person.deathdate|format_date("medium") }}</time>
{%- if options['addAge'] -%}
<span class="age">&nbsp;{{ 'years_old'|trans({ 'age': person.age }) }}</span>
{%- endif -%}
{%- if options['addId'] -%}
{%- set personId = person|chill_person_id_render_text %}
<span class="id-number" title="{{ 'Person'|trans ~ ' ' ~ personId }}">
({{ personId }})
</span>
{%- endif -%}
{# {%- if options['addId'] -%}#}
{# {%- set personId = person|chill_person_id_render_text %}#}
{# <span class="id-number" title="{{ 'Person'|trans ~ ' ' ~ personId }}">#}
{# ({{ personId }})#}
{# </span>#}
{# {%- endif -%}#}
{%- elseif person.birthdate is not null -%}
<time datetime="{{ person.birthdate|date('Y-m-d') }}" title="{{ 'Birthdate'|trans }}">
{{ 'Born the date'|trans({'gender': person.gender ? person.gender.genderTranslation.value : 'neutral',