<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
<link rel="stylesheet" href="{{ kg['tpl_url'] }}style/adminpage_manage.css">
<script src="{{ kg['tpl_url'] }}script/jquery.min.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/amazeui/js/amazeui.min.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script>
<script src="{{ kg['tpl_url'] }}script/adminpage_manage.js"></script>
</head>
<body data-type="generalComponents" style="overflow-y: hidden;">
	{% include 'component_header.tpl' %}
	<div class="tpl-page-container tpl-page-header-fixed">
		<div class="scrollbar-wrap">
		{% include 'component_left.tpl' %}
		<div class="tpl-content-wrapper">
			<div class="tpl-content-page-title">
				模块及分类管理
			</div>
			<ol class="am-breadcrumb">
				<li><a href="./" class="am-icon-home">首页</a></li>
				{% if select %}
				<li><a href="adminpage_manage">模块及分类管理</a></li>
				{% for var in module %}
				{% if var['id'] == select %}<li class="am-active">{{var['name']}}</li>{% endif %}
				{% endfor %}
				{% else %}
				<li class="am-active">模块及分类管理</li>
				{% endif %}
			</ol>
			<div class="tpl-portlet-components">
				<div class="portlet-title">
					<div class="caption font-green bold">
						<span class="am-icon-code"></span>&nbsp;模块及分类管理
					</div>
					<div class="tpl-portlet-input tpl-fz-ml fulei am-no-margintop">
						<div class="input-icon right am-fr">
							<div class="am-btn-group am-btn-group-xs">
								{% if select %}
								<a class="am-btn am-btn-default am-btn-success am-edit am-btn-xs am-btn-add" href="adminpage_update?add={{select}}"><span class="am-icon-plus"></span>&nbsp;添加页面</a>
								{% else %}
								<a class="am-btn am-btn-default am-btn-success am-edit am-btn-xs am-btn-add" href="adminpage_update"><span class="am-icon-plus"></span>&nbsp;添加模块</a>
								{% endif %}
							</div>
						</div>
					</div>
				</div>
				<div class="am-g">
					<div class="am-u-sm-12 ngco-No-paddingR">
						<form action="#" method="post">
							<table class="am-table am-table-striped am-table-hover table-main ngco-Esz-mgibdr">
								<thead>
									<tr>
										<th class="table-id">排序</th>
										<th class="table-title">模块Logo</th>
										<th class="table-title">模块Icon</th>
										<th class="table-title">模块名称</th>
										{% if select %}
										<th class="table-type">页面文件</th>
										{% endif %}
										<th class="table-title">创建时间</th>
										<th class="table-title">是否启用</th>
										<th class="table-set">操作</th>
									</tr>
								</thead>
								<tbody id="ngad-Kjs-box">
									{% for row in data %}
									<tr class="js_img">
										<td>
											<div class="ng4_width ng4-width-border">
												<input value="{{row['sort']}}" type="text" size="4" class="zty-sort">
												<input type="hidden" name="sort" value="{{row['id']}},{{row['sort']}}">
											</div>
										</td>
										<td><img {% if row['image'] %}  src="{{row['image']}}" {% else %} src="/" {% endif %} alt="" class="caterory-img" /></td>
										<td><span class="{{row['icon']}}"></span></td>
										<td>{% if select %}{{row['name']}}{% else %}<a href="adminpage_manage?mid={{row['id']}}">{{row['name']}}</a>{% endif %}</td>
										{% if select %}
										<td><a href="{{row['page']}}" target="_blank">{{row['page']}}</a></td>{% endif %}
										<td>{{row['addtime']}}</td>
										<td>
											<div class="tpl-switch">
												<a href="adminpage_manage?action=enable&enable={% if row['enable'] %}0{% else %}1{% endif %}&id={{row['id']}}" class="title2div"></a>
													<input value="" {% if row['enable']==1 %}checked="checked" {% endif %} type="checkbox" class="ios-switch bigswitch tpl-switch-btn ngad-Ojs-input">
													<div class="tpl-switch-btn-view enbale-btn">
														<div></div>
													</div>
											</div>
										</td>
										<td>
											<div class="am-btn-toolbar">
												<div class="am-btn-group am-btn-group-xs">
													<a href="adminpage_update?id={{row['id']}}" title="编辑模块" class="am-btn am-btn-default am-btn-xs am-edit-bright am-text-secondary title2div" ><span class="am-icon-pencil-square-o"></span>&nbsp;编辑</a>
													{% if row['level'] == 1 %}<a href="adminpage_manage?mid={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-son-bright am-hide-sm-only title2div" title="显示子栏目"><span class="am-icon-list"></span>&nbsp;子栏目</a>{% endif %}
													<a href="adminpage_manage?action=del&id={{row['id']}}" title="删除模块" class="am-btn am-btn-default am-btn-xs am-text-danger ngro-Jclick-shanchubi title2div"><span class="am-icon-trash-o"></span>&nbsp;删除</a>
												</div>
											</div>
										</td>
									</tr>
									{% endfor %}
								</tbody>
							</table>
							{% if not data %}<div class="no-data"><ul>没有相关数据</ul></div>{% endif %}
							<div class="tpl-portlet-input tpl-fz-ml tpl-add-fl">
								<div class="am-btn-toolbar">
									<div class="am-btn-group am-btn-group-xs ng4-width-byn">
										<button class="am-btn am-btn-success" id="addList" type="submit"><span class="am-icon-refresh"></span>&nbsp;排序更新</button>
									</div>
								</div>
							</div>
							<input type="hidden" name="action" value="sort">
						</form>
					</div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
<script>
	kg.title2div('title2div');	 //调用此方法， 把该元素的title属性替换成div
</script>
</body>
</html>