Adding message when spokien languages is not specified

This commit is contained in:
Marc Ducobu
2014-11-27 14:18:45 +01:00
parent b3fb1ba662
commit 6834ebc610
3 changed files with 15 additions and 6 deletions

View File

@@ -96,9 +96,13 @@ This view should receive those arguments:
<dl>
<dt class="inline">{{'Spoken languages'|trans}}</dt>
<dd>
{% for lang in person.spokenLanguages %}
{{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %}
{% endfor %}
{% if person.spokenLanguages|length == 0 %}
{{ 'Unknown spoken languages'|trans }}
{% else %}
{% for lang in person.spokenLanguages %}
{{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
</dd>
</dl>
</figure>