person: display other phone numbers in view + translations + add message in case no others phone numbers

This commit is contained in:
nobohan
2021-11-12 11:05:56 +01:00
parent 5606b714cd
commit 24be9dbe09
3 changed files with 22 additions and 6 deletions

View File

@@ -216,13 +216,23 @@ This view should receive those arguments:
{%- 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>
<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>
</dl>
{% endif %}
{# TODO
display collection of others phonenumbers
#}
{%- if chill_person.fields.mobilenumber == 'visible' -%}
{% if person.otherPhoneNumbers is not empty %}
<dl>
<dt>{{ 'Others phone numbers'|trans }}&nbsp;:</dt>
{% for el in person.otherPhoneNumbers %}
{% if el.phonenumber is not empty %}
<dd>{% if el.description is not empty %}{{ el.description }}&nbsp;:&nbsp;{% endif %}<a href="tel:{{ el.phonenumber }}">{{ el.phonenumber|chill_format_phonenumber }}</a></dd>
{% endif %}
{% endfor %}
</ul>
</dl>
{% endif %}
{% endif %}
{%- if chill_person.fields.contact_info == 'visible' -%}
<dl>