gestion du menu grouppage
This commit is contained in:
parent
1b36560d80
commit
3f1eab00ad
|
@ -127,11 +127,6 @@ body {
|
||||||
border-bottom: 5px solid #FFF;
|
border-bottom: 5px solid #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-menu {
|
|
||||||
max-height: 450px;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-submenu {
|
.dropdown-submenu {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,109 @@
|
||||||
|
{% if not inmenu %}
|
||||||
|
<ul class="list-group" id="listgrouppage">
|
||||||
|
{% for groupshared in groupsshared %}
|
||||||
|
{% for page in groupshared.pagesshared %}
|
||||||
|
{% set forcereload=true %}
|
||||||
|
{% if page.pagecategory.id==1 %}
|
||||||
|
{% set forcereload=false %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set isactive="" %}
|
||||||
|
{% if entity.id is defined and page.id==entity.id %}
|
||||||
|
{% set isactive="active" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<li id="menupage-{{page.id}}" {{ isactive }} class="list-group-item {{isactive}}" onClick="$('#listgrouppage li').removeClass('active'); $(this).addClass('active') " style="cursor:pointer">
|
||||||
|
<a data-group="{{groupshared.id}}" onClick="$('#selgrouppages').modal('hide'); showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','group','{{forcereload}}','{{groupshared.id}}')">
|
||||||
|
{% if page.fonticon %}
|
||||||
|
<i class="{{ page.fonticon }} fa-faw"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="fa fa-users fa-fw"></i>
|
||||||
|
{% endif %}
|
||||||
|
{{ page.name }}
|
||||||
|
|
||||||
|
{% if loop.first and page.counterread > 0 %}
|
||||||
|
<span id="badge-{{groupshared.id}}" class="badge">{{page.counterread}}</span>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{% if loop.first and groupshared.pagesshared|length > 1 %}
|
||||||
|
<ul class="list-group" style="margin-top:15px">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if groupshared.pagesshared|length > 1 and loop.last %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if loop.last %}
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% else %}
|
||||||
|
{% for groupshared in groupsshared %}
|
||||||
|
{% if groupshared.pagesshared|length == 1 %}
|
||||||
|
{% set page = groupshared.pagesshared[0] %}
|
||||||
|
{% set forcereload=true %}
|
||||||
|
{% if page.pagecategory.id==1 %}
|
||||||
|
{% set forcereload=false %}
|
||||||
|
{% 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}}')">
|
||||||
|
{% 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=false %}
|
||||||
|
{% 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}}')">
|
||||||
|
{% if page.fonticon %}
|
||||||
|
<i class="{{ page.fonticon }} fa-faw"></i>
|
||||||
|
{% endif %}
|
||||||
|
{{ page.name }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
|
@ -70,93 +70,20 @@
|
||||||
|
|
||||||
<ul id="pagesgroup" class="nav navbar-top-links navbar-left">
|
<ul id="pagesgroup" class="nav navbar-top-links navbar-left">
|
||||||
|
|
||||||
<!-- On regroupe l'ensemble des pages si plus de 10 groupes -->
|
<!-- On regroupe l'ensemble des pages si plus de x groupes -->
|
||||||
{% set submenu="" %}
|
{% set nbgroupregrouped=5 %}
|
||||||
{% if groupsshared|length > 5 %}
|
{% if groupsshared|length > nbgroupregrouped %}
|
||||||
{% set submenu="-submenu" %}
|
|
||||||
<ul id="pagesshared" class="nav navbar-top-links navbar-left">
|
<ul id="pagesshared" class="nav navbar-top-links navbar-left">
|
||||||
<li class="dropdown">
|
<li>
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
<a id="menugrouppages" style='cursor:pointer' data-toggle='modal' data-target='#selgrouppages'>
|
||||||
<i class="fa fa-users fa-fw"></i> Mes Groupes
|
<i class="fa fa-users fa-fw"></i> Mes Groupes
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</a>
|
</a>
|
||||||
|
</li>
|
||||||
<ul class="dropdown-menu">
|
</ul>
|
||||||
{%endif%}
|
|
||||||
|
|
||||||
{% for groupshared in groupsshared %}
|
|
||||||
{% if groupshared.pagesshared|length == 1 %}
|
|
||||||
{% set page = groupshared.pagesshared[0] %}
|
|
||||||
{% set forcereload=true %}
|
|
||||||
{% if page.pagecategory.id==1 %}
|
|
||||||
{% set forcereload=false %}
|
|
||||||
{% 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}}')">
|
|
||||||
{% if page.fonticon %}
|
|
||||||
<i class="{{ page.fonticon }} fa-faw"></i>
|
|
||||||
{%else%}
|
{%else%}
|
||||||
<i class="fa fa-users fa-fw"></i>
|
{% set inmenu=true %}
|
||||||
{% endif %}
|
{{ include('@CadolesPortal/Page/menugroupe.html.twig') }}
|
||||||
{{ 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{{submenu}}">
|
|
||||||
<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 }}
|
|
||||||
|
|
||||||
{%if submenu is empty %}
|
|
||||||
<span class="caret"></span>
|
|
||||||
{% endif %}
|
|
||||||
{% 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=false %}
|
|
||||||
{% 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}}')">
|
|
||||||
{% if page.fonticon %}
|
|
||||||
<i class="{{ page.fonticon }} fa-faw"></i>
|
|
||||||
{% endif %}
|
|
||||||
{{ page.name }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% if groupsshared|length > 3 %}
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -172,6 +99,13 @@
|
||||||
<a id="menuwidgetuser" style='cursor:pointer;display:none' data-toggle='modal' data-target='#selwidgetuser' title='Ajouter un widget'><i class='fa fa-cubes fa-fw'></i></a>
|
<a id="menuwidgetuser" style='cursor:pointer;display:none' data-toggle='modal' data-target='#selwidgetuser' title='Ajouter un widget'><i class='fa fa-cubes fa-fw'></i></a>
|
||||||
<a id="menuwidgetgroup" style='cursor:pointer;display:none' data-toggle='modal' data-target='#selwidgetgroup' title='Ajouter un widget'><i class='fa fa-cubes fa-fw'></i></a>
|
<a id="menuwidgetgroup" style='cursor:pointer;display:none' data-toggle='modal' data-target='#selwidgetgroup' title='Ajouter un widget'><i class='fa fa-cubes fa-fw'></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block pagewrapper %}
|
{% block pagewrapper %}
|
||||||
|
@ -182,6 +116,29 @@
|
||||||
<iframe src="{{ widonlyoffice_url }}/sso/login" style="display:none"></iframe>
|
<iframe src="{{ widonlyoffice_url }}/sso/login" style="display:none"></iframe>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% set nbgroupregrouped=5 %}
|
||||||
|
{% if groupsshared|length > nbgroupregrouped %}
|
||||||
|
<div id="selgrouppages" class="modal fade bs-item-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h4 class="modal-title">MES GROUPES</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<a onclick="$('#selgrouppages').modal('hide');" class="btn btn-default" style="margin-bottom:15px">
|
||||||
|
Annuler
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{% set inmenu=false %}
|
||||||
|
{{ include('@CadolesPortal/Page/menugroupe.html.twig') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
<div id="selwidgetuser" class="modal fade bs-item-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
<div id="selwidgetuser" class="modal fade bs-item-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog modal-lg">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
|
Loading…
Reference in New Issue