<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>用户详情</title>
    <th:block th:replace="~{/backstage/common_resources::common_css}"></th:block>
    <th:block th:replace="~{/backstage/common_resources::common_js}"></th:block>
</head>
<body class="hold-transition skin-purple sidebar-mini">
<div class="wrapper">
    <!-- 引入页面头部 -->
    <header th:replace="~{/backstage/common_header::header}"></header>
    <!-- 导航侧栏 -->
    <aside th:replace="~{/backstage/common_aside::aside}"></aside>
    <!-- 内容区域 -->
    <div class="content-wrapper">

        <!-- 内容头部 -->
        <section class="content-header">
            <h1>
                用户详情
                <small>全部用户</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="@{/backstage/index}"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li><a href="@{/backstage/admin/desc}">用户详情</a></li>
                <li class="active">全部用户</li>
            </ol>
        </section>
        <!-- 内容头部 /-->

        <!-- 正文区域 -->
        <section class="content">
            <table id="collapse-table" class="table table-bordered table-hover dataTable">
                <thead>
                <tr>
                    <th>名称</th>
                    <th>详情</th>
                </tr>
                </thead>
                <tr>
                    <td th:text="${admin.username}"></td>
                </tr>
                <tbody th:each="role,status:${admin.roles}">
                    <tr th:attr="data-tt-id=${status.index}">
                        <td th:text="${role.roleName}"></td>
                        <td th:text="${role.roleDesc}"></td>
                    </tr>
                    <tr th:each="permission:${role.permissions}" th:attr="data-tt-parent-id=${status.index}" data-tt-id="1-1">
                        <td th:text="${permission.permissionName}"></td>
                        <td th:text="${permission.permissionDesc}"></td>
                    </tr>
                </tbody>
            </table>
            <div class="box-title text-center">
                <button type="button" class="btn bg-green" onclick="history.back(-1);">返回</button>
            </div>
        </section>
        <!-- 正文区域 /-->

    </div>
    <!-- 底部导航 -->
    <footer th:replace="~{/backstage/common_footer::footer}"></footer>
    <script>
        $(document).ready(function() {

            /*table tree*/
            $("#collapse-table").treetable({
                expandable: true
            });

        });
    </script>
</div>
</body>

</html>