|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
- {% macro render_menu_item(item, is_sub_item = false) %}
- {% if item.isMenuSection %}
- {% if item.icon is not empty %}
- <span class="nav-link-icon d-md-none d-lg-inline-block">
- <i class="ti ti-{{ item.icon }}"></i>
- </span>
- {% endif %}
- <span class="nav-link-title {{ item.cssClass }}">{{ item.label }}</span>
- {% else %}
- <a href="{{ item.linkUrl }}" class="{{ is_sub_item ? 'dropdown-item' : 'nav-link' }} {{ item.cssClass }} {{ item.hasSubItems ? 'dropdown-toggle' }}"
- target="{{ item.linkTarget }}" rel="{{ item.linkRel }}" referrerpolicy="origin-when-cross-origin"
- {{ item.hasSubItems ? 'data-bs-toggle="dropdown" role="button" aria-expanded="false"' }} >
- {% if item.icon is not empty %}
- <span class="nav-link-icon d-md-none d-lg-inline-block">
- <i class="ti ti-{{ item.icon }}"></i>
- </span>
- {% endif %}
- <span class="nav-link-title">{{ item.label|raw }}</span>
- {% if item.hasSubItems %}<i class="fa fa-fw fa-angle-right treeview-icon"></i>{% endif %}
- </a>
- {% endif %}
- {% endmacro %}
-
- {% block main_menu_before %}{% endblock %}
-
- <div class="collapse navbar-collapse" id="navbar-menu">
- <ul class="navbar-nav pt-lg-3">
- {% block main_menu %}
- {% for menuItem in ea.mainMenu.items %}
- {% block menu_item %}
- <li class="nav-item {{ menuItem.isMenuSection ? 'header' }} {{ menuItem.hasSubItems ? 'dropdown' }} {{ ea.mainMenu.isSelected(menuItem) ? 'active' }} {{ ea.mainMenu.isExpanded(menuItem) ? 'active submenu-active' }}">
- {{ _self.render_menu_item(menuItem) }}
-
- {% if menuItem.hasSubItems %}
- <div class="dropdown-menu">
- <div class="dropdown-menu-columns">
- <div class="dropdown-menu-column">
- {% for menuSubItem in menuItem.subItems %}
- {% block menu_subitem %}
- {{ _self.render_menu_item(menuSubItem, true) }}
- {% endblock menu_subitem %}
- {% endfor %}
- </div>
- </div>
- </div>
- {% endif %}
- </li>
- {% endblock menu_item %}
- {% endfor %}
- {% endblock main_menu %}
- </ul>
- </div>
-
- {% block main_menu_after %}{% endblock %}
-
-
- <!-- <a class="dropdown-item" href="./empty.html">
- Empty page
- </a> -->
|