{% extends '@ChillEvent/layout.html.twig' %} {% block title 'Event : %label%'|trans({ '%label%' : event.name } ) %} {% import '@ChillPerson/Person/macro.html.twig' as person_macro %} {% block js %} {{ parent() }} {{ encore_entry_script_tags('mod_pickentity_type') }} {{ encore_entry_script_tags('mod_document_action_buttons_group') }} {% endblock %} {% block css %} {{ parent() }} {{ encore_entry_link_tags('mod_pickentity_type') }} {{ encore_entry_link_tags('mod_document_action_buttons_group') }} {% endblock %} {% macro insert_onthefly(type, entity, parent = null) %} {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { action: 'show', displayBadge: true, targetEntity: { name: type, id: entity.id }, buttonText: entity|chill_entity_render_string, isDead: entity.deathdate is defined and entity.deathdate is not null, parent: parent } %} {% endmacro %} {% block event_content -%}

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

{{ 'Circle'|trans }} {{ event.circle.name|localize_translatable_string }}
{{ 'Center'|trans }} {{ event.center.name }}
{{ 'Name'|trans }} {{ event.name }}
{{ 'Date'|trans }} {{ event.date|format_date('long') }}
{{ 'Event type'|trans }} {{ event.type.name|localize_translatable_string }}
{{ 'event.theme.label'|trans }} {% for t in event.themes %} {{ t|chill_entity_render_box }} {% endfor %}
{{ 'Moderator'|trans }} {{ event.moderator|chill_entity_render_string }}
{{ 'event.animators.intern'|trans }} {% for a in event.animatorsIntern %} {{ _self.insert_onthefly('user', a) }} {% endfor %}
{{ 'event.animators.extern'|trans }} {% for a in event.animatorsExtern %} {{ _self.insert_onthefly('thirdparty', a) }} {% endfor %}
{{ 'event.fields.location'|trans }} {% if event.location is not null %} {{ event.location.name }} {% if event.location.address is not same as(null) %}{{ event.location.address|chill_entity_render_box({'multiline': false, 'with_picto': (event.location.name is empty), 'details_button': true}) }}{% endif %} {% else %} {{ 'Any location for this event'|trans }} {% endif %}
{% set resources = event.budgetElements|filter(e => e.kind.type.value == 'Resource') %} {% set charges = event.budgetElements|filter(e => e.kind.type.value == 'Charge') %}

Budget de l'événement

Ressources

{% if resources is not empty %} {% set totalResources = 0 %} {% for res in resources %} {% set totalResources = totalResources + res.amount %} {% endfor %}
{{ 'event.budget.resource type'|trans }} {{ 'event.budget.amount'|trans }} {{ 'event.budget.comment'|trans }}
{{ res.kind.name|localize_translatable_string }} {{ res.amount|format_currency('EUR') }} {{ res.comment.comment|chill_print_or_message(null, 'blockquote') }}
Total {{ totalResources|format_currency('EUR') }}
{% else %}

{{ 'event.budget.no elements'|trans }}

{% endif %}

Charges

{% if charges is not empty %} {% set totalCharges = 0 %} {% for chg in charges %} {% set totalCharges = totalCharges + chg.amount %} {% endfor %}
{{ 'event.budget.charge type'|trans }} {{ 'event.budget.amount'|trans }} {{ 'event.budget.comment'|trans }}
{{ chg.kind.name|localize_translatable_string }} {{ chg.amount|format_currency('EUR') }} {{ chg.comment.comment|chill_print_or_message(null, 'blockquote') }}
Total {{ totalCharges|format_currency('EUR') }}
{% else %}

{{ 'event.budget.no elements'|trans }}

{% endif %}
{% if event.documents|length > 0 %}

{{ 'event.fields.documents'|trans }}

{% endif %} {% if not event.comment.empty %}
{{ event.comment|chill_entity_render_box({ 'disable_markdown': false, 'metadata': true, }) }}
{% endif %}

{{ 'Participations'|trans }}

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

{{ 'count participations to this event'|trans({'count': count}) }}

{% if count > 0 %} {% for participation in event.participations %} {% endfor %}
{{ 'Person'|trans }} {{ 'Role'|trans }} {{ 'Status'|trans }} {{ 'Last update'|trans }}  
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { targetEntity: { name: 'person', id: participation.person.id }, action: 'show', displayBadge: true, buttonText: participation.person|chill_entity_render_string, isDead: participation.person.deathdate is not null } %} {{ 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_end(form_add_participation_by_person) }}
{{ chill_delegated_block('block_footer_show', { 'event': event }) }}
{% endblock %}