76 lines
3.9 KiB
Twig
76 lines
3.9 KiB
Twig
|
{% import "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) %}
|
||
|
{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %}
|
||
|
{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %}
|
||
|
|
||
|
{% set colorbodyback = entity.colorbodyback %}
|
||
|
{% if colorbodyback is null %}
|
||
|
{% set colorbodyback = app.session.get('colorbgbodydark') %}
|
||
|
{% endif %}
|
||
|
|
||
|
{% set colorbodyfont = entity.colorbodyfont %}
|
||
|
{% if colorbodyfont is null %}
|
||
|
{% set colorbodyfont = app.session.get('colorfttitledark') %}
|
||
|
{% endif %}
|
||
|
{% set colorbody = app.session.get('colorbgbodylight') %}
|
||
|
{% set colormain = app.session.get('colorbgbodydark') %}
|
||
|
|
||
|
{% if app.user %}
|
||
|
<style>.msgtopic a { color: #{{colorbodyfont}}; font-weight: bold; }</style>
|
||
|
|
||
|
{%if mini %}
|
||
|
<div class="widget widget-mini widget-chat" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
|
||
|
<div class="widgetheader">
|
||
|
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
|
||
|
{% if entity.icon %}
|
||
|
<img src="/{{ appAlias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
|
||
|
{% else %}
|
||
|
<img src="/{{ appAlias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
|
||
|
{% endif %}
|
||
|
</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% else %}
|
||
|
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-chat" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
|
||
|
<div class="widgetmenu">
|
||
|
{% if canupdate %}
|
||
|
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||
|
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||
|
{% endif %}
|
||
|
{% if look=="list" %}
|
||
|
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||
|
{% else %}
|
||
|
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
{% if onheader %}
|
||
|
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||
|
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain}) }}" style="margin-top:30px" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
||
|
</div>
|
||
|
{% else %}
|
||
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||
|
{% if entity.icon %}
|
||
|
<img src="/{{ appAlias }}/{{ entity.icon.label }}" class="logo"/>
|
||
|
{% else %}
|
||
|
<img src="/{{ appAlias }}/uploads/icon/icon_pin.png" class="logo"/>
|
||
|
{% endif %}
|
||
|
<span class="title">{{ entity.name }}</span>
|
||
|
</div>
|
||
|
|
||
|
<div class="widgetbody" style="{{ stylewidgetbody }}; overflow-y:auto; {%if entity.border %} padding-left: 10px; {%endif%}">
|
||
|
{% if group is not null %}
|
||
|
{{ render(url('app_message_chat',{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain})) }}
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
|
||
|
{%endif%}
|