
## 代碼
```
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
<th width="40">ID</th>
<th align="left">角色名稱</th>
<th align="left">角色描述 </th>
<th width="60" align="left">狀態</th>
<th width="160">操作</th>
</tr>
</thead>
<tbody>
<foreach name="roles" item="vo">
<tr>
<td>{$vo.id}</td>
<td>{$vo.name}</td>
<td>{$vo.remark}</td>
<td>
<if condition="$vo['status'] eq 1">
<font color="red">√</font>
<else />
<font color="red">╳</font>
</if>
</td>
<td>
<if condition="$vo['id'] eq 1">
<font color="#cccccc">權限設置</font>
<font color="#cccccc">編輯</font>
<font color="#cccccc">刪除</font>
<else />
<a href="{:url('Rbac/authorize',array('id'=>$vo['id']))}">權限設置</a>
<a href="{:url('Rbac/roleedit',array('id'=>$vo['id']))}">編輯</a>
<a class="js-ajax-delete" href="{:url('Rbac/roledelete',array('id'=>$vo['id']))}">刪除</a>
</if>
</td>
</tr>
</foreach>
</tbody>
</table>
</body>
</html>
```
- 附錄
- 邏輯與數據模型
- HTML約定-bootstrap
- HTML約定-LayUI
- 角色管理 role
- 數據表
- 列表
- 控制器
- 視圖
- 視圖-layui
- 角色添加
- 控制器
- 視圖
- 角色添加提交
- 控制器
- 驗證
- 角色修改
- 控制器
- 視圖
- 角色修改提交
- 控制器
- 角色刪除
- 控制器
- 權限設置
- 控制器
- 視圖
- 模型
- 權限設置提交
- 用戶 user
- 數據表
- 列表
- 控制器
- 視圖
- 模型
- 添加
- 控制器
- 視圖
- 添加提交
- 控制器
- 驗證器
- 編輯
- 控制器
- 視圖
- 編輯提交
- 控制器
- 驗證器
- 刪除
- 停用啟用
- 角色用戶中間表role_user
- 菜單管理
- 數據表
- 表格折疊列表
- 控制器
- 視圖
- 全部列表
- 控制器
- 視圖
- 填加
- 控制器
- 視圖
- 填加提交
- 控制器
- 驗證器
- 編輯
- 控制器
- 視圖
- 編輯提交
- 控制器
- 驗證器
- 刪除
- 控制器
- 視圖
- 導入菜單
- 視圖
- 控制器
- 特別注意
- annotation
- 導出菜單
- 視圖
- 控制器
- 排序
- 控制器
- 視圖
- 模型