<!doctype html>
<html dir="{-:*_LD_-}">
<head>
<meta charset="utf-8" />
<title>{-:@MANAGE-}</title>
{-include:../meta-}
<script>
var GV = {
	_LD_ : '{-:*_LD_-}',
	LANG_NAME : '{-:*LANG_NAME-}',
	URL : {
		SORT_CATEGORY : '{-url:admin@article_category/_sort_category_do?timeKey={$_TK['timeKey']}&token={$_TK['token']}-}'
	}
};
</script>
</head>

<body>
<div class="container margin">

<form id="formList" action="" method="post">
<ul class="subnav subnav-tab">
	<li class="active"><a href="#">{-:@ARTICLE_CATEGORY_LIST-}</a></li>
</ul>
<div id="tabContent">
	{-if:empty($_ACL)-}
		<div class="placeholder margin">{-:@LIST_EMPTY-}</div>
	{-else:-}
		<div id="tree-menu" class="margin">
			<span class="btn btn-sm" data-tree-nestable-action="expand-all">{-:@EXPAND_ALL-}</span>
			<span class="btn btn-sm" data-tree-nestable-action="collapse-all">{-:@COLLAPSE_ALL-}</span>
		</div>
		<div class="tree">
{-function:list_category|$acl,$_TK-}
<ul class="tree-list">
{-foreach:$acl,$ac-}
	<li class="tree-item" data-id="{-:$ac['article_category_id']-}">
		<input name="article_category_id[{-:$ac['article_category_id']-}]" type="checkbox" value="{-:$ac['article_category_id']-}" class="select_sub">
		<span class='tree-sortable-handle'>
			<strong{-if:!$ac['ac_display_switch']-} class="text-muted"{-:/if-}>{-:$ac['ac_name']-}{-if:!empty($ac['ac_alias'])-} <small class="badge badge-success">{-:$ac['ac_alias']-}</small>{-:/if-} [ID:{-:$ac['article_category_id']-}]</strong>
			<span class="badge badge-cycle badge-info">{-:$ac['ac_article_count']-}</span><span class="badge badge-cycle">{-:$ac['ac_review_count']-}</span>
		</span>
		<span class='text-muted text-sm'>
			{-if:!empty($ac['ac_url'])-}<a href="{-:$ac['ac_url']-}" target="_blank">{-:@PREVIEW-}</a> | {-:/if-}
			<a href="{-url:admin@article/list_article?article_category_id={$ac['article_category_id']}-}" >{-:@CONTENT_LIST-}</a>
			| <a href="{-url:admin@article/add_article?article_category_id={$ac['article_category_id']}-}">{-:@ADD_CONTENT-}</a>
			| <a href="{-url:admin@article_category/add_category?ac_parent_id={$ac['article_category_id']}-}">{-:@ADD_SUB_CATEGORY-}</a>
			| <a href="{-url:admin@article_category/add_category?is_batch=1&ac_parent_id={$ac['article_category_id']}-}">{-:@ADD_BATCH_OF_SUB_CATEGORY-}</a>
			| <a href="{-url:admin@article_category/edit_category?article_category_id={$ac['article_category_id']}-}">{-:@EDIT-}</a> 
			| <a href="{-url:admin@article_category/update_count_do?article_category_id={$ac['article_category_id']}&timeKey={$_TK['timeKey']}&token={$_TK['token']}-}">{-:@UPDATE_COUNT-}</a>
			| <a href="{-url:admin@article_category/delete_category_do?article_category_id={$ac['article_category_id']}&timeKey={$_TK['timeKey']}&token={$_TK['token']}-}" class="delete_confirm">{-:@DELETE-}</a>
		</span>
		{-if:isset($ac['ac_sub_category']) and !empty($ac['ac_sub_category'])-}
			{-call:list_category|$ac['ac_sub_category'],$_TK-}
		{-:/if-}
	</li>
{-:/foreach-}
</ul>
{-:/function-}
		{-call:list_category|$_ACL,$_TK-}
		</div>
	{-:/if-}
</div>
<div id="operation" class="margin">
	<input name="timeKey" type="hidden" value="{-:$_TK['timeKey']-}">
	<input name="token" type="hidden" value="{-:$_TK['token']-}">
	<label class="text-mi"><input type="checkbox" class="select_all" to="article_category_id"> {-:@SELECT_ALL-}</label>
	<a class="btn" href="{-url:admin@article_category/add_category-}">{-:@ADD_CATEGORY-}</a>
	<a class="btn" href="{-url:admin@article_category/add_category?is_batch=1-}">{-:@ADD_BATCH_OF_CATEGORY-}</a>
	<span class="btn submit" action="{-url:admin@article_category/update_count_do-}" to="#formList">{-:@UPDATE_COUNT-}</span>
	<span class="btn submit" action="{-url:admin@article_category/delete_category_do-}" to="#formList">{-:@DELETE_SELECTED-}</span>
	<input class="btn" type="reset" value="{-:@RESET-}">
</div><!--/#operation-->
</form>

</div>
<script src="{-:*__RES__-}js/loga.js"></script>
<script src="{-:*__RES__-}js/jquery.js"></script>
<script src="{-:*__RES__-}fea/js/fea.min.js"></script>
<script src="{-:*__STYLE__-}js/common.js"></script>
<script src="{-:*__STYLE__-}js/admin.js"></script>
<script src="{-:*__STYLE__-}js/list_article_category.js"></script>
</body>
</html>