src/Elements/Bundle/DemiFrontendBundle/Resources/views/Events/detail/additionalDescriptions.html.twig line 1

Open in your IDE?
  1. {% set hasMoreDescriptions = moreDescriptions is defined and moreDescriptions | length > 0 %}
  2. {% set hasLocalDescriptions = localDescriptions is defined and localDescriptions | length > 0 %}
  3. {% if hasMoreDescriptions or hasLocalDescriptions %}
  4. <section class="demi-event-detail-content-block demi-event-detail-content-block--contact">
  5.     <div class="container">
  6.             <div class="wysiwyg">
  7.                 {% if hasMoreDescriptions %}
  8.                     <h3 class="js-toc__title event__hl">{{ detailHeadline }}</h3>
  9.                     <div class="">
  10.                         {% for type in demi_core_eventGetSortedDescriptionTypes() | filter (type => type in moreDescriptions) %}
  11.                             {% set tk = 'demi.event.detail.' ~ demi_getValidFileName(type) %}
  12.                             <div class="my-4">
  13.                                 <h4 class="mb-2">
  14.                                     {{ tk | trans }}
  15.                                 </h4>
  16.                                 <div>
  17.                                     <div class="wysiwyg">{{ event.getDescription(type, app.request.getLocale()) | raw }}</div>
  18.                                 </div>
  19.                             </div>
  20.                         {% endfor %}
  21.                     </div>
  22.                 {% endif %}
  23.                 {% if hasLocalDescriptions %}
  24.                     <div class="">
  25.                         {% for description in localDescriptions %}
  26.                             {% set tk = ('demi.event.detail.' ~ description.getProperty("demi_descriptionType")) | lower %}
  27.                             <div class="my-4">
  28.                                 <h4 class="mb-2">
  29.                                     {{ tk | trans }}
  30.                                 </h4>
  31.                                 <div>
  32.                                     <div class="wysiwyg">{{ description.getText() | raw }}</div>
  33.                                 </div>
  34.                             </div>
  35.                         {% endfor %}
  36.                     </div>
  37.                 {% endif %}
  38.             </div>
  39.     </div>
  40. </section>
  41. {% endif %}