{x2;if:!$userhash}
{x2;include:header}
<body>
{x2;include:nav}
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span2">
			{x2;include:menu}
		</div>
		<div class="span10" id="datacontent">
{x2;endif}
			<ul class="breadcrumb">
				<li><a href="index.php?{x2;$_app}-master">{x2;$apps[$_app]['appname']}</a> <span class="divider">/</span></li>
				<li class="active">角色管理</li>
			</ul>
			<ul class="nav nav-tabs">
				<li class="active">
					<a href="#">角色列表</a>
				</li>
				<li class="pull-right">
					<a href="index.php?user-master-actor-add">添加角色</a>
				</li>
			</ul>
			<table class="table table-hover">
				<thead>
					<tr>
						<th>ID</th>
						<th>角色名</th>
						<th>默认注册为该角色</th>
						<th>绑定模型</th>
						<th>角色描述</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					{x2;tree:$actors['data'],group,gid}
					<tr>
						<td>{x2;v:group['groupid']}</td>
						<td>{x2;v:group['groupname']}</td>
						<td>{x2;if:v:group['groupdefault']}<a class="icon-ok"></a>{x2;else}<a class="icon-remove ajax" href="index.php?user-master-actor-selectactor&groupid={x2;v:group['groupid']}&page={x2;$page}{x2;$u}"></a>{x2;endif}</td>
						<td>{x2;$modules[v:group['groupmoduleid']]['modulename']}</td>
						<td>{x2;v:group['groupdescribe']}</td>
						<td>
							<div class="btn-group">
								<a class="btn" href="index.php?user-master-actor-modifyactor&groupid={x2;v:group['groupid']}&page={x2;$page}{x2;$u}" title="修改角色"><em class="icon-edit"></em></a>
								<a class="btn ajax" href="index.php?user-master-actor-delactor&groupid={x2;v:group['groupid']}&page={x2;$page}{x2;$u}" title="删除角色"><em class="icon-remove"></em></a>
							</div>
						</td>
					</tr>
					{x2;endtree}
				</tbody>
			</table>
			<div class="pagination pagination-right">
				<ul>{x2;$actors['pages']}</ul>
			</div>
{x2;if:!$userhash}
		</div>
	</div>
</div>
</body>
</html>
{x2;endif}