templates/menu.html.twig line 1

Open in your IDE?
  1. {% import 'macros/macro_elements.html.twig' as ME %}
  2. {% if app.user is not null %}
  3.     <div class="collapse show" id="menu-container">
  4.         <div class="menu d-flex flex-column justify-content-between">
  5.             <ul class="navbar-nav">
  6. {#                {{ ME.showElementsByRole(['ROLE_BANNER'], [#}
  7.                 {# {{ ME.showElementsByRole(['ROLE_IMAGENES_VISUALIZADOR'], [
  8.                     ME.getLiMenu('imagenes', 'far fa-image', 'Imágenes de portada', 'index_imagen')
  9.                 ]) }} #}
  10.                 {{ ME.showElementsByRole(['ROLE_TRAMITES_SERVICIOS_VISUALIZADOR'], [
  11.                     ME.getLiMenu('tramites', 'far fa-file-alt', 'Trámites', 'index_tramite')
  12.                 ]) }}
  13.                 {{ ME.showElementsByRole(['ROLE_HOME'], [
  14.                     ME.getLiMenuWithSubMenus('home', 'fas fa-home', 'Home', [
  15.                         {'id': 'banner', 'name': 'Banner', 'route': 'index_banner', 'role': 'ROLE_BANNER_VISUALIZADOR' },
  16.                         {'id': 'secciones', 'name': 'Secciones', 'route': 'index_seccion', 'role': 'ROLE_SECCION_VISUALIZADOR' },
  17.                         {'id': 'etiquetas', 'name': 'Más buscados', 'route': 'index_etiqueta', 'role': 'ROLE_ETIQUETA_VISUALIZADOR' },
  18.                         {'id': 'acciones', 'name': 'Qué necesitas', 'route': 'index_accion', 'role': 'ROLE_TRAMITES_SERVICIOS_VISUALIZADOR' },
  19.                         {'id': 'tipodestacados', 'name': 'Tipo Destacados', 'route': 'index_tipo_destacado', 'role': 'ROLE_TRAMITES_SERVICIOS_VISUALIZADOR' },
  20.                         {'id': 'destacados', 'name': 'Destacados', 'route': 'index_destacados', 'role': 'ROLE_TRAMITES_SERVICIOS_VISUALIZADOR' },
  21.                         {'id': 'momentos', 'name': 'Momentos de vida', 'route': 'index_momentos_de_vida', 'role': 'ROLE_TRAMITES_SERVICIOS_VISUALIZADOR' },
  22.                         {'id': 'tituloTramitesServicios', 'name': 'Headers de secciones', 'route': 'index_componente_titulo', 'role': 'ROLE_TRAMITES_SERVICIOS_VISUALIZADOR' },
  23.                         {'id': 'cardTramitesServicios', 'name': 'T&S-Tarjetas', 'route': 'index_categoria', 'role': 'ROLE_TRAMITES_SERVICIOS_VISUALIZADOR' },
  24.                         {'id': 'baProductivaAreas', 'name': 'BA-Productiva Áreas', 'route': 'index_ba_productiva_area', 'role': 'ROLE_BA_PRODUCTIVA_VISUALIZADOR' },
  25.                         {'id': 'baProductivaRubros', 'name': 'BA-Productiva Rubros', 'route': 'index_ba_productiva_rubro', 'role': 'ROLE_BA_PRODUCTIVA_VISUALIZADOR' },
  26.                     ])
  27.                 ]) }}
  28.                 {{ ME.showElementsByRole(['ROLE_ADMIN'], [
  29.                     ME.getLiMenuWithSubMenus('descubrir', 'fas fa-map', 'Descubrir BA', [
  30.                         {'id': 'secciones_descubrir', 'name': 'Secciones', 'route': 'index_bloque'},
  31.                         {'id': 'sponsors', 'name': 'Sponsors', 'route': 'index_sponsor'},
  32.                     ])
  33.                 ]) }}
  34.                 {{ ME.showElementsByRole(['ROLE_ADMIN'], [
  35.                     ME.getLiMenuWithSubMenus('bax', 'fas fa-microchip', 'Bax', [
  36.                         {'id': 'banner_bax', 'name': 'Banner', 'route': 'index_bax'},
  37.                         {'id': 'clima', 'name': 'Clima', 'route': 'index_clima'},
  38.                     ])
  39.                 ]) }}                
  40.                 {{ ME.showElementsByRole(['ROLE_ADMIN'], [
  41.                     ME.getLiMenuWithSubMenus('landig_pages', 'fas fa-cogs', 'Modulos Web', [
  42.                         {'id': 'landing_pages_modulo', 'name': 'Landig pages', 'route': 'index_landing_page'},
  43.                         {'id': 'header_landing_pages', 'name': 'Header', 'route': 'index_header'},
  44.                         {'id': 'colors_landing_pages', 'name': 'Colores', 'route': 'index_color'}
  45.                     ])
  46.                 ]) }}
  47.                 {{ ME.showElementsByRole(['ROLE_CONTACTO'], [
  48.                     ME.getLiMenuWithSubMenus('contacto', 'far fa-paper-plane', 'Contacto', [
  49.                         {'id': 'telefonos', 'name': 'Teléfonos', 'route': 'index_telefono', 'role': 'ROLE_TELEFONOS_VISUALIZADOR'},
  50.                         {'id': 'redesSociales', 'name': 'Redes sociales', 'route': 'index_red_social', 'role': 'ROLE_REDES_SOCIALES_VISUALIZADOR'}
  51.                     ])
  52.                 ]) }}
  53.                 {{ ME.showElementsByRole(['ROLE_INFORMACION'], [
  54.                     ME.getLiMenuWithSubMenus('informacion', 'fas fa-book', 'Información', [
  55.                         {'id': 'areasGobierno', 'name': 'Áreas de gobierno', 'route': 'index_area_gobierno', 'role': 'ROLE_AREAS_GOBIERNO_VISUALIZADOR'},
  56.                         {'id': 'terminosCondiciones', 'name': 'Términos y condiciones', 'route': 'index_terminos_condiciones', 'role': 'ROLE_TERMINOS_CONDICIONES_VISUALIZADOR'},
  57.                         {'id': 'organigrama', 'name': 'Organigrama', 'route': 'index_organigrama', 'role': 'ROLE_ORGANIGRAMA_VISUALIZADOR'},
  58.                         {'id': 'reparticion', 'name': 'Repartición', 'route': 'index_reparticion', 'role': 'ROLE_REPARTICION_VISUALIZADOR'}
  59.                     ])
  60.                 ]) }}
  61.             {{ ME.showElementsByRole(['ROLE_ADMIN'], [
  62.                 ME.getLiMenuWithSubMenus('accesos', 'fas fa-users-cog', 'Accesos', [
  63.                     {'id': 'roles', 'name': 'Roles', 'route': 'index_role'},
  64.                     {'id': 'perfiles', 'name': 'Perfiles', 'route': 'index_perfil'},
  65.                     {'id': 'usuarios', 'name': 'Usuarios', 'route': 'index_usuario'},
  66.                     {'id': 'parameters', 'name': 'Parámetros', 'route': 'index_parameters'},
  67.                     {'id': 'configuracion_solr', 'name': 'Configuración Solr', 'route': 'index_configuracion_solr'},
  68.                     {'id': 'tiposSecciones', 'name': 'Rate Limiting', 'route': 'index_tipo_seccion'},
  69.                     {'id': 'blacklist', 'name': 'Blacklist IPs', 'route': 'index_blacklist'}
  70.                 ])
  71.             ]) }}
  72.             </ul>
  73.             <div class="nav-item logout">
  74.                 <label class="m-0">{{ app.user.nombre }} {{ app.user.apellido }}</label>
  75.                 <button class="btn btn-default">
  76.                     <a class="font-weight-bold text-decoration-none text-danger " href="{{ path('logout') }}" title="Cerrar sesión">
  77.                         <i class="fa fa-sign-out-alt mr-2"></i>Salir
  78.                     </a>
  79.                 </button>
  80.             </div>
  81.         </div>
  82.     </div>
  83. {% endif %}
  84. <script>
  85.     $('a.nav-link').click(function (e) {
  86.         e.stopPropagation();
  87.     });
  88. </script>