{#
 # For the full copyright and license information, please view the
 # docs/licenses/LICENSE.txt file that was distributed with this source code.
 #}
<ul id="header_employee_box" class="component">
  <li id="employee_infos" class="dropdown">
    <a href="{{ path('admin_employees_edit', {employeeId: this.employee.id}) }}"
       class="employee_name dropdown-toggle"
       data-toggle="dropdown"
    >
      <i class="material-icons">account_circle</i>
    </a>
    <ul id="employee_links" class="dropdown-menu dropdown-menu-right">
      <li class="employee-wrapper-avatar" data-mobile="true" data-from="employee_links" data-target="menu">
              <span class="employee_avatar">
                <img class="imgm img-thumbnail" alt="" src="{{ this.employee.imageUrl }}" width="60" height="60" />
              </span>
      </li>
      <li class="text-left text-nowrap username" data-mobile="true" data-from="employee_links" data-target="menu">{{ 'Welcome back %name%'|trans({'%name%': this.employee.firstName}, 'Admin.Navigation.Header') }}</li>
      <li class="employee-wrapper-profile"><a class="admin-link" href="{{ path('admin_employees_edit', {employeeId: this.employee.id}) }}"><i class="material-icons">edit</i> {{ 'Your profile'|trans({}, 'Admin.Navigation.Header') }}</a></li>
      <li class="divider"></li>

      {% for menuItem in displayBackOfficeEmployeeMenu %}
        {% set menuItemProperties = menuItem.getProperties %}
        <li class="{{ menuItem.getClass }}">
          <a class="dropdown-item" href="{{ menuItemProperties.link }}" {% if menuItemProperties.isExternalLink %} target="_blank"{% endif %} rel="noopener noreferrer nofollow">
            {% if menuItemProperties.icon is defined %}
              <i class="material-icons">{{ menuItemProperties.icon }}</i>
            {% endif %}
            {{ menuItem.getContent }}
          </a>
        </li>
        {% if loop.last %}
          <p class="divider"></p>
        {% endif %}
      {% endfor %}

      <li class="signout text-center" data-mobile="true" data-from="employee_links" data-target="menu" data-after="true"><a id="header_logout" href="{{ path('admin_logout') }}"><i class="material-icons visible-xs">power_settings_new</i> {{ 'Sign out'|trans({}, 'Admin.Navigation.Header') }}</a></li>
    </ul>
  </li>
</ul>
