Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

61 rinda
2.8KB

  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {% macro render_menu_item(item, is_sub_item = false) %}
  3. {% if item.isMenuSection %}
  4. {% if item.icon is not empty %}
  5. <span class="nav-link-icon d-md-none d-lg-inline-block">
  6. <i class="ti ti-{{ item.icon }}"></i>
  7. </span>
  8. {% endif %}
  9. <span class="nav-link-title {{ item.cssClass }}">{{ item.label }}</span>
  10. {% else %}
  11. <a href="{{ item.linkUrl }}" class="{{ is_sub_item ? 'dropdown-item' : 'nav-link' }} {{ item.cssClass }} {{ item.hasSubItems ? 'dropdown-toggle' }}"
  12. target="{{ item.linkTarget }}" rel="{{ item.linkRel }}" referrerpolicy="origin-when-cross-origin"
  13. {{ item.hasSubItems ? 'data-bs-toggle="dropdown" role="button" aria-expanded="false"' }} >
  14. {% if item.icon is not empty %}
  15. <span class="nav-link-icon d-md-none d-lg-inline-block">
  16. <i class="ti ti-{{ item.icon }}"></i>
  17. </span>
  18. {% endif %}
  19. <span class="nav-link-title">{{ item.label|raw }}</span>
  20. {% if item.hasSubItems %}<i class="fa fa-fw fa-angle-right treeview-icon"></i>{% endif %}
  21. </a>
  22. {% endif %}
  23. {% endmacro %}
  24. {% block main_menu_before %}{% endblock %}
  25. <div class="collapse navbar-collapse" id="navbar-menu">
  26. <ul class="navbar-nav pt-lg-3">
  27. {% block main_menu %}
  28. {% for menuItem in ea.mainMenu.items %}
  29. {% block menu_item %}
  30. <li class="nav-item {{ menuItem.isMenuSection ? 'header' }} {{ menuItem.hasSubItems ? 'dropdown' }} {{ ea.mainMenu.isSelected(menuItem) ? 'active' }} {{ ea.mainMenu.isExpanded(menuItem) ? 'active submenu-active' }}">
  31. {{ _self.render_menu_item(menuItem) }}
  32. {% if menuItem.hasSubItems %}
  33. <div class="dropdown-menu">
  34. <div class="dropdown-menu-columns">
  35. <div class="dropdown-menu-column">
  36. {% for menuSubItem in menuItem.subItems %}
  37. {% block menu_subitem %}
  38. {{ _self.render_menu_item(menuSubItem, true) }}
  39. {% endblock menu_subitem %}
  40. {% endfor %}
  41. </div>
  42. </div>
  43. </div>
  44. {% endif %}
  45. </li>
  46. {% endblock menu_item %}
  47. {% endfor %}
  48. {% endblock main_menu %}
  49. </ul>
  50. </div>
  51. {% block main_menu_after %}{% endblock %}
  52. <!-- <a class="dropdown-item" href="./empty.html">
  53. Empty page
  54. </a> -->