78 lines
3.1 KiB
Twig
78 lines
3.1 KiB
Twig
{% set sidebar = [
|
|
{
|
|
'id': 'sidebar-organisation',
|
|
'icon': 'fa fa-sitemap',
|
|
'name' : 'ORGANISATION',
|
|
'items' : [
|
|
{
|
|
icon: 'fa fa-sitemap',
|
|
route: 'app_modo_niveau02',
|
|
name: appNiveau02labels,
|
|
},
|
|
{
|
|
icon: 'fas fa-store-alt',
|
|
route: 'app_modo_niveau03',
|
|
name: appNiveau03labels,
|
|
},
|
|
{
|
|
icon: 'fas fa-monument',
|
|
route: 'app_modo_niveau04',
|
|
name: appNiveau04labels,
|
|
},
|
|
{
|
|
icon: 'fa fa-users',
|
|
route: 'app_modo_group',
|
|
name: 'Groupes',
|
|
},
|
|
{
|
|
icon: 'fa fa-child',
|
|
route: 'app_modo_user',
|
|
name: 'Utilisateurs',
|
|
},
|
|
{
|
|
icon: 'fa fa-edit',
|
|
route: 'app_modo_registration',
|
|
name: 'Inscriptions',
|
|
},
|
|
]
|
|
}
|
|
]
|
|
%}
|
|
|
|
|
|
<div id="sidebar" class="d-flex flex-column">
|
|
<ul class="nav nav-pills flex-column mb-auto">
|
|
{% for section in sidebar %}
|
|
{% set sectionactive=false %}
|
|
{% for item in section.items %}
|
|
{% if item.route in app.request.get('_route') %}
|
|
{% set sectionactive=true %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
<div class="nav-link-section">
|
|
<a class="nav-link nav-link-title" onClick="$('#sidebar .nav-link-items').hide();$(this).next().toggle();">
|
|
<i class="{{section.icon}}"></i>
|
|
<span>{{section.name}}</span>
|
|
</a>
|
|
<div class="nav-link-items" style="{% if sectionactive %}display:block{%else%}display:none{%endif%}">
|
|
{% for item in section.items %}
|
|
{% set toshow=true %}
|
|
{% if item.route=="app_modo_registration" and (appMasteridentity!="SQL" or appModeregistration is empty) %} {% set toshow=false %} {% endif %}
|
|
{% if item.route=="app_modo_niveau02" and not appNiveau02use %} {% set toshow=false %} {% endif %}
|
|
{% if item.route=="app_modo_niveau03" and not appNiveau03use %} {% set toshow=false %} {% endif %}
|
|
{% if item.route=="app_modo_niveau04" and not appNiveau04use %} {% set toshow=false %} {% endif %}
|
|
{% if item.route=="app_modo_group" and not appGroupuse %} {% set toshow=false %} {% endif %}
|
|
|
|
{%if toshow %}
|
|
<a class="nav-link nav-link-item {% if item.route in app.request.get('_route') %}active{%endif%}" href="{{path(item.route)}}" title="{{item.name}}">
|
|
<i class="{{item.icon}} fa-fw"></i>
|
|
<span>{{item.name}}</span>
|
|
</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</ul>
|
|
</div> |