missing comment fields on person details page

This commit is contained in:
Mathieu Jaumotte 2021-07-31 14:49:01 +02:00
parent 8c06014ea5
commit 360322bdbf
3 changed files with 60 additions and 15 deletions

View File

@ -22,6 +22,11 @@ form {
}
}
// customfields titles in form
span.cf-title {
@include title_in_form;
}
label {
display: inline;
&.required:after {

View File

@ -41,11 +41,9 @@ This view should receive those arguments:
<div class="col-12">
<figure class="person-details">
<h2 class="chill-red">{{ 'Memo'|trans }}</h2>
<div class="chill-user-quote">
{{ person.memo|chill_markdown_to_html }}
</div>
</figure>
</div>
{% endif %}
@ -68,6 +66,7 @@ This view should receive those arguments:
<dt>{{ 'Gender'|trans }}&nbsp;:</dt>
<dd>{{ ( person.gender|default('Not given'))|trans }}</dd>
</dl>
</figure>
</div>
@ -93,6 +92,7 @@ This view should receive those arguments:
<dd><span class="chill-no-data-statement">{{ 'Not given'|trans }}</span></dd>
{% endif %}
{%- endif -%}
{%- if chill_person.fields.country_of_birth == 'visible' -%}
<dt>{{ 'Country of birth'|trans }}&nbsp;:</dt>
<dd>{% apply spaceless %}
@ -106,6 +106,17 @@ This view should receive those arguments:
</dl>
</figure>
</div>
{% if person.genderComment is not empty %}
<div class="col-12">
<figure class="person-details">
<h2 class="chill-beige">{{ 'Gender comment'|trans }}&nbsp;:</h2>
<div class="chill-user-quote">
{{ person.genderComment.comment|chill_markdown_to_html }}
</div>
</figure>
</div>
{% endif %}
</div>
<div class="row">
@ -116,14 +127,14 @@ This view should receive those arguments:
{%- if chill_person.fields.nationality == 'visible' -%}
<dl>
<dt>{{ 'Nationality'|trans }}&nbsp;:</dt>
<dd>
{% if person.nationality is not null %}
{{ person.nationality.name|localize_translatable_string }}
{% else %}
<span class="chill-no-data-statement">{{ 'Without nationality'|trans }}</span>
{% endif %}
</dd>
<dt>{{ 'Nationality'|trans }}&nbsp;:</dt>
<dd>
{% if person.nationality is not null %}
{{ person.nationality.name|localize_translatable_string }}
{% else %}
<span class="chill-no-data-statement">{{ 'Without nationality'|trans }}</span>
{% endif %}
</dd>
</dl>
{%- endif -%}
{%- if chill_person.fields.spoken_languages == 'visible' -%}
@ -150,6 +161,15 @@ This view should receive those arguments:
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %}
</dd>
{% if person.maritalStatusComment is not empty %}
<dt>{{ 'Comment on the marital status'|trans }}&nbsp;:</dt>
<dd>
<blockquote class="chill-user-quote">
{{ person.maritalStatusComment.comment|chill_markdown_to_html }}
</blockquote>
</dd>
{% endif %}
</dl>
{%- endif -%}
</figure>
@ -201,35 +221,55 @@ This view should receive those arguments:
</dl>
{%- endif -%}
{%- if chill_person.fields.email == 'visible' -%}
<dl>
<dt>{{ 'Email'|trans }}&nbsp;:</dt>
<dd>{% if person.email is not empty %}<blockquote class="chill-user-quote">{{ person.email|nl2br }}</blockquote>{% 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 }}" class="email">{{ person.email|nl2br }}</a>
{% else %}
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %}
</dd>
</dl>
{%- endif -%}
{%- if chill_person.fields.phonenumber == 'visible' -%}
<dl>
<dt>{{ 'Phonenumber'|trans }}&nbsp;:</dt>
<dd>{% if person.phonenumber is not empty %}<a href="tel:{{ person.phonenumber }}"><pre>{{ person.phonenumber|chill_format_phonenumber }}</pre></a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
</dl>
{% endif %}
{%- if chill_person.fields.mobilenumber == 'visible' -%}
<dl>
<dt>{{ 'Mobilenumber'|trans }}&nbsp;:</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>
</dl>
{% endif %}
{# TODO
display collection of others phonenumbers
#}
{%- if chill_person.fields.contact_info == 'visible' -%}
<dl>
<dt>{{ 'Notes on contact information'|trans }}&nbsp;:</dt>
<dd>{% if person.contactInfo is not empty %}{{ person.contactInfo|nl2br }}{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
<dd>
{% if person.contactInfo is not empty %}
<blockquote class="chill-user-quote">
{{ person.contactInfo|chill_markdown_to_html }}
</blockquote>
{% else %}
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %}
</dd>
</dl>
{%- endif -%}
</figure>
</div>
{%- endif -%}
</div>
{% if cFGroup and (cFGroup.getActiveCustomFields|length > 0) %}

View File

@ -23,7 +23,7 @@ nationality: nationalité
'Without nationality': 'Sans nationalité'
Gender: Genre
gender: genre
Gender comment: Remarque sur le genre
Gender comment: Remarques sur le genre
'Creation date': 'Date d''ouverture'
'Not given': 'Non renseigné'
'Place of birth': 'Lieu de naissance'
@ -34,7 +34,7 @@ countryOfBirth: 'Pays de naissance'
'Unknown country of birth': 'Pays inconnu'
'Marital status': 'État civil'
Date of last marital status change: État civil depuis le
Comment on the marital status: Commentaires sur l'état civil
Comment on the marital status: Remarques sur l'état civil
'Number of children': 'Nombre d''enfants'
'{0} No child|{1} One child | ]1,Inf] %nb% children': '{0} Aucun enfant|{1} Un enfant | ]1,Inf] %nb% enfants'
'National number': 'Numéro national'