{% extends '@ChillEvent/layout.html.twig' %} {% block title 'Event : %label%'|trans({ '%label%' : event.name } ) %} {% import 'ChillPersonBundle:Person:macro.html.twig' as person_macro %} {% block event_content -%}

{{ 'Details of an event'|trans }}

{{ 'Name'|trans }} {{ event.name }}
{{ 'Date'|trans }} {{ event.date|format_date('long') }}
{{ 'Event type'|trans }} {{ event.type.name|localize_translatable_string }}
{{ 'Circle'|trans }} {{ event.circle.name|localize_translatable_string }}
{{ 'Moderator'|trans }} {{ event.moderator|trans|default('-') }}

{{ 'Participations'|trans }}

{% set count = event.participations|length %}

{% transchoice count %}%count% participations to this event{% endtranschoice %}

{% if count > 0 %} {% for participation in event.participations %} {% endfor %}
{{ 'Person'|trans }} {{ 'Role'|trans }} {{ 'Status'|trans }} {{ 'Last update'|trans }}  
{{ person_macro.render(participation.person) }} {{ participation.role.name|localize_translatable_string }} {{ participation.status.name|localize_translatable_string }} {{ participation.lastUpdate|ago }} {# sf4 check: filter 'time_diff' is abandoned, alternative: knplabs/knp-time-bundle provide filter 'ago' #}
    {% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}
  • {% endif %}
{% endif %}
{{ form_start(form_add_participation_by_person) }}
{{ form_widget(form_add_participation_by_person.person_id, { 'attr' : { 'class' : 'custom-select', 'style': 'min-width: 15em; max-width: 18em; display: inline-block;' }} ) }}
{{ form_widget(form_add_participation_by_person.submit, { 'attr' : { 'class' : 'btn btn-create' } } ) }}
{{ form_rest(form_add_participation_by_person) }} {{ form_end(form_add_participation_by_person) }}
{{ form_start(form_export, {'attr': {'id': 'export_tableur'}}) }}
{{ form_widget(form_export.format, { 'attr' : { 'class': 'custom-select' } }) }}
{{ form_widget(form_export.submit, { 'attr' : { 'class': 'btn btn-save' } }) }}
{{ form_rest(form_export) }} {{ form_end(form_export) }}
{{ chill_delegated_block('block_footer_show', { 'event': event }) }}
{% endblock %}