<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})"></head>

<body class="timo-layout-page">
<div class="layui-card">
    <div class="layui-card-header timo-card-header">
        <span><i class="fa fa-bars"></i> 系统消息列表</span>
        <i class="layui-icon layui-icon-refresh refresh-btn"></i>
    </div>
    <div class="layui-card-body">
        <div class="layui-row timo-card-screen put-row">
            <div class="layui-row timo-card-screen put-row">
                <div class="pull-right">
                    <div class="btn-group-right">
                        <button class="layui-btn">
                            <i class="fa fa-recycle"><a class="ajax-post" th:href="@{/api/sys/message/clear}">清空消息</a></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
        <div class="timo-table-wrap">
            <table class="layui-table timo-table">
                <thead>
                <tr>
                    <th data-field="createAt">时间</th>
                    <th data-field="title">标题</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="item:${list}">
                    <td th:text="${item.createAt}">时间</td>
                    <td th:text="${item.title}">标题</td>
                    <td>
                        <a class="open-popup" data-title="消息内容" th:attr="data-url=@{'/sys/message/detail/'+${item.id}}"
                           data-size="960,480" href="#">查看</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>

<script th:replace="/common/template :: script"></script>
</body>
</html>