diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig index e69de29bb..10c0e0bc7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig @@ -0,0 +1,178 @@ +

{{ title|default('Person search results')|trans }}

+ +

+ {{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }} + + {{ pattern }} + +

+ +

{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}

+ + + + +{% if persons|length > 0 %} + +
+ {% for person in persons %} + +
+
+ +
+
{{ person|chill_entity_render_box({'addLink': true}) }}
+
{{ 'Born the %date%'|transchoice(person.genderNumeric, { '%date%': person.birthdate|format_date("medium") }) }}
+
+ +
+
    +
  • + {{ person.center }} +
  • + +
  • + {% if person.mobilenumber is not empty %} + {{ person.mobilenumber|chill_format_phonenumber }} + {% else %} + + {% if person.phonenumber is not empty %} + {{ person.phonenumber|chill_format_phonenumber }} + {% else %} + {{ 'No data given'|trans }} + {% endif %} + {% endif %} +
  • + +
  • + + {% if person.getLastAddress is not null %} + {{ person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }} + {% else %} + {{ 'No address'|trans }} + {% endif %} +
  • + +
+ +
+ +
+ + {#- 'apps' is for AccompanyingPeriodParticipationS #} + {#- filter using acl -#} + {%- set apps = [] %} + {%- for app in person.openedParticipations %} + {%- if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', app.accompanyingPeriod) %} + {%- set apps = apps|merge([app]) %} + {%- endif %} + {%- endfor %} + + {% if apps|length > 0 %} + {% for app in apps %} +
+ +
+ + + + {{ 'Since %date%'|trans({'%date%': app.startDate|format_date('medium') }) }} + {% if app.accompanyingPeriod.user is not null %} + + ref: + {{ app.accompanyingPeriod.user|chill_entity_render_box }} + + {% endif %} +
+ +
+ {% for issue in app.accompanyingPeriod.socialIssues|slice(0,2) %} + {{ issue|chill_entity_render_box }} + {% endfor %} + + {% if app.accompanyingPeriod.socialIssues|length > 2 %} + {{ 'and %number% other'|transchoice(app.accompanyingPeriod.socialIssues|length-2) }} + {% endif %} +
+ +
+ {% endfor %} + + {% endif %} + +
+ + {% endfor %} +
+ + + +{% else %} + +{% endif %} + +{% if preview == false %} + {{ chill_pagination(paginator) }} +{% endif %}