54 lines
2.1 KiB
Twig
54 lines
2.1 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 stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %}
|
|
{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %}
|
|
|
|
{% set color = app.session.get('color') %}
|
|
{% set colorbodyback = entity.colorbodyback %}
|
|
{% if colorbodyback is null %}
|
|
{% set colorbodyback = color['main'] %}
|
|
{% endif %}
|
|
|
|
{% set colorbodyfont = entity.colorbodyfont %}
|
|
{% if colorbodyfont is null %}
|
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
|
{% endif %}
|
|
|
|
<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 %}
|
|
|
|
|
|
{% if onheader %}
|
|
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
|
<iframe src="{{ path(tool,{'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" style="margin-top:30px" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
|
</div>
|
|
{% else %}
|
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
|
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" />
|
|
<span class="title">{{ entity.name }}</span>
|
|
</div>
|
|
|
|
<div class="widgetbody" style="{{ stylewidgetbodyframe }}">
|
|
<iframe src="{{ path(tool) }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<script>
|
|
|
|
</script>
|
|
|