mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
person: update person view/show twig
This commit is contained in:
parent
1a204312f3
commit
b3792f6714
@ -78,6 +78,7 @@ class Configuration implements ConfigurationInterface
|
|||||||
->append($this->addFieldNode('address'))
|
->append($this->addFieldNode('address'))
|
||||||
->append($this->addFieldNode('accompanying_period'))
|
->append($this->addFieldNode('accompanying_period'))
|
||||||
->append($this->addFieldNode('memo'))
|
->append($this->addFieldNode('memo'))
|
||||||
|
->append($this->addFieldNode('number_of_children'))
|
||||||
->arrayNode('alt_names')
|
->arrayNode('alt_names')
|
||||||
->defaultValue([])
|
->defaultValue([])
|
||||||
->arrayPrototype()
|
->arrayPrototype()
|
||||||
@ -130,7 +131,7 @@ class Configuration implements ConfigurationInterface
|
|||||||
{
|
{
|
||||||
$tree = new TreeBuilder($key,'enum');
|
$tree = new TreeBuilder($key,'enum');
|
||||||
$node = $tree->getRootNode($key);
|
$node = $tree->getRootNode($key);
|
||||||
|
|
||||||
switch($key) {
|
switch($key) {
|
||||||
case 'accompanying_period':
|
case 'accompanying_period':
|
||||||
$info = "If the accompanying periods are shown";
|
$info = "If the accompanying periods are shown";
|
||||||
|
@ -73,12 +73,14 @@ This view should receive those arguments:
|
|||||||
|
|
||||||
<dt>{{ 'Gender'|trans }} :</dt>
|
<dt>{{ 'Gender'|trans }} :</dt>
|
||||||
<dd>{{ ( person.gender|default('Not given'))|trans }}</dd>
|
<dd>{{ ( person.gender|default('Not given'))|trans }}</dd>
|
||||||
|
|
||||||
|
{% if not person.genderComment.isEmpty %}
|
||||||
|
<dt>{{ 'Gender comment'|trans }} :</dt>
|
||||||
|
<dd>{{ person.genderComment|chill_entity_render_box }}</dd>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
|
||||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
|
||||||
{% endif %}
|
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -114,11 +116,14 @@ This view should receive those arguments:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endapply %}</dd>
|
{% endapply %}</dd>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
{% if person.deathdate is not null %}
|
||||||
|
<dt>{{ 'Date of death'|trans }} :</dt>
|
||||||
|
<dd>{{ person.deathdate|format_date('long') }}</dd>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
|
||||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
|
||||||
{% endif %}
|
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -155,6 +160,21 @@ This view should receive those arguments:
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
{%- endif -%}
|
{%- 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' -%}
|
{%- if chill_person.fields.marital_status == 'visible' -%}
|
||||||
<dl>
|
<dl>
|
||||||
<dt>{{'Marital status'|trans}} :</dt>
|
<dt>{{'Marital status'|trans}} :</dt>
|
||||||
@ -165,12 +185,21 @@ This view should receive those arguments:
|
|||||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt>{{'Date of last marital status change'|trans}} :</dt>
|
||||||
|
{% if person.maritalStatusDate is not null %}
|
||||||
|
<dd>
|
||||||
|
{{ person.maritalStatusDate|format_date('long') }}
|
||||||
|
</dd>
|
||||||
|
{% endif %}
|
||||||
|
{% if not person.maritalStatusComment.isEmpty %}
|
||||||
|
<dt>{{'Comment on the marital status'|trans}} :</dt>
|
||||||
|
<dd>
|
||||||
|
{{ person.maritalStatusComment|chill_entity_render_box }}
|
||||||
|
</dd>
|
||||||
|
{% endif %}
|
||||||
</dl>
|
</dl>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
|
||||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
|
||||||
{% endif %}
|
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
@ -213,6 +242,13 @@ This view should receive those arguments:
|
|||||||
<dl>
|
<dl>
|
||||||
<dt>{{ 'Email'|trans }} :</dt>
|
<dt>{{ 'Email'|trans }} :</dt>
|
||||||
<dd>{% if person.email is not empty %}<a href="mailto:{{ person.email|escape('html_attr') }}">{{ person.email }}</a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
|
<dd>{% if person.email is not empty %}<a href="mailto:{{ person.email|escape('html_attr') }}">{{ person.email }}</a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
|
||||||
|
{%- if person.email is not empty and person.acceptEmail -%}
|
||||||
|
<dd>
|
||||||
|
<span class="badge badge-secondary">
|
||||||
|
{{- 'Accept emails'|trans -}}
|
||||||
|
</span>
|
||||||
|
</dd>
|
||||||
|
{%- endif -%}
|
||||||
</dl>
|
</dl>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- if chill_person.fields.phonenumber == 'visible' -%}
|
{%- if chill_person.fields.phonenumber == 'visible' -%}
|
||||||
@ -225,6 +261,13 @@ This view should receive those arguments:
|
|||||||
<dl>
|
<dl>
|
||||||
<dt>{{ 'Mobilenumber'|trans }} :</dt>
|
<dt>{{ 'Mobilenumber'|trans }} :</dt>
|
||||||
<dd>{% if person.mobilenumber is not empty %}<a href="tel:{{ person.mobilenumber }}"><pre>{{ person.mobilenumber|chill_format_phonenumber }}</pre></a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
|
<dd>{% if person.mobilenumber is not empty %}<a href="tel:{{ person.mobilenumber }}"><pre>{{ person.mobilenumber|chill_format_phonenumber }}</pre></a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
|
||||||
|
{%- if person.mobilenumber is not empty and person.acceptSMS -%}
|
||||||
|
<dd>
|
||||||
|
<span class="badge badge-secondary">
|
||||||
|
{{- 'Accept short text message'|trans -}}
|
||||||
|
</span>
|
||||||
|
</dd>
|
||||||
|
{%- endif -%}
|
||||||
</dl>
|
</dl>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for pp in person.otherPhoneNumbers %}
|
{% for pp in person.otherPhoneNumbers %}
|
||||||
@ -253,9 +296,6 @@ This view should receive those arguments:
|
|||||||
</dl>
|
</dl>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
|
||||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
|
||||||
{% endif %}
|
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
@ -272,14 +312,21 @@ This view should receive those arguments:
|
|||||||
|
|
||||||
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
|
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
|
||||||
<figure class="person-details">
|
<figure class="person-details">
|
||||||
|
|
||||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
|
||||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
|
||||||
{% endif %}
|
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||||
|
<ul class="grid-12 sticky-form-buttons record_actions ">
|
||||||
|
<li>
|
||||||
|
<a class="sc-button bt-update" href="{{ path('chill_person_general_edit', { 'person_id': person.id }) }}">
|
||||||
|
{{ 'Edit'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div> <!-- end of div.person-view -->
|
</div> <!-- end of div.person-view -->
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -23,6 +23,7 @@ nationality: nationalité
|
|||||||
'Without nationality': 'Sans nationalité'
|
'Without nationality': 'Sans nationalité'
|
||||||
Gender: Genre
|
Gender: Genre
|
||||||
gender: genre
|
gender: genre
|
||||||
|
Gender comment: Remarque sur le genre
|
||||||
'Creation date': 'Date d''ouverture'
|
'Creation date': 'Date d''ouverture'
|
||||||
'Not given': 'Non renseigné'
|
'Not given': 'Non renseigné'
|
||||||
'Place of birth': 'Lieu de naissance'
|
'Place of birth': 'Lieu de naissance'
|
||||||
@ -39,6 +40,7 @@ Comment on the marital status: Commentaires sur l'état civil
|
|||||||
'National number': 'Numéro national'
|
'National number': 'Numéro national'
|
||||||
Email: 'Courrier électronique'
|
Email: 'Courrier électronique'
|
||||||
Accept emails ?: Accepte les courriels?
|
Accept emails ?: Accepte les courriels?
|
||||||
|
Accept emails: Peut être contacté par email
|
||||||
Address: Adresse
|
Address: Adresse
|
||||||
Memo: Mémo
|
Memo: Mémo
|
||||||
Phonenumber: 'Numéro de téléphone'
|
Phonenumber: 'Numéro de téléphone'
|
||||||
@ -46,6 +48,7 @@ phonenumber: numéro de téléphone
|
|||||||
Mobilenumber: 'Numéro de téléphone portable'
|
Mobilenumber: 'Numéro de téléphone portable'
|
||||||
mobilenumber: numéro de téléphone portable
|
mobilenumber: numéro de téléphone portable
|
||||||
Accept short text message ?: Accepte les SMS?
|
Accept short text message ?: Accepte les SMS?
|
||||||
|
Accept short text message: Accepte les SMS
|
||||||
Other phonenumber: Autre numéro de téléphone
|
Other phonenumber: Autre numéro de téléphone
|
||||||
Description: description
|
Description: description
|
||||||
Add new phone: Ajouter un numéro de téléphone
|
Add new phone: Ajouter un numéro de téléphone
|
||||||
|
Loading…
x
Reference in New Issue
Block a user