{% 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')) %}
<div class="col-md-3 col-6 demi-event-overview-teaser-list__item">
<div class="demi-event-teaser-grid row--same-height__item isClickable">
<div class="demi-event-teaser-grid__img">
<div class="embed-responsive embed-responsive-1by1">
{% if event.getFirstImage() is instanceof("\\Pimcore\\Model\\Asset\\Image") %}
{{ event.getFirstImage().getThumbnail('demi-event-teaser').getHTML({'imgAttributes': {
'class' : 'embed-responsive-item'
}}) | raw }}
{% endif %}
</div>
</div>
<div class="demi-event-teaser-grid__body">
<h3 class="demi-event-teaser-grid__title">
<a href="{{ event.class.getLinkgenerator().generate(event, {reset:true, document:document, language: app.request.locale}) }}" title="{{ 'demi.events.next' | trans }}: {{ event.getName() }}" target="_self">
{{ event.getName() }}
</a>
</h3>
{% if event.getTowns()[0] is defined %}
<div class="flatrate-teaser__location">
<span class="icon icon-pin-regions mr-1" arial-label="location" title="location"></span>
{{ event.towns[0].name }}
</div>
{% endif %}
{% set dateAndTimes = demi_core_eventGetDatesAndTimes(event) %}
{% if dateAndTimes.dates is defined and dateAndTimes.dates is not empty%}
<div class="demi-event-teaser-grid__dates">
{{ dateAndTimes.dates }}
</div>
{% if dateAndTimes.times %}
<div class="demi-event-teaser-grid__dates mt-5">
{{ dateAndTimes.times }}
</div>
{% endif %}
{% endif %}
<div class="wysiwyg">
{% if shortDesc %}
{{ (elements_cutStringRespectingWhitespace(shortDesc, 120))|raw }}<br>
{% endif %}
</div>
<span class="demi-event-teaser-grid__btn btn btn-primary">{{ 'demi.events.next' | trans }}</span>
</div>
</div>
</div>