69 lines
3.8 KiB
Twig
69 lines
3.8 KiB
Twig
{% if not inmenu %}
|
|
|
|
{% else %}
|
|
{% for groupshared in groups %}
|
|
{% if groupshared.pagesshared|length == 1 %}
|
|
{% set page = groupshared.pagesshared[0] %}
|
|
{% set forcereload=true %}
|
|
{% if page.pagecategory.id==1 %}
|
|
{% set forcereload=page.toreload %}
|
|
{% endif %}
|
|
|
|
{% set isactive="" %}
|
|
{% if entity.id is defined and page.id==entity.id %}
|
|
{% set isactive="class='active'" %}
|
|
{% endif %}
|
|
|
|
<li id="menupage-{{page.id}}" {{ isactive }} style="cursor:pointer">
|
|
<a data-group="{{groupshared.id}}" onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','group','{{forcereload}}','{{groupshared.id}}','{{page.name}}')">
|
|
{% if page.fonticon %}
|
|
<i class="{{ page.fonticon }} fa-faw"></i>
|
|
{% else %}
|
|
<i class="fa fa-users fa-fw"></i>
|
|
{% endif %}
|
|
{{ groupshared.label }}
|
|
|
|
{% if page.counterread > 0 %}
|
|
<span id="badge-{{groupshared.id}}" class="badge">{{page.counterread}}</span>
|
|
{% endif %}
|
|
</a>
|
|
</li>
|
|
{% else %}
|
|
<ul id="pagesshared" class="nav navbar-top-links navbar-left">
|
|
<li class="dropdown">
|
|
<a data-group="{{groupshared.id}}" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fa fa-users fa-fw"></i>
|
|
{{ groupshared.label }}
|
|
<span class="caret"></span>
|
|
{% if groupshared.pagesshared[0].counterread > 0 %}
|
|
<span id="badge-{{groupshared.id}}" class="badge">{{groupshared.pagesshared[0].counterread}}</span>
|
|
{% endif %}
|
|
</a>
|
|
|
|
<ul class="dropdown-menu">
|
|
{% for page in groupshared.pagesshared %}
|
|
{% set forcereload=true %}
|
|
{% if page.pagecategory.id==1 %}
|
|
{% set forcereload=page.toreload %}
|
|
{% endif %}
|
|
|
|
{% set isactive="" %}
|
|
{% if entity.id is defined and page.id==entity.id %}
|
|
{% set isactive="class='active'" %}
|
|
{% endif %}
|
|
|
|
<li id="menupage-{{page.id}}" {{isactive}} style="cursor:pointer">
|
|
<a onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','group','{{forcereload}}','{{groupshared.id}}','{{page.name}}')">
|
|
{% if page.fonticon %}
|
|
<i class="{{ page.fonticon }} fa-faw"></i>
|
|
{% endif %}
|
|
{{ page.name }}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %} |