src/Eccube/Resource/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. <nav>
  9.     <ul class="c-mainNavArea__nav">
  10.         <!-- ホーム -->
  11.         <li class="c-mainNavArea__navItem">
  12.             <a class="c-mainNavArea__navItemTitle" href="{{ url('admin_homepage') }}">
  13.                 <i class="fa fa-home fa-fw" aria-hidden="true"></i>
  14.                 <span>{{ 'admin.home'|trans }}</span>
  15.             </a>
  16.         </li>
  17.         {% for key1, level1 in eccubeNav %}
  18.             <li class="c-mainNavArea__navItem">
  19.                 {% if level1.children is defined and level1.children|length > 0 %}
  20.                     <a class="c-mainNavArea__navItemTitle{{ active_menus(menus)[0] != key1 ? ' collapsed' }}"
  21.                        data-bs-toggle="collapse" href="#nav-{{ key1 }}"
  22.                        aria-expanded="{{ active_menus(menus)[0] == key1 ? 'true' : 'false' }}"
  23.                        aria-controls="nav-{{ key1 }}">
  24.                         <i class="fa {{ level1.icon }} fa-fw" aria-hidden="true"></i>
  25.                         <span>{{ level1.name|trans }}</span>
  26.                     </a>
  27.                     <ul class="collapse {% if active_menus(menus)[0] == key1 %} show{% endif %}" id="nav-{{ key1 }}">
  28.                         {% for key2, level2 in level1.children %}
  29.                             <li>
  30.                                 {% if level2.children is defined and level2.children|length > 0 %}
  31.                                     <a class="c-mainNavArea__navItemSubTitle{{ active_menus(menus)[1] != key2 ? ' collapsed' }}"
  32.                                        data-bs-toggle="collapse" href="#nav-{{ key2 }}"
  33.                                        aria-expanded="{{ active_menus(menus)[1] != key2 ? 'true' : 'false' }}"
  34.                                        aria-controls="nav-{{ key2 }}">
  35.                                         <span>{{ level2.name|trans }}</span>
  36.                                     </a>
  37.                                     <ul class="collapse{{ active_menus(menus)[1] == key2 ? ' show' }}" id="nav-{{ key2 }}">
  38.                                         {% for key3, level3 in level2.children %}
  39.                                             <li>
  40.                                                 <a href="{{ url(level3.url, level3.param is defined ? level3.param : []) }}"{{ active_menus(menus)[2] == key3 ? ' class="is-active"' }}>
  41.                                                     <span>{{ level3.name|trans }}</span>
  42.                                                 </a>
  43.                                             </li>
  44.                                         {% endfor %}
  45.                                     </ul>
  46.                                 {% else %}
  47.                                     <a href="{{ url(level2.url, level2.param is defined ? level2.param : []) }}"{{ active_menus(menus)[1] == key2 ? ' class="is-active"' }}>
  48.                                         <span>{{ level2.name|trans }}</span>
  49.                                     </a>
  50.                                 {% endif %}
  51.                             </li>
  52.                         {% endfor %}
  53.                     </ul>
  54.                 {% else %}
  55.                     <a class="c-mainNavArea__navItemTitle" href="{{ url(level1.url, level1.param is defined ? level1.param : []) }}">
  56.                         <i class="fa {{ level1.icon }}" aria-hidden="true"></i>
  57.                         <span>{{ level1.name|trans }}</span>
  58.                     </a>
  59.                 {% endif %}
  60.             </li>
  61.         {% endfor %}
  62.         <!-- 情報 -->
  63.         <li class="c-mainNavArea__navItem">
  64.             <a class="c-mainNavArea__navItemTitle collapsed" data-bs-toggle="collapse" href="#others" aria-expanded="false"
  65.                aria-controls="others">
  66.                 <i class="fa fa-info-circle fa-fw" aria-hidden="true"></i>
  67.                 <span>{{ 'admin.info'|trans }}</span>
  68.             </a>
  69.             <ul class="collapse" id="others">
  70.                 <li>
  71.                     <a href="{{ eccube_config.eccube_official_site_url }}" target="_blank">
  72.                         <span>{{ 'admin.info.official_site'|trans }}</span>
  73.                     </a>
  74.                 </li>
  75.                 <li>
  76.                     <a href="{{ eccube_config.eccube_community_site_url }}" target="_blank">
  77.                         <span>{{ 'admin.info.community'|trans }}</span>
  78.                     </a>
  79.                 </li>
  80.                 <li>
  81.                     <a href="{{ eccube_config.eccube_document_url }}" target="_blank">
  82.                         <span>{{ 'admin.info.document'|trans }}</span>
  83.                     </a>
  84.                 </li>
  85.                 <li>
  86.                     <a href="{{ eccube_config.eccube_manual_url }}" target="_blank">
  87.                         <span>{{ 'admin.info.manual'|trans }}</span>
  88.                     </a>
  89.                 </li>
  90.             </ul>
  91.         </li>
  92.     </ul>
  93. </nav>