From 9b52fa562e6c7438111f36a95df54bc4f90ddbf7 Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Wed, 26 Nov 2014 13:29:00 +0100 Subject: [PATCH] Adding spokenLanguages into views close #356 --- Resources/translations/messages.fr.yml | 1 + Resources/views/Person/edit.html.twig | 1 + Resources/views/Person/view.html.twig | 8 ++++++++ Resources/views/layout.html.twig | 6 ++++++ 4 files changed, 16 insertions(+) diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index 3f11beeaf..71e824002 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -22,6 +22,7 @@ 'Memo': Mémo 'Phonenumber': Numéro de téléphone '{0} Born the %date% | {1} Born the %date%': '{0} Né le %date% | {1} Née le %date%' +'Spoken languages': Langues parlées #Gender 'Male': Homme diff --git a/Resources/views/Person/edit.html.twig b/Resources/views/Person/edit.html.twig index 33d74c1ca..c93fd2352 100644 --- a/Resources/views/Person/edit.html.twig +++ b/Resources/views/Person/edit.html.twig @@ -43,6 +43,7 @@

{{ 'Administrative information'|trans }}

{{ form_row(form.nationality, { 'label' : 'Nationality'|trans} ) }} + {{ form_row(form.spokenLanguages, {'label' : 'Spoken languages'}) }}
diff --git a/Resources/views/Person/view.html.twig b/Resources/views/Person/view.html.twig index ac69385ce..33024f37a 100644 --- a/Resources/views/Person/view.html.twig +++ b/Resources/views/Person/view.html.twig @@ -93,6 +93,14 @@ This view should receive those arguments: {% endif %} +
+
{{'Spoken languages'|trans}}
+
+ {% for lang in person.spokenLanguages %} + {{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %} + {% endfor %} +
+
{{ include(edit_tmp_name, edit_tmp_args) }} diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index b1c81ee62..38aade0ee 100644 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -53,6 +53,12 @@ {% else %}

{% trans %}Without nationality{% endtrans %}

{% endif %} + +

+ {% for lang in person.spokenLanguages %} + {{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %} + {% endfor %} +