templates/includes/header-account.html.twig line 1

Open in your IDE?
  1. {% if is_granted('IS_AUTHENTICATED_FULLY') and not is_granted('ROLE_REPRESENTATIVE') %}
  2.     <div class="dropdown">
  3.         <button class="btn btn-profile dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
  4.             {{ app.user.lastname|striptags|slice(0, 25)|default(app.user.lastname) }}{% if app.user.lastname|length > 25 %}...{% endif %}
  5.             <img src="{{ asset('/img/icon-user.png') }}" alt="">
  6.         </button>
  7.         <ul class="dropdown-menu dropdown-menu-end">
  8.             <li><a href="{{ document.getProperty('user_data_document').fullPath }}" class="dropdown-item">{{ 'Gegevens' | trans }}</a></li>
  9.             <li><a href="{{ document.getProperty('user_favorites_document').fullPath }}" class="dropdown-item">Mijn bestellijsten</a></li>
  10.             <li><a href="{{ document.getProperty('user_products_document').fullPath }}" class="dropdown-item">Reeds bestelde producten</a></li>
  11.             <li><a href="{{ document.getProperty('user_orders_document').fullPath }}" class="dropdown-item">Eerdere bestellingen</a></li>
  12.             <li><a href="{{ document.getProperty('user_backorders_document').fullpath }}" class="dropdown-item">Mijn backorders</a></li>
  13.             {% if is_granted('IS_IMPERSONATOR') %}
  14.                 <li>
  15.                     <a
  16.                         href="{{ path('impersonator_logout') }}"
  17.                         class="dropdown-item"
  18.                     >Terug naar hoofdaccount</a>
  19.                 </li>
  20.             {% else %}
  21.                 <li><a href="{{ path('account-logout') }}" class="dropdown-item">{{ 'Log uit' | trans }}</a></li>
  22.             {% endif %}
  23.         </ul>
  24.     </div>
  25. {% elseif is_granted('IS_AUTHENTICATED_FULLY') and is_granted('ROLE_REPRESENTATIVE') %}
  26.     <div class="dropdown">
  27.         <button class="btn btn-profile dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
  28.             {{ app.user.name|striptags|slice(0, 25)|default(app.user.name) }}{% if app.user.name|length > 25 %}...{% endif %}
  29.             <img src="{{ asset('/img/icon-user.png') }}" alt="">
  30.         </button>
  31.         <ul class="dropdown-menu dropdown-menu-end">
  32.             <li><a href="{{ path('representatives-clients') }}" class="dropdown-item">{{ 'Klanten overzicht' | trans }}</a></li>
  33.             <li><a href="{{ path('account-representative-logout') }}" class="dropdown-item">{{ 'Log uit' | trans }}</a></li>
  34.         </ul>
  35.     </div>
  36. {% else %}
  37.     <a href="{{ path('account-login') }}" class="btn btn-profile">
  38.         <img src="{{ asset('/img/icon-user.png') }}" alt="">
  39.         {{ 'Inloggen' | trans }}
  40.     </a>
  41. {% endif %}