<!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/role_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/role_manage.js"></script>
</head>
<body data-type="generalComponents">
	{% 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 ngco-Osz-marginT">
			<div class="tpl-content-page-title">
				角色管理
			</div>
			<ol class="am-breadcrumb">
				<li><a href="./" class="am-icon-home">首页</a></li>
				<li class="am-active">角色管理</li>
			</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 am-no-margintop ">
						<div class="portlet-input input-small input-inline">
							<div class="input-icon right am-fr">
								<div class="am-btn-group am-btn-group-xs">
									<a class="am-btn am-btn-default am-btn-success" href="role_update"><span class="am-icon-plus"></span>&nbsp;新增</a>
								</div>
							</div>
							<div class="am-cf"></div>
						</div>
					</div>
				</div>
				<div class="am-g">
					<div class="am-u-sm-12 ngco-No-paddingR">
						<form class="am-form" action="#" method="get" id="am-form">
							<table class="am-table am-table-striped am-table-hover table-main ngco-Esz-mgibdr">
								<thead>
									<tr>
										<th class="table-title">角色名称</th>
										<th class="table-title">权限类型</th>
										<th class="table-title">角色描述</th>
										<th class="table-title">创建时间</th>
										<th class="table-set">操作</th>
									</tr>
								</thead>
								<tbody>
									{% for row in data %}
									<tr>
										<td>{{row['name']}}</td>
										<td>
											{% if row['type'] == 99 %}
											所有权限
											{% else %}
											自定义权限
											{% endif %}
										</td>
										<td>{{row['description']}}</td>
										<td>{{row['addtime']}}</td>
										<td>
											<div class="am-btn-toolbar">
												<div class="am-btn-group am-btn-group-xs">
													<a href="role_update?roleid={{row['id']}}" title="编辑角色" class="am-btn am-btn-default am-btn-xs am-text-secondary title2div"><span class="am-icon-pencil-square-o"></span>&nbsp;编辑</a>
													<a href="role_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 %}
						</form>
						<div class="am-alert am-alert-success success-info">
							<ul class="margin-bottom-none padding-left-lg">
								<li class="am-state-info">状态说明：</li>
								<li class="am-verify">
									<span class="am-icon-info-circle am-icon-sm am-white"></span>&nbsp;&nbsp;删除角色时必须先删除与之相关的管理员<br />
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
		<script>
			 kg.title2div('title2div');	 //调用此方法， 把该元素的title属性替换成div
		</script>
</body>
</html>