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