templates/partials/_sidebar.html.twig line 21

  1. <nav class="header-mobile d-flex d-lg-none justify-content-between align-items-center bg-white  border-1 border-bottom px-4 py-3">
  2.     <a class="header-logo d-flex align-items-center " href="{{ path('app_home') }}" aria-label="Retour à l'accueil"><img class="w-100" loading="lazy" src="{{ asset('assets/images/Bilbea-logo-H sans.webp') }}" alt=""/></a>
  3.     <button id="open-sidebar" type="button" class="fill-primary icon-button" aria-label="Menu" title="Menu">
  4.         <svg class="icon-large" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 448 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>
  5.     </button>
  6. </nav>
  7. <nav id="sidebar" class="sidebar border-1 border-end px-3 py-3 py-2 flex-column ">
  8.     <div class="d-flex justify-content-between align-items-center mb-3 gap-4">
  9.         <a class="sidebar-logo d-block w-100" href="{{ path('app_home') }}" aria-label="Retour à l'accueil"><img class="w-100" loading="lazy" src="{{ asset('assets/images/Bilbea-logo-H sans.webp') }}" alt=""/></a>
  10.         <button id="close-sidebar" type="button" class="fill-primary icon-button d-block d-lg-none" aria-label="Fermer le menu" title="Fermer le menu">
  11.             <svg class="icon-large" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 384 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>
  12.         </button>
  13.     </div>
  14.     <ul class="sidebar-nav navbar-nav fs-6 flex-fill">
  15.         {% if app.user.companyMember %}
  16.             {% set company = app.user.companyMember.company  %}
  17.             {% set companyId = app.user.companyMember.company.id  %}
  18.         {% elseif app.request.attributes.get('company')  %}
  19.             {% set company = app.request.attributes.get('company')  %}
  20.             {% set companyId = app.request.attributes.get('company').id  %}
  21.         {% else %}
  22.             {% if app.request.attributes.get('evaluation')  %}
  23.                 {% set company = app.request.attributes.get('evaluation').company  %}
  24.                 {% set companyId = app.request.attributes.get('evaluation').company.id  %}
  25.             {% elseif app.request.attributes.get('bilan')  %}
  26.                 {% set company = app.request.attributes.get('bilan').company  %}
  27.                 {% set companyId = app.request.attributes.get('bilan').company.id  %}
  28.             {% elseif app.request.attributes.get('labelNR')  %}
  29.                 {% set company = app.request.attributes.get('labelNR').company  %}
  30.                 {% set companyId = app.request.attributes.get('labelNR').company.id  %}
  31.             {% elseif app.request.attributes.get('auditNR')  %}
  32.                 {% set company = app.request.attributes.get('auditNR').company  %}
  33.                 {% set companyId = app.request.attributes.get('auditNR').company.id  %}
  34.             {% else %}
  35.                 {% set company = null  %}
  36.                 {% set companyId = null  %}
  37.             {% endif %}
  38.         {% endif %}
  39.         {% if is_granted('ROLE_COMPANY')  %}
  40.             <li>
  41.                 <h4 class="fs-5 mt-2">{{company.name}}</h4>
  42.             </li>
  43.             {% if is_granted('ROLE_COMPANY_PILOT')  %}
  44.                 {% include 'partials/menu/_sidebar_link.html.twig' with {"path": "app_pilot_manage_members", "arguments" : null, "linkLabel": "Membres", "iconPath": "icons/_users_icon.html.twig", "app": app} %}
  45.             {% endif %}
  46.             {# {% include 'partials/menu/_sidebar_link.html.twig' with {"path": "app_roadmap_index", "arguments" : null, "linkLabel": "Dashboard", "iconPath": "icons/_dashboard_icon.html.twig", "app": app} %} #}
  47.             {% include 'partials/menu/_sidebar_link.html.twig' with {"path": "app_roadmap_index", "arguments" : null, "linkLabel": "Feuille de route", "iconPath": "icons/_calendar_icon.html.twig", "app": app} %}
  48.             {% if company.isAuditNR %}
  49.                 {% include 'partials/menu/_sidebar_link.html.twig' with {"path": "app_maturity_nr", "arguments" : null, "linkLabel": "Maturité NR", "iconPath": "icons/_maturite_icon.html.twig", "app": app} %}
  50.             {% endif %}
  51.             {% if company.isLabelNR %}
  52.                 {% include 'partials/menu/_sidebar_link.html.twig' with {"path": "app_label_nr", "arguments" : null, "linkLabel": "Label NR", "iconPath": "icons/_label_icon.html.twig", "app": app} %}
  53.             {% endif %}
  54.             {% if company.isBilanCarbone %}
  55.                 {% include 'partials/menu/_sidebar_link.html.twig' with {"path": "app_bc_index", "arguments" : null, "linkLabel": "Bilan Carbone SI", "iconPath": "icons/_bilan_icon.html.twig", "app": app} %}
  56.             {% endif %}
  57.         {% endif %}
  58.         {% if is_granted('ROLE_BILBEA') or is_granted('ROLE_ADMIN') %}
  59.             <li class="nav-item text-end text-lg-start">
  60.                 <a class="d-flex flex-nowrap nav-link fs-6 rounded {% if app.request.get('_route') ==  'app_backoffice' %}active {% endif %}" aria-current="page" href="{{path('app_backoffice')}}">
  61.                     <span class="d-flex justify-content-center align-items-center col-2 fill-ongoing">
  62.                         <svg class="me-2 text-icon" xmlns="http://www.w3.org/2000/svg" height="1em" viewbox="0 0 576 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"/></svg>
  63.                     </span>
  64.                     <span>Backoffice</span>
  65.                 </a>
  66.             </li>
  67.             {% if companyId %}
  68.                 <li>
  69.                     <hr class="mb-2 mt-1">
  70.                     <h4 class="fs-5 mt-2">{{company.name}}</h4>
  71.                 </li>
  72.                 {# {% include 'partials/menu/_sidebar_link.html.twig' with {"path": "app_roadmap_index", "arguments" : {company: companyId}, "linkLabel": "Dashboard", "iconPath": "icons/_dashboard_icon.html.twig", "app": app} %} #}
  73.                 {% include 'partials/menu/_sidebar_link.html.twig' with {"path": "app_roadmap_index", "arguments" : {company: companyId}, "linkLabel": "Feuille de route", "iconPath": "icons/_calendar_icon.html.twig", "app": app} %}
  74.                 {% if company.isAuditNR %}
  75.                     {% include 'partials/menu/_sidebar_link.html.twig' with {"path": "app_maturity_nr", "arguments" : {company: companyId}, "linkLabel": "Maturité NR", "iconPath": "icons/_maturite_icon.html.twig", "app": app} %}
  76.                 {% endif %}
  77.                 {% if company.isLabelNR %}
  78.                     {% include 'partials/menu/_sidebar_link.html.twig' with {"path": "app_label_nr", "arguments" : {company: companyId}, "linkLabel": "Label NR", "iconPath": "icons/_label_icon.html.twig", "app": app} %}
  79.                 {% endif %}
  80.                 {% if company.isBilanCarbone %}
  81.                     {% include 'partials/menu/_sidebar_link.html.twig' with {"path": "app_bc_index", "arguments" : {company: companyId}, "linkLabel": "Bilan Carbone SI", "iconPath": "icons/_bilan_icon.html.twig", "app": app} %}
  82.                 {% endif %}
  83.             {% endif %}
  84.         {% endif %}
  85.     </ul>
  86.     <div>
  87.         <p class="small mb-2">Connecté en tant que
  88.             <br>
  89.             <span class="text-primary fw-semibold fs-5">{{app.user.getName}}</span>
  90.         </p>
  91.         <div class="d-flex align-items-center gap-2">
  92.             {% if is_granted('ROLE_COMPANY')  %}
  93.                 <a href="{{path('app_profile')}}" class="fill-black" aria-label="Lien vers profil" title="Profil">
  94.                     <svg class="icon-large" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" style="fill: rgba(0, 0, 0, 1);transform: ;msFilter:;">
  95.                         <path d="M12 16c2.206 0 4-1.794 4-4s-1.794-4-4-4-4 1.794-4 4 1.794 4 4 4zm0-6c1.084 0 2 .916 2 2s-.916 2-2 2-2-.916-2-2 .916-2 2-2z"></path>
  96.                         <path d="m2.845 16.136 1 1.73c.531.917 1.809 1.261 2.73.73l.529-.306A8.1 8.1 0 0 0 9 19.402V20c0 1.103.897 2 2 2h2c1.103 0 2-.897 2-2v-.598a8.132 8.132 0 0 0 1.896-1.111l.529.306c.923.53 2.198.188 2.731-.731l.999-1.729a2.001 2.001 0 0 0-.731-2.732l-.505-.292a7.718 7.718 0 0 0 0-2.224l.505-.292a2.002 2.002 0 0 0 .731-2.732l-.999-1.729c-.531-.92-1.808-1.265-2.731-.732l-.529.306A8.1 8.1 0 0 0 15 4.598V4c0-1.103-.897-2-2-2h-2c-1.103 0-2 .897-2 2v.598a8.132 8.132 0 0 0-1.896 1.111l-.529-.306c-.924-.531-2.2-.187-2.731.732l-.999 1.729a2.001 2.001 0 0 0 .731 2.732l.505.292a7.683 7.683 0 0 0 0 2.223l-.505.292a2.003 2.003 0 0 0-.731 2.733zm3.326-2.758A5.703 5.703 0 0 1 6 12c0-.462.058-.926.17-1.378a.999.999 0 0 0-.47-1.108l-1.123-.65.998-1.729 1.145.662a.997.997 0 0 0 1.188-.142 6.071 6.071 0 0 1 2.384-1.399A1 1 0 0 0 11 5.3V4h2v1.3a1 1 0 0 0 .708.956 6.083 6.083 0 0 1 2.384 1.399.999.999 0 0 0 1.188.142l1.144-.661 1 1.729-1.124.649a1 1 0 0 0-.47 1.108c.112.452.17.916.17 1.378 0 .461-.058.925-.171 1.378a1 1 0 0 0 .471 1.108l1.123.649-.998 1.729-1.145-.661a.996.996 0 0 0-1.188.142 6.071 6.071 0 0 1-2.384 1.399A1 1 0 0 0 13 18.7l.002 1.3H11v-1.3a1 1 0 0 0-.708-.956 6.083 6.083 0 0 1-2.384-1.399.992.992 0 0 0-1.188-.141l-1.144.662-1-1.729 1.124-.651a1 1 0 0 0 .471-1.108z"></path>
  97.                     </svg>
  98.                 </a>
  99.             {% endif %}
  100.             <a href="{{path('app_edit_password_complete')}}" class="fill-black" aria-label="Lien vers modification du mot de passe" title="Modifier mot de passe">
  101.                 <svg class="icon-large" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" style="fill: rgba(0, 0, 0, 1);transform: ;msFilter:;">
  102.                     <path d="M12 2C9.243 2 7 4.243 7 7v2H6c-1.103 0-2 .897-2 2v9c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-9c0-1.103-.897-2-2-2h-1V7c0-2.757-2.243-5-5-5zM9 7c0-1.654 1.346-3 3-3s3 1.346 3 3v2H9V7zm9.002 13H13v-2.278c.595-.347 1-.985 1-1.722 0-1.103-.897-2-2-2s-2 .897-2 2c0 .736.405 1.375 1 1.722V20H6v-9h12l.002 9z"></path>
  103.                 </svg>
  104.             </a>
  105.             <a href="{{path('app_logout')}}" class="fill-black" aria-label="Lien vers déconnexion" title="Déconnexion">
  106.                 <svg class="icon-large" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" style="fill: rgba(0, 0, 0, 1);transform: ;msFilter:;">
  107.                     <path d="M16 13v-2H7V8l-5 4 5 4v-3z"></path>
  108.                     <path d="M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z"></path>
  109.                 </svg>
  110.             </a>
  111.         </div>
  112.     </div>
  113. </nav>