app/template/admin/nav.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8.       <!-- Sidebar Menu -->
  9.       <nav class="mt-2">
  10.         <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
  11.         {% for key1, level1 in eccubeNav %}
  12.              <li class="nav-item {% if active_menus(menus)[0] == key1 %} menu-open{% endif %}">
  13.                 {% if level1.children is defined and level1.children|length > 0 %}
  14.                     <a class="nav-link{{ active_menus(menus)[0] == key1 ? ' active' }}">
  15.                         <i class="fa {{ level1.icon }} fa-fw" aria-hidden="true"></i>
  16.                         <p>{{ level1.name|trans }}</p>
  17.                     </a>
  18.                     <ul class="nav nav-treeview {% if active_menus(menus)[0] == key1 %} menu-open{% endif %}" id="nav-{{ key1 }}">
  19.                         {% for key2, level2 in level1.children %}
  20.                             <li class="nav-item">
  21.                                 {% if level2.children is defined and level2.children|length > 0 %}
  22.                                     <a class="nav-link{{ active_menus(menus)[1] == key2 ? ' active' }}" href="#nav-{{ key2 }}" id="nav-{{ key2 }}">
  23.                                         {% if level2.icon is not empty %}<i class="fa {{ level2.icon }} fa-fw" aria-hidden="true"></i>{% endif %}
  24.                                         <p>{{ level2.name|trans }}</p>
  25.                                     </a>
  26.                                     <ul class="nav-treeview {{ active_menus(menus)[1] == key2 ? ' active' }}" id="nav-{{ key2 }}">
  27.                                         {% for key3, level3 in level2.children %}
  28.                                             <li class="nav-item">
  29.                                                 <a href="{{ url(level3.url, level3.param is defined ? level3.param : []) }}"{{ active_menus(menus)[2] == key3 ? ' class="is-active"' }} data-action="confirm">
  30.                                                     <span>{{ level3.name|trans }}</span>
  31.                                                 </a>
  32.                                             </li>
  33.                                         {% endfor %}
  34.                                     </ul>
  35.                                 {% else %}
  36.                                     <a href="{{ url(level2.url, level2.param is defined ? level2.param : []) }}" class="nav-link{{ active_menus(menus)[1] == key2 ? ' active' }}" data-action="confirm">
  37.                                         <p>{{ level2.name|trans }}</p>
  38.                                     </a>
  39.                                 {% endif %}
  40.                             </li>
  41.                         {% endfor %}
  42.                     </ul>
  43.                 {% else %}
  44.                     <a class="nav-link" href="{{ url(level1.url, level1.param is defined ? level1.param : []) }}">
  45.                         <i class="fa {{ level1.icon }}" aria-hidden="true"></i>
  46.                         <p>{{ level1.name|trans }}</p>
  47.                     </a>
  48.                 {% endif %}
  49.             </li>
  50.         {% endfor %}
  51.       </nav>