templates/includes/header_nav.html.twig line 1

Open in your IDE?
  1. {% if not is_granted('ROLE_MANAGER') %}
  2.     <header class="admin-header">
  3.         <a href="#" class="sidebar-toggle" data-toggleclass="sidebar-open" data-target="body"> </a>
  4.         <nav class=" mr-auto my-auto d-none d-md-block">
  5.             <ul class="nav align-items-center">
  6.                 <li class="nav-item ml-4">
  7.                     {{ 'bonjour_et_bienvenue_sur_mydigitplace_data_solutio'|trans({'%contactFirstName%': app.user.user.companyName}) }}
  8.                 </li>
  9.             </ul>
  10.         </nav>
  11.         <nav class=" ml-auto">
  12.             <ul class="nav align-items-center">
  13.                 {% if is_granted('ROLE_PREVIOUS_ADMIN') %}
  14.                     <li class="nav-item mr-2">
  15.                         <a href="{{ path('default_homepage') }}?_switch_user=_exit" class="btn btn-secondary"
  16.                            aria-expanded="false">
  17.                             {{ 'admin'|trans }}
  18.                         </a>
  19.                     </li>
  20.                 {% endif %}
  21.                 <li class="nav-item mr-2">
  22.                     <div class="dropdown">
  23.                         <a href="#" class="btn btn-primary" data-toggle="dropdown" aria-haspopup="true"
  24.                            aria-expanded="false">
  25.                             {{ 'mon_compte_maj'|trans }}
  26.                         </a>
  27.                         <div class="dropdown-menu notification-container dropdown-menu-right">
  28.                             <div class="notification-events bg-gray-300">
  29.                                 <a href="{{ path('user_account') }}" class="text-left btn btn-light w-100 py-3 mb-3">
  30.                                     {{ 'modifier_mon_compte'|trans }}
  31.                                 </a>
  32.                                 <a href="{{ path('user_account') }}#export" class="text-left btn btn-light w-100 py-3 mb-3">
  33.                                     {{ 'exporter_mes_donnees'|trans }}
  34.                                 </a>
  35.                                 <a href="{{ path('user_account') }}#abonnement" class="text-left btn btn-light w-100 py-3 mb-3">
  36.                                     {{ 'mon_abonnement'|trans }}
  37.                                 </a>
  38.                                 <a href="{{ path('default_logout') }}" class="text-left btn btn-light w-100 py-3 mb-3">
  39.                                     {{ 'dconnexion'|trans }}
  40.                                 </a>
  41.                             </div>
  42.                         </div>
  43.                     </div>
  44.                 </li>
  45.                 <li class="nav-item mr-2">
  46.                     <div class="dropdown">
  47.                         <a href="#" class="btn btn-primary" data-toggle="dropdown" aria-haspopup="true"
  48.                            aria-expanded="false">
  49.                             {{ 'mydigitplace_maj'|trans }}
  50.                         </a>
  51.                         <div class="dropdown-menu notification-container dropdown-menu-right">
  52.                             <div class="notification-events bg-gray-300">
  53.                                 <a href="#" data-toggle="modal" data-target="#AgencyModal" class="text-left btn btn-light w-100 py-3 mb-3">
  54.                                     {{ 'contacter_mon_agence'|trans }}
  55.                                 </a>
  56.                                 <a href="#" data-toggle="modal" data-target="#ManagerModal" class="text-left btn btn-light w-100 py-3 mb-3">
  57.                                     {{ 'contacter_mon_dpo'|trans }}
  58.                                 </a>
  59.                                 <a href="{{ path('user_intervention') }}" class="text-left btn btn-light w-100 py-3 mb-3">
  60.                                     {{ 'demander_un_devis'|trans }}
  61.                                 </a>
  62.                                 <a href="{{ path('user_legales') }}" class="text-left btn btn-light w-100 py-3 mb-3">
  63.                                     {{ 'mentions_lgales'|trans }}
  64.                                 </a>
  65.                                 <a href="{{ path('user_privacy') }}" target="_blank" class="text-left btn btn-light w-100 py-3 mb-3">
  66.                                     {{ 'politique_de_confidentialit'|trans }}
  67.                                 </a>
  68.                             </div>
  69.                         </div>
  70.                     </div>
  71.                 </li>
  72.                 <li class="nav-item mr-2">
  73.                     <a href="{{ path('user_partners') }}" class="btn btn-primary"
  74.                        aria-expanded="false">
  75.                         {{ 'nos_partenaires_maj'|trans }}
  76.                     </a>
  77.                 </li>
  78.             </ul>
  79.         </nav>
  80.     </header>
  81.     <!-- Modal -->
  82.     <div class="modal fade" id="ManagerModal" tabindex="-1" role="dialog"
  83.          aria-labelledby="ManagerModal" aria-hidden="true">
  84.         <div class="modal-dialog modal-dialog-centered" role="document">
  85.             <div class="modal-content">
  86.                 <div class="modal-header">
  87.                     <h5 class="modal-title" id="exampleModalCenterTitle">{{ 'mon_dlgu_la_protection_des_donnes'|trans }}</h5>
  88.                     <button type="button" class="close" data-dismiss="modal"
  89.                             aria-label="{{ 'fermer'|trans }}">
  90.                         <span aria-hidden="true">&times;</span>
  91.                     </button>
  92.                 </div>
  93.                 <div class="modal-body">
  94.                     <p>{{ 'contactez_votre_dlgu'|trans({'%firstName%': app.user.user.manager.firstName, '%lastName%': app.user.user.manager.lastName}) }}:</p>
  95.                     <ul>
  96.                         <li>{{ 'par_mail'|trans }}: <a href="mailto:{{ app.user.user.manager.email }}">{{ app.user.user.manager.email }}</a></li>
  97.                         <li>{{ 'par_tlphone'|trans }}: <a href="tel:{{ app.user.user.manager.phone }}">{{ app.user.user.manager.phone }}</a></li>
  98.                     </ul>
  99.                 </div>
  100.             </div>
  101.         </div>
  102.     </div>
  103.     <div class="modal fade" id="AgencyModal" tabindex="-1" role="dialog"
  104.          aria-labelledby="AgencyModal" aria-hidden="true">
  105.         <div class="modal-dialog modal-dialog-centered" role="document">
  106.             <div class="modal-content">
  107.                 <div class="modal-header">
  108.                     <h5 class="modal-title" id="exampleModalCenterTitle">{{ 'mon_agence'|trans }}</h5>
  109.                     <button type="button" class="close" data-dismiss="modal"
  110.                             aria-label="{{ 'fermer'|trans }}">
  111.                         <span aria-hidden="true">&times;</span>
  112.                     </button>
  113.                 </div>
  114.                 <div class="modal-body">
  115.                     <p>{{ 'contacter_mon_agence'|trans }}:</p>
  116.                     <p>
  117.                         {{ app.user.user.manager.companyName }}<br/>
  118.                         {{ app.user.user.manager.address }}{% if app.user.user.manager.address2 %}, {{ app.user.user.manager.address2 }}{% endif %}<br/>
  119.                         {{ app.user.user.manager.zipCode }}, {{ app.user.user.manager.city }}<br/>
  120.                         <br/>
  121.                         <a href="mailto:{{ app.user.user.manager.email }}">{{ app.user.user.manager.email }}</a>
  122.                     </p>
  123.                 </div>
  124.             </div>
  125.         </div>
  126.     </div>
  127. {% else %}
  128.     <header class="admin-header">
  129.         <a href="#" class="sidebar-toggle" data-toggleclass="sidebar-open" data-target="body"> </a>
  130.         <nav class=" mr-auto my-auto d-none d-md-block">
  131.             <ul class="nav align-items-center">
  132.                 <li class="nav-item ml-4">
  133.                     Bonjour {{ app.user.manager.firstName }} et bienvenue sur MyDigitplace Data+ RH
  134.                 </li>
  135.             </ul>
  136.         </nav>
  137.         <nav class=" ml-auto">
  138.             <ul class="nav align-items-center">
  139.                 <li class="nav-item dropdown ">
  140.                     <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown"
  141.                        aria-haspopup="true" aria-expanded="false">
  142.                         <div class="avatar avatar-sm avatar-online">
  143.                             <span class="avatar-title rounded-circle bg-dark">{{ app.user.manager.firstName|slice(0,1)|upper }}{{ app.user.manager.lastName|slice(0,1)|upper }}</span>
  144.                         </div>
  145.                     </a>
  146.                     <div class="dropdown-menu  dropdown-menu-right">
  147.                         <a class="dropdown-item" href="{{ path('manager_account') }}"> Modifier mon compte</a>
  148.                         <div class="dropdown-divider"></div>
  149.                         <a class="dropdown-item" href="{{ path('default_logout') }}"> Déconnexion</a>
  150.                     </div>
  151.                 </li>
  152.             </ul>
  153.         </nav>
  154.     </header>
  155. {% endif %}