<ul class="calendar-mini-events-list">
{% for index,event in events %}
{% if index < _widget.limit|default(3) %}
{% set dts = event|cms_calendar_span({}) %}
<li class="calendar-mini-event">
<div class="calendar-mini-event-title">
<a href="{{ moduleItemUrl(event) }}">{{ event.data.title }}</a>
</div>
<p class="calendar-mini-event-meta">{{ today|cms_date }} {% if dts.startTime is not empty %}{{ dts.startTime }}{% endif %}</p>
{% set bdy = cms_abstract(event.data.abstract, event.data.description) %}
{% if bdy is not empty %}
<p class="calendar-mini-event-teaser">{{ bdy }}</p>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
{% if events|length > _widget.limit|default(3) %}
{% if _widget.linkText is not empty %}
<a href="{{ cms_path_prefix(containers) }}/calendar" class="csw-view-more">{{ _widget.linkText }}</a>
{% endif %}
{% endif %}