src/Elements/Bundle/DemiFrontendBundle/Resources/views/Events/includes/teaser-grid.html.twig line 1

Open in your IDE?
  1. {% set shortDesc = event.getDescription(constant('Elements\\Demi\\Deskline\\Constant\\DescriptionInterface::DESCRIPTION_EVENT_HEADER_SHORT')) ?? event.getDescription(constant('Elements\\Demi\\Deskline\\Constant\\DescriptionInterface::DESCRIPTION_EVENT_HEADER')) %}
  2. <div class="col-md-3 col-6 demi-event-overview-teaser-list__item">
  3.     <div class="demi-event-teaser-grid row--same-height__item isClickable">
  4.         <div class="demi-event-teaser-grid__img">
  5.             <div class="embed-responsive embed-responsive-1by1">
  6.                 {% if event.getFirstImage() is instanceof("\\Pimcore\\Model\\Asset\\Image") %}
  7.                    {{ event.getFirstImage().getThumbnail('demi-event-teaser').getHTML({'imgAttributes': {
  8.                        'class' : 'embed-responsive-item'
  9.                    }}) | raw }}
  10.                 {% endif %}
  11.             </div>
  12.         </div>
  13.         <div class="demi-event-teaser-grid__body">
  14.             <h3 class="demi-event-teaser-grid__title">
  15.                 <a href="{{ event.class.getLinkgenerator().generate(event, {reset:true, document:document, language: app.request.locale}) }}" title="{{ 'demi.events.next' | trans }}: {{ event.getName() }}" target="_self">
  16.                     {{ event.getName() }}
  17.                 </a>
  18.             </h3>
  19.             {% if event.getTowns()[0] is defined %}
  20.                 <div class="flatrate-teaser__location">
  21.                     <span class="icon icon-pin-regions mr-1" arial-label="location" title="location"></span>
  22.                     {{ event.towns[0].name }}
  23.                 </div>
  24.             {% endif %}
  25.             {% set dateAndTimes = demi_core_eventGetDatesAndTimes(event) %}
  26.             {% if dateAndTimes.dates is defined and dateAndTimes.dates is not empty%}
  27.             <div class="demi-event-teaser-grid__dates">
  28.                 {{ dateAndTimes.dates }}
  29.             </div>
  30.             {% if dateAndTimes.times %}
  31.                 <div class="demi-event-teaser-grid__dates mt-5">
  32.                     {{ dateAndTimes.times }}
  33.                 </div>
  34.             {% endif %}
  35.             {% endif %}
  36.             <div class="wysiwyg">
  37.                 {% if shortDesc %}
  38.                     {{ (elements_cutStringRespectingWhitespace(shortDesc, 120))|raw }}<br>
  39.                 {% endif %}
  40.             </div>
  41.             <span class="demi-event-teaser-grid__btn btn btn-primary">{{ 'demi.events.next' | trans }}</span>
  42.         </div>
  43.     </div>
  44. </div>