app/Plugin/TabaCustomFields2/Resource/template/admin/snippet/nav.twig line 1

Open in your IDE?
  1. {% set const = TabaCustomFields2Constants %}
  2. {% set bind_prefix = constant('ADMIN_BIND_PREFIX',const) %}
  3. {% set trans_prefix = constant('PLUGIN_CODE_LC',const) %}
  4. <script>
  5.     $(function() {
  6.         var appendNav = $('#nav-{{ constant('PLUGIN_CODE_LC',const) }}-subnav');
  7.         $('#nav-{{ constant('PLUGIN_CATEGORY_ID',const) }}').append(appendNav.html());
  8.     });
  9. </script>
  10. <ul id="nav-{{ constant('PLUGIN_CODE_LC',const) }}-subnav" style="display:none;">
  11.     <a
  12.         class="c-mainNavArea__navItemSubTitle{{ active_menus(menus)[1] != constant('PLUGIN_CODE_LC',const) ? ' collapsed' }}"
  13.         data-bs-toggle="collapse"
  14.         href="#nav-{{ constant('PLUGIN_CODE_LC',const) }}"
  15.         aria-expanded="{{ active_menus(menus)[1] != constant('PLUGIN_CODE_LC',const) ? 'true' : 'false' }}"
  16.         aria-controls="nav-{{ constant('PLUGIN_CATEGORY_ID',const) }}">
  17.         <span style="font-size: 14px;">カスタムフィールド</span></a>
  18.     <ul class="collapse{{ active_menus(menus)[1] == constant('PLUGIN_CODE_LC',const) ? ' show' }}" id="nav-{{ constant('PLUGIN_CODE_LC',const) }}">
  19.         {% for row in TabaCustomFields2Constants.TARGET_ENTITY %}
  20.             <li><a href="{{ url(bind_prefix~'list_'~row.key) }}" ><span>&nbsp;{{ row.name|trans }}</span></a></li>
  21.             <li><a href="{{ path(bind_prefix~'list_'~row.key) }}" {{ active_menus(menus)[2] == constant('PLUGIN_CODE_LC',const)~'_list_'~row.key ? 'class="is-active"' }} ><span>&nbsp;&nbsp;{{ 'taba_custom_fields.nav.field_list'|trans }}</span></a></li>
  22.             <li><a href="{{ path(bind_prefix~'regist_'~row.key) }}" {{ active_menus(menus)[2] == constant('PLUGIN_CODE_LC',const)~'_regist_'~row.key ? 'class="is-active"' }} ><span>&nbsp;&nbsp;{{ 'taba_custom_fields.nav.registration'|trans }}</span></a></li>
  23.             {% if row.key == "product" %}
  24.             <li><a href="{{ path(bind_prefix~row.key~'_csv_manage') }}" {{ active_menus(menus)[2] == constant('PLUGIN_CODE_LC',const)~'_'~row.key~'_csv_manage' ? 'class="is-active"' }} ><span>&nbsp;&nbsp;{{ 'taba_custom_fields.nav.csv_manage'|trans }}</span></a></li>
  25.             {% endif %}
  26.         {% endfor %}
  27.     </ul>
  28. </ul>