diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig index e12037cd2..d87b33a2b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig @@ -1,4 +1,5 @@ {% extends 'ChillPersonBundle:AccompanyingCourse:layout.html.twig' %} +{% import '@ChillMain/Address/macro.html.twig' as address %} {% block title %} {{ 'Resume Accompanying Course'|trans }} @@ -6,23 +7,113 @@ {% block content %} - {% if 'DRAFT' == accompanyingCourse.step %} -
- - {{ 'This accompanying course is still a draft'|trans }} - - {{ 'Edit & activate accompanying course'|trans }} - - -
- {% endif %} + {% if 'DRAFT' == accompanyingCourse.step %} +
+ + {{ 'This accompanying course is still a draft'|trans }} + + {{ 'Edit & activate accompanying course'|trans }} + + +
+ {% endif %} -

{{ 'Associated peoples'|trans }}

+

{{ 'Associated peoples'|trans }}

-

{{ 'Resources'|trans }}

+ {% for p in accompanyingCourse.participations %} + {% if p.enddate is null %} +
+ {{ p.person.firstname ~ ' ' ~ p.person.lastname }} +
+ {{ p.person.gender == 'woman' ? 'F' : 'M' }}
+ {{ 'né le ' ~ p.person.birthdate|format_date('short') }}
-

{{ 'Social actions'|trans }}

- -

{{ 'Last events on accompanying course'|trans }}

+ {% if p.person.mobilenumber %} + {{ p.person.mobilenumber }} + {% else %} + + {% if p.person.phonenumber %} + {{ p.person.phonenumber }} + {% else %} + {{ 'No data given'|trans }} + {% endif %} + {% endif %}
+ + {%- if p.person.lastAddress is not empty -%} + {{ address._render(p.person.lastAddress, {'has_no_address': true, 'with_valid_from': false, 'with_icon': true}) }} + {%- else -%} + + {{ 'No address given'|trans }} + {%- endif -%} + + + {% endif %} + {% endfor %} + +

{{ 'Resources'|trans }}

+ + {% for r in accompanyingCourse.resources %} + {% if r.person %} +
+ {{ r.person.firstname ~ ' ' ~ r.person.lastname }} + {{ 'Usager' }} +
+ {{ r.person.gender == 'woman' ? 'F' : 'M' }}
+ {{ 'né le ' ~ r.person.birthdate|format_date('short') }}
+ + {% if r.person.mobilenumber %} + {{ r.person.mobilenumber }} + {% else %} + + {% if r.person.phonenumber %} + {{ r.person.phonenumber }} + {% else %} + {{ 'No data given'|trans }} + {% endif %} + {% endif %}
+ + {%- if r.person.lastAddress is not empty -%} + {{ address._render(r.person.lastAddress, {'has_no_address': true, 'with_valid_from': false, 'with_icon': true}) }} + {%- else -%} + + {{ 'No address given'|trans }} + {%- endif -%} + + + {% endif %} + + {% if r.thirdParty %} +
+ {{ r.thirdParty.name }} + {{ 'Tiers' }} +
+ {{ r.thirdParty.telephone|chill_print_or_message("thirdparty.No_phonenumber") }}
+ {{ r.thirdParty.email|chill_print_or_message("thirdparty.No_email") }}
+ + {% if r.thirdParty.address == null %} + {{ 'No address given'|trans }} + {% else %} + {{ address._render(r.thirdParty.address, {'with_valid_from': false, 'with_icon': true }) }} + {% endif %} + + + {% endif %} + {% endfor %} + +

{{ 'Social actions'|trans }}

+ +

{{ 'Last events on accompanying course'|trans }}

{% endblock %}