49 lines
1.7 KiB
Twig
49 lines
1.7 KiB
Twig
{% set theme = app.session.get('theme') %}
|
|
{% if theme is not empty %}
|
|
{{ include('@Theme/'~theme~'/function.html.twig') }}
|
|
{% endif %}
|
|
|
|
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
|
|
|
|
{% set stylewidget = constants.mystylewidget(entity) %}
|
|
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
|
|
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
|
|
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
|
|
|
|
|
|
|
|
<div class="widget {%if entity.border %} widget-bordered {%endif%}" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
|
{% if canupdate %}
|
|
<div class="widgetmenu">
|
|
<i class="fa fa-trash fa-fw" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
|
<i class="fa fa-file fa-fw" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
|
|
<span class="title">{{ entity.name }}</span>
|
|
</div>
|
|
|
|
<div class="widgetbody" style="{{ stylewidgetbody }}">
|
|
{% for alert in alerts %}
|
|
<div class="panel list-item" style="background: {{ alert.alertcategory.color }};">
|
|
<div class="panel-heading" role="tab">
|
|
<i class="fa fa-fw {{ alert.alertcategory.icon }}"></i>
|
|
{{ alert.title }}
|
|
</div>
|
|
|
|
<div id="alert-{{ alert.id }}" class="panel-body">
|
|
{{ alert.content|raw }}
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|