<!DOCTYPE html>
<!--解决idea thymeleaf 表达式模板报红波浪线-->
<!--suppress ALL -->
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 引入公用部分 -->
    <script th:replace="common/head::static"></script>
    <!-- 样式 -->
    <link th:href="@{/css/common/contianer.css}" rel="stylesheet" type="text/css"/>
</head>
<body class="layui-form" lay-filter="reviewForm">
<div class="layui-row">
    <!-- 树 -->
    <div class="layui-col-md12">
        <div class="layui-card">
            <div class="layui-card-header">数据资源审核</div>
            <div class="layui-card-body">
                <!-- 表格主体 -->
                <table class="layui-hide" id="reviewTable" lay-filter="reviewTable"></table>
                <!-- 模板 -->
                <script type="text/html" id="tableToolBar">
                    <div class="layui-btn-container layui-form" lay-filter="tableToolForm">
                        <input type="text" id="searchKeyInput" name="searchKeyInput" autocomplete="off"
                               placeholder="请输入数据名称" class="layui-input layui-btn-sm">
                        <button class="layui-btn layui-btn-sm" lay-event="query">查询</button>
                        <div class="layui-inline">
                            <label class="layui-form-label">审核状态</label>
                            <div class="layui-input-inline">
                                <input type="radio" name="reviewStatus" value="SUBMITTED" title="已提交"
                                       lay-filter="statusRadio">
                                <!--<input type="radio" name="reviewStatus" value="PASS" title="审核通过"
                                       lay-filter="statusRadio">
                                <input type="radio" name="reviewStatus" value="FAIL" title="审核不通过"
                                       lay-filter="statusRadio">-->
                                <input type="radio" name="reviewStatus" value="REJECTED" title="已驳回"
                                       lay-filter="statusRadio">
                            </div>
                        </div>
                    </div>
                </script>
                <script type="text/html" id="rowToolBar">
                    {{#
                    let disable = d.reviewStatus == 'SUBMITTED';
                    }}
                    <a class="layui-btn layui-btn-xs " lay-event="details">查看</a>
                    <a class="layui-btn layui-btn-xs {{disable ? '' : 'layui-disabled'}}"
                       lay-event="{{disable ? 'review' : ''}}">驳回</a>
                </script>
            </div>
        </div>
    </div>
</div>
</body>

<!-- js -->
<script th:replace="common/head::static-foot"></script>
<script th:src="@{/js/review/review.js}"></script>
<script>
    layui.use(['ReviewComponent'], function () {
        window.ReviewComponent = layui.ReviewComponent;
        ReviewComponent.renderMetadataList();
    });
</script>
</html>