{% if items|length > 0 %}
<div class="cs-alert-banner">
<div class="cs-alert-banner__wrap cs-alert-banner__wrap--{{- first_of({
'informative': (items[0].data.level is same as(constant('LEVELS__INFORMATIVE', items[0].data))),
'important': (items[0].data.level is same as(constant('LEVELS__IMPORTANT', items[0].data))),
'urgent': (items[0].data.level is same as(constant('LEVELS__URGENT', items[0].data)))
}, 'informative') }}">
<div class="cs-alert-banner__content owl-carousel">
{% for item in items %}
<div class="cs-alert-banner__item cs-alert-banner__item--{{- first_of({
'informative': (item.data.level is same as(constant('LEVELS__INFORMATIVE', item.data))),
'important': (item.data.level is same as(constant('LEVELS__IMPORTANT', item.data))),
'urgent': (item.data.level is same as(constant('LEVELS__URGENT', item.data)))
}, 'informative') }} cs-owl-carousel-li">
<p class="cs-alert-banner__msg">
<a href="{{ moduleItemUrl(item) }}"{% if moduleItemLinkNewWindow(item) %} target="_blank"{% endif %}>
<span>
{%- if item.data.level is not same as(constant('LEVELS__INFORMATIVE', item.data)) %}
<img
class="cs-alert-banner__item-image"
src="{{- first_of({
(((_editor) ? _globals.pathDashboard : '')~'/ui/themes/alert-important-icon-white.svg'): (item.data.level is same as(constant('LEVELS__IMPORTANT', item.data))),
(((_editor) ? _globals.pathDashboard : '')~'/ui/themes/alert-urgent-icon-white.svg'): (item.data.level is same as(constant('LEVELS__URGENT', item.data)))
}) -}}"
alt=""
/>
{% endif -%}
{{ item.data.title }}
{% if not _editor and item in popups and app.request.cookies.has('campussuiteAccountUid') %}
<em data-popup="{{ _htmlId }}__modals__{{ item.id }}-{{ item.touchedAt|date('U') }}">(View pop-up)</em>
{% endif %}
</span>
</a>
</p>
</div>
{% endfor %}
</div>
</div>
{% if popups|length > 0 and not _editor %}
<div class="cs-alert-banner__modals">
{% for popup in popups %}
<div class="modal cs-alert-modal cs-alert-modal--{{- first_of({
'informative': (popup.data.level is same as(constant('LEVELS__INFORMATIVE', popup.data))),
'important': (popup.data.level is same as(constant('LEVELS__IMPORTANT', popup.data))),
'urgent': (popup.data.level is same as(constant('LEVELS__URGENT', popup.data)))
}, 'informative') }}" tabindex="-1" role="dialog" data-backdrop="static" data-remote="false" data-popup="{{ popup.id }}-{{ popup.touchedAt|date('U') }}" id="{{ _htmlId }}__modals__{{ popup.id }}-{{ popup.touchedAt|date('U') }}">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
{%- if popup.data.level is not same as(constant('LEVELS__INFORMATIVE', popup.data)) %}
<img
class="cs-alert-modal__image"
src="{{- first_of({
(((_editor) ? _globals.pathDashboard : '')~'/ui/themes/alert-important-icon-yellow.svg'): (popup.data.level is same as(constant('LEVELS__IMPORTANT', popup.data))),
(((_editor) ? _globals.pathDashboard : '')~'/ui/themes/alert-urgent-icon-red.svg'): (popup.data.level is same as(constant('LEVELS__URGENT', popup.data)))
}) -}}"
alt=""
/>
{% endif %}
<h1 class="modal-title">{{ popup.data.title }}</h1>
{% if _widget.popupTruncation is defined and _widget.popupTruncation <= 0 %}
{{ popup.data.content|raw }}
{% else %}
<p>
{% if popup.data.abstract is not empty %}
{{ popup.data.abstract }}
{% else %}
{{ cms_abstract(null, popup.data.content, _widget.popupTruncation|default(300)) }}
{% endif %}
</p>
<a class="cs-btn cs-btn-{{- first_of({
'informative': (popup.data.level is same as(constant('LEVELS__INFORMATIVE', popup.data))),
'important': (popup.data.level is same as(constant('LEVELS__IMPORTANT', popup.data))),
'urgent': (popup.data.level is same as(constant('LEVELS__URGENT', popup.data)))
}, 'informative') }}" data-dismiss="modal" href="{{ moduleItemUrl(popup) }}"{% if moduleItemLinkNewWindow(popup) %} target="_blank"{% endif %}>More information</a>
{% endif %}
<button type="button" class="text-link" data-dismiss="modal">Close message</button>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
{% elseif items|length == 0 and _editing %}
<div class="cs-alert-banner">
<div class="cs-alert-banner__wrap">
<div class="cs-alert-banner__content owl-carousel">
<div class="cs-alert-banner__item cs-alert-banner__item-bg--danger cs-owl-carousel-li">
<p class="cs-alert-banner__msg">
<a href="#">
<span>This is the alert banner placeholder and will not be displayed in the public view.</span>
</a>
</p>
</div>
</div>
</div>
</div>
{% endif %}