{% extends "base.html.twig" %}
{% block title %}Détails{% endblock %}
{% if event.brand.baseInformation.slug != 'isen-lille' %}
{% set visible = true %}
{% else %}
{% set visible = false %}
{% endif %}
{% if edit is defined and edit %}
{% form_theme form with 'User/partial/_formThemeOrganisation.html.twig' %}
{% endif %}
{% block body_class %}logged{% endblock %}
{% block body %}
{% if edit is defined and edit %}
{{ form_start(form) }}
{{ form_errors(form) }}
{% endif %}
<div class="event-view grid-container">
{% if edit is defined and edit %}
{% include 'Event/Partials/View/content_edit.html.twig' %}
{% else %}
{% include 'Event/Partials/View/content_view.html.twig' %}
{% endif %}
{% if eventList is defined %}
<br /><br />
<div class="grid-x align-center">
<div class="cell large-12">
{% for eventArray in eventList %}
<div class="sub-event">
<button id="title-{{ eventArray.event.id }}" class="button-event sub-event__title">
<div class="grid-x align-middle grid-margin-x">
<div class="cell auto">
<h4>
{% if eventArray.event.characteristic %}
{{ eventArray.event.characteristic.baseInformation.name }} :
{% endif %}
{{ eventArray.event.baseInformation.name }}
</h4>
{% if event.eventDate %}
{{ eventArray.event.eventDate | format_datetime(pattern='EEEE d/M/Y HH:mm', locale=app.request.locale) |capitalize }}
{% endif %}
{% if eventArray.event.eventEndDate %}
- {{ eventArray.event.eventEndDate | format_datetime(pattern='EEEE d/M/Y HH:mm', locale=app.request.locale) |capitalize }}
{% endif %}
</div>
<div class="cell shrink">
<i class="icon icon-chevron-right"></i>
</div>
</div>
</button>
<div id="content-{{ eventArray.event.id }}" style="display: none;" class="sub-event__content">
<div class="boxed">
{% include 'Event/Partials/View/content_view.html.twig' with eventArray %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if
(accountantUsers is defined and accountantUsers | length) or
(event.cmsDescription is not null and event.cmsDescription.content is not null) or
(event.cmsOrganisation is not null and event.cmsOrganisation.content is not null)
%}
<div class="grid-x grid-margin-y align-center">
<div class="medium-6 cell export-event">
<div class="button-dropdown">
<button class="button" type="button" data-toggle="pdf-dropdown">
<i class="icon icon-pdf"></i>
Exporter en PDF
</button>
<div class="dropdown-pane" id="pdf-dropdown" data-dropdown data-hover="true" data-hover-pane="true">
<ul>
{% if accountantUsers is defined and accountantUsers | length %}
<li>
<a href="{{ path(type ~ '_export_pdf', {id: event.id, pdfParts: 'accountantUsers'}) }}">Membres validés</a>
</li>
{% endif %}
{% if
(event.cmsDescription is not null and event.cmsDescription.content is not null) or
(event.cmsOrganisation is not null and event.cmsOrganisation.content is not null)
%}
<li>
<a href="{{ path(type ~ '_export_pdf', {id: event.id, pdfParts: 'description'}) }}">Description</a>
</li>
{% endif %}
<li>
<a href="{{ path(type ~ '_export_pdf', {id: event.id, pdfParts: 'full'}) }}">Fiche complète</a>
</li>
</ul>
</div>
</div>
</div>
</div>
{% endif %}
{% set memberShow = false %}
{% if
(edit is not defined or not edit) and
viewFilter and
(event.postIntendeds | length or event.postPrevisions | length or event.userFinalSubscribes | length)
%}
{% if not memberShow %}
<h1>{{ 'app.planning.member_list' | trans | capitalize }}</h1>
{% set memberShow = true %}
{% endif %}
{% include 'Event/Partials/View/post_view.html.twig' %}
{% endif %}
{% if eventList is defined %}
{% for eventArray in eventList %}
{% if
eventArray.canEdit and
(eventArray.event.postIntendeds | length or eventArray.event.postPrevisions | length or eventArray.event.userFinalSubscribes | length)
%}
{% if not memberShow %}
<hr>
<h1>{{ 'app.planning.member_list' | trans | capitalize }}</h1>
{% set memberShow = true %}
{% endif %}
<div class="boxed">
<div class="sub-event">
<div class="sub-event__title">
<h4>
{% if eventArray.event.characteristic %}
{{ eventArray.event.characteristic.baseInformation.name }} :
{% endif %}
{{ eventArray.event.baseInformation.name }}
</h4>
{% if event.eventDate %}
{{ eventArray.event.eventDate | format_datetime(pattern='EEEE d/M/Y HH:mm', locale=app.request.locale) |capitalize }}
{% endif %}
{% if eventArray.event.eventEndDate %}
- {{ eventArray.event.eventEndDate | format_datetime(pattern='EEEE d/M/Y HH:mm', locale=app.request.locale) |capitalize }}
{% endif %}
</div>
</div>
{% include 'Event/Partials/View/post_view.html.twig' with eventArray %}
</div>
{% endif %}
{% endfor %}
{% endif %}
</div>
{% if edit is defined and edit %}
{{ form_rest(form) }}
{{ form_end(form) }}
{% endif %}
{% endblock %}
{% block jsspecifique %}
<script src="{{ asset('build/js/cms_organisation.js') }}"></script>
<script src="{{ asset('build/js/event.js') }}"></script>
{% endblock %}