{#
Copyright (C) SPREAD WORKS Inc. All Rights Reserved.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% set const = TabaCMS2Constants %}
{% set bind_prefix = constant('ADMIN_BIND_PREFIX',const) %}
{% set trans_prefix = constant('PLUGIN_CODE_LC',const) %}
{% set tag_id_prefix = constant('PLUGIN_CODE_LC',const)%}
<script>
$(function() {
var appendNav = $('#nav-{{ constant('PLUGIN_CODE_LC',const) }}-subnav');
$('#nav-{{ constant('PLUGIN_CATEGORY_ID',const) }}').append(appendNav.html());
});
</script>
<style>
.{{ tag_id_prefix }}_nav_parent {
border-bottom: 1px solid #f7f7f9;
padding: 10px !important;
}
.{{ tag_id_prefix }}_nav_parent.active {
background-color: #f3f3f3;
}
.{{ tag_id_prefix }}_nav_child {
width: 50%;
padding: 10px !important;
border-bottom: 1px solid #f7f7f9;
text-align: center !important;
font-size: 0.9rem !important;
}
.{{ tag_id_prefix }}_nav_child:nth-child(odd) {
border-right: 1px solid #f7f7f9;
}
</style>
<ul id="nav-{{ constant('PLUGIN_CODE_LC',const) }}-subnav" style="display:none;">
<a
class="c-mainNavArea__navItemSubTitle{{ active_menus(menus)[1] != constant('PLUGIN_CODE_LC',const) ? ' collapsed' }}"
data-bs-toggle="collapse"
href="#nav-{{ constant('PLUGIN_CODE_LC',const) }}"
aria-expanded="{{ active_menus(menus)[1] != constant('PLUGIN_CODE_LC',const) ? 'true' : 'false' }}"
aria-controls="nav-{{ constant('PLUGIN_CATEGORY_ID',const) }}">
<span>CMS</span></a>
<ul class="collapse{{ active_menus(menus)[1] == constant('PLUGIN_CODE_LC',const) ? ' show' }}" id="nav-{{ constant('PLUGIN_CODE_LC',const) }}">
{% for type in type_list %}
<li><a href="{{ url(bind_prefix~'_post_list',{type_id:type.typeId}) }}" class="{{ tag_id_prefix }}_nav_parent {{ ( (type.typeId == app.request.get('type_id') and active_menus(menus)[2] != constant('PLUGIN_CODE_LC',const)~'_type') or (active_menus(menus)[2] == constant('PLUGIN_CODE_LC',const)~'_post_'~type.typeId)) ? 'active' : '' }}"><span class="fw-bold">{{ type.typeName }}</span></a></li>
<li class="d-flex">
<a href="{{ url(bind_prefix~'_post_list',{type_id:type.typeId}) }}" class="{{ tag_id_prefix }}_nav_child {{ active_menus(menus)[2] == constant('PLUGIN_CODE_LC',const)~'_post_list_'~type.typeId ? 'is-active' }}"><span>投稿一覧</span></a>
<a href="{{ url(bind_prefix~'_post_new',{type_id:type.typeId}) }}" class="{{ tag_id_prefix }}_nav_child {{ (type.typeId == app.request.get('type_id') and (active_menus(menus)[2] == constant('PLUGIN_CODE_LC',const)~'_post_'~type.typeId and app.request.get('post_id') is empty)) ? 'is-active' }}"><span>新規投稿</span></a>
</li>
<li class="d-flex">
<a href="{{ url(bind_prefix~'_category_list',{type_id:type.typeId}) }}" class="{{ tag_id_prefix }}_nav_child {{ active_menus(menus)[2] == constant('PLUGIN_CODE_LC',const)~'_category_'~type.typeId ? 'is-active' }}"><span>カテゴリー</span></a>
<a href="{{ url(bind_prefix~'_tag_list',{type_id:type.typeId}) }}" class="{{ tag_id_prefix }}_nav_child {{ active_menus(menus)[2] == constant('PLUGIN_CODE_LC',const)~'_tag_'~type.typeId ? 'is-active' }}"><span>タグ</span></a>
</li>
{% endfor %}
<li><a href="{{ url(bind_prefix~'_type_list') }}" class="{{ tag_id_prefix }}_nav_parent {{ active_menus(menus)[2] == constant('PLUGIN_CODE_LC',const)~'_type' ? 'is-active' }}"><span class="fw-bold">投稿タイプ設定</span></a></li>
</ul>
</ul>