58 satır
2.8KB

  1. <nav class="main-header navbar navbar-expand navbar-white navbar-light">
  2. <!-- Left navbar links -->
  3. <ul class="navbar-nav">
  4. <li class="nav-item">
  5. <a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
  6. </li>
  7. </ul>
  8. <ul class="navbar-nav ml-auto">
  9. <li class="nav-item">
  10. {% block user_menu %}
  11. <div class="btn-group">
  12. <button class="btn btn-block dropdown-toggle" data-toggle="dropdown"
  13. data-placement="bottom">
  14. <i class="fa fa-user-alt"></i>
  15. <span class="user-name">{{ ea.user is null ? 'user.anonymous'|trans(domain = 'EasyAdminBundle') : ea.userMenu.name }}</span>
  16. {# <br /><small>
  17. {% if is_granted('ROLE_SUPER_ADMIN') %}
  18. <span class="mt-1 small text-muted">Superadmin</span>
  19. {% elseif is_granted('ROLE_ADMIN') %}
  20. <span class="mt-1 small text-muted">Admin</span>
  21. {% else %}
  22. <span class="mt-1 small text-muted">NC</span>
  23. {% endif %}
  24. </small> #}
  25. </button>
  26. {% if ea.userMenu.items|length > 0 %}
  27. <div class="dropdown-menu">
  28. {% for item in ea.userMenu.items %}
  29. {% if item.isMenuSection %}
  30. <div class="dropdown-divider"></div>
  31. {% else %}
  32. <a href="{{ item.linkUrl }}"
  33. class="dropdown-item {{ item.cssClass }}"
  34. target="{{ item.linkTarget }}" rel="{{ item.linkRel }}"
  35. referrerpolicy="origin-when-cross-origin">
  36. {% if item.icon is not empty %}
  37. <i class="fa fa-{{ item.icon }}"></i>
  38. {% endif %}
  39. <span>{{ item.label }}</span>
  40. </a>
  41. {% endif %}
  42. {% endfor %}
  43. </div>
  44. {% endif %}
  45. </div>
  46. {% endblock user_menu %}
  47. </li>
  48. <!-- Messages Dropdown Menu -->
  49. <li class="nav-item">
  50. <a href="{{ path(homepage_route()) }}" class="btn btn-block btn-outline-success" target="_blank"
  51. rel="noreferrer">
  52. Afficher le site
  53. </a>
  54. </li>
  55. </ul>
  56. </nav>