templates/Event/view.html.twig line 1

Open in your IDE?
  1. {% extends "base.html.twig" %}
  2. {% block title %}Détails{% endblock %}
  3. {% if event.brand.baseInformation.slug != 'isen-lille' %}
  4.     {% set visible = true %}
  5. {% else %}
  6.     {% set visible = false %}
  7. {% endif %}
  8. {% if edit is defined and edit %}
  9.     {% form_theme form with 'User/partial/_formThemeOrganisation.html.twig' %}
  10. {% endif %}
  11. {% block body_class %}logged{% endblock %}
  12. {% block body %}
  13.     {% if edit is defined and edit %}
  14.         {{ form_start(form) }}
  15.         {{ form_errors(form) }}
  16.     {% endif %}
  17.     <div class="event-view grid-container">
  18.         {% if edit is defined and edit %}
  19.             {% include 'Event/Partials/View/content_edit.html.twig' %}
  20.         {% else %}
  21.             {% include 'Event/Partials/View/content_view.html.twig' %}
  22.         {% endif %}
  23.         {% if eventList is defined %}
  24.             <br /><br />
  25.             <div class="grid-x align-center">
  26.                 <div class="cell large-12">
  27.                     {% for eventArray in eventList %}
  28.                         <div class="sub-event">
  29.                             <button id="title-{{ eventArray.event.id }}" class="button-event sub-event__title">
  30.                                 <div class="grid-x align-middle grid-margin-x">
  31.                                     <div class="cell auto">
  32.                                         <h4>
  33.                                             {% if eventArray.event.characteristic %}
  34.                                                 {{ eventArray.event.characteristic.baseInformation.name }} :
  35.                                             {% endif %}
  36.                                             {{ eventArray.event.baseInformation.name }}
  37.                                         </h4>
  38.                                         {% if event.eventDate %}
  39.                                             {{ eventArray.event.eventDate | format_datetime(pattern='EEEE d/M/Y HH:mm', locale=app.request.locale) |capitalize }}
  40.                                         {% endif %}
  41.                                         {% if eventArray.event.eventEndDate %}
  42.                                             - {{ eventArray.event.eventEndDate | format_datetime(pattern='EEEE d/M/Y HH:mm', locale=app.request.locale) |capitalize }}
  43.                                         {% endif %}
  44.                                     </div>
  45.                                     <div class="cell shrink">
  46.                                         <i class="icon icon-chevron-right"></i>
  47.                                     </div>
  48.                                 </div>
  49.                             </button>
  50.                             <div id="content-{{ eventArray.event.id }}" style="display: none;" class="sub-event__content">
  51.                                 <div class="boxed">
  52.                                     {% include 'Event/Partials/View/content_view.html.twig' with eventArray %}
  53.                                 </div>
  54.                             </div>
  55.                         </div>
  56.                     {% endfor %}
  57.                 </div>
  58.             </div>
  59.         {% endif %}
  60.         {% if
  61.             (accountantUsers is defined and accountantUsers | length) or
  62.             (event.cmsDescription is not null and event.cmsDescription.content is not null) or
  63.             (event.cmsOrganisation is not null and event.cmsOrganisation.content is not null)
  64.         %}
  65.             <div class="grid-x grid-margin-y align-center">
  66.                 <div class="medium-6 cell export-event">
  67.                     <div class="button-dropdown">
  68.                         <button class="button" type="button" data-toggle="pdf-dropdown">
  69.                             <i class="icon icon-pdf"></i>
  70.                             Exporter en PDF
  71.                         </button>
  72.                         <div class="dropdown-pane" id="pdf-dropdown" data-dropdown data-hover="true" data-hover-pane="true">
  73.                             <ul>
  74.                                 {% if accountantUsers is defined and accountantUsers | length %}
  75.                                     <li>
  76.                                         <a href="{{ path(type ~ '_export_pdf', {id: event.id, pdfParts: 'accountantUsers'}) }}">Membres validés</a>
  77.                                     </li>
  78.                                 {% endif %}
  79.                                 {% if
  80.                                     (event.cmsDescription is not null and event.cmsDescription.content is not null) or
  81.                                     (event.cmsOrganisation is not null and event.cmsOrganisation.content is not null)
  82.                                 %}
  83.                                     <li>
  84.                                         <a href="{{ path(type ~ '_export_pdf', {id: event.id, pdfParts: 'description'}) }}">Description</a>
  85.                                     </li>
  86.                                 {% endif %}
  87.                                 <li>
  88.                                     <a href="{{ path(type ~ '_export_pdf', {id: event.id, pdfParts: 'full'}) }}">Fiche complète</a>
  89.                                 </li>
  90.                             </ul>
  91.                         </div>
  92.                     </div>
  93.                 </div>
  94.             </div>
  95.         {% endif %}
  96.         {% set memberShow = false %}
  97.         {% if
  98.             (edit is not defined or not edit) and
  99.             viewFilter and
  100.             (event.postIntendeds | length or event.postPrevisions | length or event.userFinalSubscribes | length)
  101.         %}
  102.             {% if not memberShow %}
  103.                 <h1>{{ 'app.planning.member_list' | trans | capitalize }}</h1>
  104.                 {% set memberShow = true %}
  105.             {% endif %}
  106.             {% include 'Event/Partials/View/post_view.html.twig' %}
  107.         {% endif %}
  108.         {% if eventList is defined %}
  109.             {% for eventArray in eventList %}
  110.                 {% if
  111.                     eventArray.canEdit and
  112.                     (eventArray.event.postIntendeds | length or eventArray.event.postPrevisions | length or eventArray.event.userFinalSubscribes | length)
  113.                 %}
  114.                     {% if not memberShow %}
  115.                         <hr>
  116.                         <h1>{{ 'app.planning.member_list' | trans | capitalize }}</h1>
  117.                         {% set memberShow = true %}
  118.                     {% endif %}
  119.                     <div class="boxed">
  120.                         <div class="sub-event">
  121.                             <div class="sub-event__title">
  122.                                 <h4>
  123.                                     {% if eventArray.event.characteristic %}
  124.                                         {{ eventArray.event.characteristic.baseInformation.name }} :
  125.                                     {% endif %}
  126.                                     {{ eventArray.event.baseInformation.name }}
  127.                                 </h4>
  128.                                 {% if event.eventDate %}
  129.                                     {{ eventArray.event.eventDate | format_datetime(pattern='EEEE d/M/Y HH:mm', locale=app.request.locale) |capitalize }}
  130.                                 {% endif %}
  131.                                 {% if eventArray.event.eventEndDate %}
  132.                                     - {{ eventArray.event.eventEndDate | format_datetime(pattern='EEEE d/M/Y HH:mm', locale=app.request.locale) |capitalize }}
  133.                                 {% endif %}
  134.                             </div>
  135.                         </div>
  136.                         {% include 'Event/Partials/View/post_view.html.twig' with eventArray %}
  137.                     </div>
  138.                 {% endif %}
  139.             {% endfor %}
  140.         {% endif %}
  141.     </div>
  142.     {% if edit is defined and edit %}
  143.         {{ form_rest(form) }}
  144.         {{ form_end(form) }}
  145.     {% endif %}
  146. {% endblock %}
  147. {% block jsspecifique %}
  148.     <script src="{{ asset('build/js/cms_organisation.js') }}"></script>
  149.     <script src="{{ asset('build/js/event.js') }}"></script>
  150. {% endblock %}