mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +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>
|
||||
|
@@ -92,6 +92,13 @@ This view should receive those arguments:
|
||||
{%- endif -%}
|
||||
</dd>
|
||||
|
||||
{%- if chill_person.fields.deathdate == 'visible' -%}
|
||||
{%- if person.deathdate is not null -%}
|
||||
<dt>{{ 'Date of death'|trans }} :</dt>
|
||||
<dd>{{ person.deathdate|format_date('long') }}</dd>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if chill_person.fields.place_of_birth == 'visible' -%}
|
||||
<dt>{{ 'Place of birth'|trans }} :</dt>
|
||||
{% if person.placeOfBirth is not empty %}
|
||||
@@ -111,6 +118,7 @@ This view should receive those arguments:
|
||||
{% endif %}
|
||||
{% endapply %}</dd>
|
||||
{%- endif -%}
|
||||
|
||||
</dl>
|
||||
</figure>
|
||||
</div>
|
||||
@@ -159,12 +167,27 @@ This view should receive those arguments:
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
{%- if chill_person.fields.number_of_children == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{'Number of children'|trans}} :</dt>
|
||||
<dd>
|
||||
{% if person.numberOfChildren is not null %}
|
||||
{{ person.numberOfChildren }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
{%- if chill_person.fields.marital_status == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{'Marital status'|trans}} :</dt>
|
||||
<dd>
|
||||
{% if person.maritalStatus is not null %}
|
||||
{{ person.maritalStatus.name|localize_translatable_string }}
|
||||
{% if person.maritalStatusDate is not null %}
|
||||
{{ 'person.from_the'|trans }} {{ person.maritalStatusDate|format_date('long') }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
@@ -217,6 +240,7 @@ This view should receive those arguments:
|
||||
<dl>
|
||||
<dt>{{ 'Mobilenumber'|trans }} :</dt>
|
||||
<dd>{% if person.mobilenumber is not empty %}<a href="tel:{{ person.mobilenumber }}">{{ person.mobilenumber|chill_format_phonenumber }}</a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
|
||||
<p>{% if person.acceptSMS %}{{ 'Accept short text message'|trans }}{% endif %}</p>
|
||||
</dl>
|
||||
{% endif %}
|
||||
|
||||
|
Reference in New Issue
Block a user