nineskeletor/templates/Pagewidget/viewalert.html.twig

43 lines
1.6 KiB
Twig

{% set widgetname="item" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetbody %}
{% for alert in alerts %}
{% if loop.first %}
<div class="items-list">
{% endif %}
<div class="item item-list" id="alert-{{alert.id}}" style="color:var(--colorftbodydark); background: {{ alert.alertcategory.color ? alert.alertcategory.color : 'var(--colorbgbodydark)' }};">
<div class="item-container">
<div class="item-content">
<div class="item-link">
{% if alert.alertcategory.icon %}
<img height="35" src="{{ path('app_minio_image',{file:alert.alertcategory.icon.label}) }}">
{% else %}
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_megaphone.png"}) }}">
{% endif %}
<div class="item-title">
<h3 >{{ alert.title }}</h3>
</div>
</div>
<div class="item-action">
{% if alert.fghideable and app.user %}
<a onClick="hideAlert({{alert.id}})" style="cursor:pointer;" title="Ne plus afficher"><i class="fa fa-eye-slash"></i></a>
{%endif%}
</div>
</div>
<div class="item-description">
{{ alert.content|raw }}
</div>
</div>
</div>
{% if loop.last %}
</div>
{% endif %}
{% endfor %}
{% endblock %}