<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="ch">
<head th:replace="model/head :: commonHead('用户信息')">
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:replace="model/banner :: banner"></div>

<div class="content">

    <div class="container">
        <!--信息-->
        <div class="col-lg-3 content-left" role="alert">
            <span class="label label-success" th:text="${message}"></span>
            <span class="label label-success" th:text="${session.user.messages.peekFirst()}"></span>
        </div>
        <div class="clearfix"></div>
        <!--用户信息-->
        <div class="col-md-5 content-left">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th colspan="2">用户信息</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>用户ID</td>
                    <td th:text="${session.user.id}">}</td>
                </tr>
                <tr>
                    <td>用户名</td>
                    <td th:text="${session.user.name}"></td>
                </tr>
                <tr>
                    <td>钱包</td>
                    <td th:text="${session.user.money}"></td>
                </tr>
                <tr>
                    <td>注册日期</td>
                    <td th:text="${session.user.registerDate}"></td>
                </tr>
                </tbody>
            </table>
            <div class="clearfix"></div>
        </div>
        <div class="col-lg-3 colcontent-right">
            <table class="table table-responsive">
                <thead>
                <tr>
                    <th>用户头像</th>
                </tr>
                </thead>
                <tr>
                    <td><img src=""
                             th:src="${session.user.header != null?session.user.header.src:'/public/header/lumr.jpg'}"
                             class="img-thumbnail"/></td>
                </tr>
            </table>
            <div class="clearfix"></div>
        </div>
        <div class="col-lg-4 content-right">
            <div class="list-group list-group-alternate" style="margin: 20px auto;">
                <a href="/admin/" class="list-group-item" th:if="${session.user.isAdmin == 1}">
                    <span class="badge-danger">&nbsp;&nbsp;</span>
                    <i class="ti ti-comments"></i>后台管理
                </a>
                <a href="/user/recharge" class="list-group-item">
                    <span class="badge badge-success" th:text="' '+ ${session.user.money}"></span>
                    <i class="ti ti-eye"></i> 充值
                </a>
                <a href="/user/details/update" class="list-group-item">
                    <span class="badge badge-primary">&nbsp;&nbsp;</span>
                    <i class="ti ti-email"></i>修改信息
                </a>
                <a href="/user/library" class="list-group-item">
                    <span class="badge badge-warning" th:text="${session.user.games.size()}"></span>
                    <i class="ti ti-eye"></i> 游戏库
                </a>
                <a href="/user/messages" class="list-group-item">
                    <span class="badge" th:text="${session.user.messages.size()}"></span>
                    <i class="ti ti-comments"></i>消息
                </a>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
</div>

<div th:replace="model/footer :: footer"></div>
</body>
</html>