{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
{% for key1, level1 in eccubeNav %}
<li class="nav-item {% if active_menus(menus)[0] == key1 %} menu-open{% endif %}">
{% if level1.children is defined and level1.children|length > 0 %}
<a class="nav-link{{ active_menus(menus)[0] == key1 ? ' active' }}">
<i class="fa {{ level1.icon }} fa-fw" aria-hidden="true"></i>
<p>{{ level1.name|trans }}</p>
</a>
<ul class="nav nav-treeview {% if active_menus(menus)[0] == key1 %} menu-open{% endif %}" id="nav-{{ key1 }}">
{% for key2, level2 in level1.children %}
<li class="nav-item">
{% if level2.children is defined and level2.children|length > 0 %}
<a class="nav-link{{ active_menus(menus)[1] == key2 ? ' active' }}" href="#nav-{{ key2 }}" id="nav-{{ key2 }}">
{% if level2.icon is not empty %}<i class="fa {{ level2.icon }} fa-fw" aria-hidden="true"></i>{% endif %}
<p>{{ level2.name|trans }}</p>
</a>
<ul class="nav-treeview {{ active_menus(menus)[1] == key2 ? ' active' }}" id="nav-{{ key2 }}">
{% for key3, level3 in level2.children %}
<li class="nav-item">
<a href="{{ url(level3.url, level3.param is defined ? level3.param : []) }}"{{ active_menus(menus)[2] == key3 ? ' class="is-active"' }} data-action="confirm">
<span>{{ level3.name|trans }}</span>
</a>
</li>
{% endfor %}
</ul>
{% else %}
<a href="{{ url(level2.url, level2.param is defined ? level2.param : []) }}" class="nav-link{{ active_menus(menus)[1] == key2 ? ' active' }}" data-action="confirm">
<p>{{ level2.name|trans }}</p>
</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
<a class="nav-link" href="{{ url(level1.url, level1.param is defined ? level1.param : []) }}">
<i class="fa {{ level1.icon }}" aria-hidden="true"></i>
<p>{{ level1.name|trans }}</p>
</a>
{% endif %}
</li>
{% endfor %}
</nav>