180 lines
6.3 KiB
Twig
Executable File
180 lines
6.3 KiB
Twig
Executable File
{% set sidebar = [
|
|
{
|
|
'id': 'sidebar-config',
|
|
'icon': 'fa fa-gear',
|
|
'name' : 'CONFIGURATION',
|
|
'items' : [
|
|
{
|
|
icon: 'fa fa-table fa-fw',
|
|
route: 'app_admin_config',
|
|
name: 'Général',
|
|
},
|
|
|
|
{
|
|
icon: 'fas fa-paint-brush fa-fw',
|
|
route: 'app_admin_theme',
|
|
name: 'Thème',
|
|
},
|
|
]
|
|
},
|
|
{
|
|
'id': 'sidebar-organisation',
|
|
'icon': 'fa fa-sitemap fa-fw',
|
|
'name' : 'ORGANISATION',
|
|
'items' : [
|
|
{
|
|
icon: 'fa fa-building fa-fw',
|
|
route: 'app_admin_niveau01',
|
|
name: appNiveau01labels,
|
|
},
|
|
{
|
|
icon: 'fa fa-sitemap fa-fw',
|
|
route: 'app_admin_niveau02',
|
|
name: appNiveau02labels,
|
|
},
|
|
{
|
|
icon: 'fas fa-store-alt fa-fw',
|
|
route: 'app_admin_niveau03',
|
|
name: appNiveau03labels,
|
|
},
|
|
{
|
|
icon: 'fas fa-monument fa-fw',
|
|
route: 'app_admin_niveau04',
|
|
name: appNiveau04labels,
|
|
},
|
|
{
|
|
icon: 'fa fa-users fa-fw',
|
|
route: 'app_admin_group',
|
|
name: 'Groupes',
|
|
},
|
|
{
|
|
icon: 'fa fa-child fa-fw',
|
|
route: 'app_admin_user',
|
|
name: 'Utilisateurs',
|
|
},
|
|
{
|
|
icon: 'fa fa-edit fa-fw',
|
|
route: 'app_admin_registration',
|
|
name: 'Inscriptions',
|
|
},
|
|
{
|
|
icon: 'fa fa-tasks fa-fw',
|
|
route: 'app_admin_whitelist',
|
|
name: 'Listes Blanche',
|
|
},
|
|
]
|
|
},
|
|
{
|
|
'id': 'sidebar-portal',
|
|
'icon': 'fa fa-door-closed',
|
|
'name' : 'PORTAIL',
|
|
'items' : [
|
|
{
|
|
icon: 'fa fa-copy fa-fw',
|
|
route: 'app_admin_page_template',
|
|
name: 'Modèles de Page',
|
|
},
|
|
{
|
|
icon: 'fa fa-file fa-fw',
|
|
route: 'app_admin_page_portal',
|
|
name: 'Pages',
|
|
},
|
|
{
|
|
icon: 'fa fa-desktop fa-fw',
|
|
route: 'app_admin_item',
|
|
name: 'Items',
|
|
},
|
|
{
|
|
icon: 'fa fa-bell fa-fw',
|
|
route: 'app_admin_alert',
|
|
name: 'Annonces',
|
|
},
|
|
{
|
|
icon: 'fa fa-bug fa-fw',
|
|
route: 'app_admin_icon',
|
|
name: 'Icônes',
|
|
},
|
|
]
|
|
},
|
|
{
|
|
'id': 'sidebar-document',
|
|
'icon': 'fa fa-file fa-fw',
|
|
'name' : 'DOCUMENTS',
|
|
'items' : [
|
|
{
|
|
icon: 'fa fa-cogs',
|
|
route: 'app_admin_document',
|
|
name: 'Documents',
|
|
},
|
|
{
|
|
icon: 'fa fa-cogs',
|
|
route: 'app_admin_documentcategory',
|
|
name: 'Catégories',
|
|
},
|
|
]
|
|
},
|
|
{
|
|
'id': 'sidebar-cron',
|
|
'icon': 'fa fa-wrench',
|
|
'name' : 'OUTILS',
|
|
'items' : [
|
|
{
|
|
icon: 'fa fa-cogs fa-fw',
|
|
route: 'app_admin_cron',
|
|
name: 'Cron Jobs',
|
|
},
|
|
|
|
{
|
|
icon: 'fas fa-star-of-life fa-fw',
|
|
route: 'app_rest',
|
|
name: 'API',
|
|
},
|
|
]
|
|
},
|
|
]
|
|
%}
|
|
|
|
<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==app.request.get('_route') or (item.route~"_") in app.request.get('_route') %}
|
|
{% set sectionactive=true %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% set toshow=true %}
|
|
{% if section.name == "PORTAIL" and not ("PORTAL" in appModules) %}
|
|
{% set toshow=false %}
|
|
{% endif %}
|
|
|
|
{% if toshow %}
|
|
<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_admin_registration" and (appMasteridentity!="SQL" or appModeregistration is empty) %} {% set toshow=false %} {% endif %}
|
|
{% if item.route=="app_admin_whitelist" and (appMasteridentity!="SQL" or appModeregistration is empty) %} {% set toshow=false %} {% endif %}
|
|
{% if item.route=="app_admin_niveau02" and not appNiveau02use %} {% set toshow=false %} {% endif %}
|
|
{% if item.route=="app_admin_niveau03" and not appNiveau03use %} {% set toshow=false %} {% endif %}
|
|
{% if item.route=="app_admin_niveau04" and not appNiveau04use %} {% set toshow=false %} {% endif %}
|
|
{% if item.route=="app_admin_group" and not appGroupuse %} {% set toshow=false %} {% endif %}
|
|
|
|
{%if toshow %}
|
|
<a class="nav-link nav-link-item {% if item.route==app.request.get('_route') or (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>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</div> |