mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
fix some person issues
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
* addAge bool
|
||||
* addCenter bool
|
||||
* hLevel integer
|
||||
* addDeath bool
|
||||
* address_multiline bool
|
||||
* customButtons [
|
||||
'before' Twig\Markup, (injected with macro)
|
||||
@@ -24,7 +25,12 @@
|
||||
|
||||
{% macro raw(person, options) %}
|
||||
<span class="firstname">{{ person.firstName }}</span>
|
||||
<span class="lastname">{{ person.lastName }}</span>
|
||||
<span class="lastname">
|
||||
{{ person.lastName }}
|
||||
{%- if options['addDeath'] -%}
|
||||
{% if person.deathdate is not null %} (‡){% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
{%- if options['addAltNames'] -%}
|
||||
<span class="altnames">
|
||||
{%- for n in person.altNames -%}
|
||||
@@ -82,21 +88,17 @@
|
||||
{{ 'Date of death'|trans }}:
|
||||
{%- 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">
|
||||
({{ 'years_old'|trans({ 'age': person.age }) }})
|
||||
</span>
|
||||
{% endif %}
|
||||
<time datetime="{{ person.deathdate|date('Y-m-d') }}" title="{{ 'deathdate'|trans }}">{{ person.deathdate|format_date("medium") }}</time>
|
||||
{%- if options['addAge'] -%}
|
||||
<span class="age">{{ 'years_old'|trans({ 'age': person.age }) }}</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,
|
||||
'birthdate': person.birthdate|format_date("medium") }) }}
|
||||
</time>
|
||||
{%- if options['addAge'] -%}
|
||||
<span class="age">
|
||||
{{- 'years_old'|trans({ 'age': person.age }) -}}
|
||||
</span>
|
||||
<span class="age">{{- 'years_old'|trans({ 'age': person.age }) -}}</span>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
</p>
|
||||
|
Reference in New Issue
Block a user