{% 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 colormain = constants.mycolormain() %} {% set stylewidget = constants.mystylewidget(entity) %} {% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %} {% set stylewidgetheader = constants.mystylewidgetheader(entity) %} {% set stylewidgetbody = constants.mystylewidgetbody(entity) %} {% set color = app.session.get('color') %} {% if modedesktop==0 %} {% set stylegrid="" %} {% elseif modedesktop==1 %} {% set stylegrid="grid-medium" %} {% elseif modedesktop==2 %} {% set stylegrid="grid-small" %} {% elseif modedesktop==3 %} {% set stylegrid="grid-list" %} {% endif %} {% set colorbodyfont = "" %} {% if entity.colorbodyfont is not null %} {% set colorbodyfont = "color: #" ~ entity.colorbodyfont %} {% endif %} {% if app.user %} {% set username = app.user.username %} {% else %} {% set username = "" %} {% endif %} {%if mini %}
{% if entity.icon %} {% else %} {% endif %}
{% else %}
{% if canadd %} {% endif %} {% if canupdate %} {% endif %} {% if canadd and access!="config"%} {% endif %} {% if look=="list" %} {% else %} {% endif %}
{% if entity.icon %} {% else %} {% endif %} {{ entity.name }}
{% set mycategs = [] %} {% for itemcategory in itemcategorys %} {% set haveitem=false %} {% for item in items if item.itemcategory==itemcategory %} {% if loop.index ==1 %} {% set mycategs = mycategs|merge({ (loop.index) : itemcategory}) %} {% endif %} {% endfor %} {% endfor %} {% if menu %} {% if menuall %}
Tout
{% endif %} {% if bookmarks is not empty %}
{% endif %} {% for itemcategory in mycategs %}
{{itemcategory.label}}
{% endfor %} {% endif %} {% if search %}
{% endif %} {% if (bookmarks is not empty or (canadd and access!="config")) and withbookmark==0 %}

{{app.session.get('labelbookmarkuser')}}

{% for bookmark in bookmarks if not bookmark.item %} {%endfor%} {% if (canadd and access!="config") %}
{% endif %}
{% set haveressource=false %} {% for bookmark in bookmarks if bookmark.item %} {% if loop.first %} {% set haveressource=true %}

{{app.session.get('labelbookmarkitem')}}

{%endif%}
{% if bookmark.item.content %} {% endif %} {% if canadd %} {% endif %} {% set datasonde = "" %} {% if bookmark.item and bookmark.item.clicksonde %} {% set datasonde = "class='linktosonde' data-sondetitle='"~bookmark.item.title~"' data-sondeservice='"~bookmark.item.clicksondeservice~"'" %} {% endif %} {% if bookmark.item.target == 'frame' %} {% elseif bookmark.target == "_self" %} {% else %} {% endif %}
{%endfor%} {% if haveressource %}
{%endif%}
{% endif %} {% if (bookmarks is not empty or (canadd and access!="config")) and withbookmark==2 %}
{% for bookmark in bookmarks %} {% if bookmark.item %}
{% if bookmark.item.content %} {% endif %} {% if canadd %} {% endif %} {% set datasonde = "" %} {% if bookmark.item and bookmark.item.clicksonde %} {% set datasonde = "class='linktosonde' data-sondetitle='"~bookmark.item.title~"' data-sondeservice='"~bookmark.item.clicksondeservice~"'" %} {% endif %} {% if bookmark.item.target == 'frame' %} {% elseif bookmark.target == "_self" %} {% else %} {% endif %}
{%else%} {% endif %} {% endfor %} {% if (canadd and access!="config") %}
{% endif %}
{% endif %} {% set firstcat=true %} {% for itemcategory in mycategs %} {% set haveitem=false %} {% for item in items if item.itemcategory==itemcategory %} {% if loop.index ==1 %} {% set haveitem=true %} {% if (bookmarks is not empty or (canadd and access!="config")) and (withbookmark==0 or withbookmark==2) %} {% set toview=true %} {% if menu and not menuall%} {% set toview=false %} {% endif %} {% else %} {% if menu and not menuall%} {% if firstcat %} {% set toview=true %} {% else %} {% set toview=false %} {% endif %} {% else %} {% set toview=true %} {% endif %} {% endif %} {% set firstcat=false %} {% set style="" %} {% if not toview %} {% set style="display:none;" %} {% endif %} {% if mycategs|length > 1 or ((bookmarks is not empty or (canadd and access!="config")) and (withbookmark==0 or withbookmark==2)) %}

{{ itemcategory.label }}

{% else %}

{% endif %} {% endif %} {% endfor %}
{% endif %}