<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('徽章详情')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-badge-detail" th:object="${badge}">
        <div class="form-group">
            <label class="col-sm-3 control-label">徽章名称：</label>
            <div class="col-sm-8">
                <div class="form-control-static" th:text="*{name}"></div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">徽章副标题：</label>
            <div class="col-sm-8">
                <div class="form-control-static" th:text="*{subTitle != null and subTitle != '' ? subTitle : '-'}"></div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">徽章图标：</label>
            <div class="col-sm-8">
                <div class="form-control-static">
                    <span th:if="*{icon != null and (!icon.startsWith('http') and !icon.startsWith('/'))}" style="font-size: 24px;" th:text="*{icon}"></span>
                    <img th:if="*{icon != null and (icon.startsWith('http') or icon.startsWith('/'))}" th:src="*{icon}" style="max-height: 30px;"/>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">徽章类型：</label>
            <div class="col-sm-8">
                <div class="form-control-static" th:if="*{type == 1}">护照纪念徽章</div>
                <div class="form-control-static" th:if="*{type == 2}">演出纪念徽章</div>
                <div class="form-control-static" th:if="*{type == 4}">签证页</div>
<!--                <div class="form-control-static" th:if="*{type == 3}">特殊徽章</div>-->
            </div>
        </div>
        <div class="form-group" th:style="${badge.type == 2 or badge.type == 4 ? 'display:block;' : 'display:none;'}">
            <label class="col-sm-3 control-label">关联演出：</label>
            <div class="col-sm-8">
                <div class="form-control-static" th:text="*{performanceId}"></div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">状态：</label>
            <div class="col-sm-8">
                <div class="form-control-static" th:if="*{displayStatus == 1}">已发布</div>
                <div class="form-control-static" th:if="*{displayStatus == 0}">下架</div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">排序：</label>
            <div class="col-sm-8">
                <div class="form-control-static" th:text="*{sort}"></div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">分享文案：</label>
            <div class="col-sm-8">
                <div class="form-control-static" th:text="*{shareText}"></div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
    $(function() {
        // 隐藏底部的确认按钮，只保留关闭按钮
        var index = parent.layer.getFrameIndex(window.name);
        if (index) {
            var $layero = parent.$("#layui-layer" + index);
            $layero.find(".layui-layer-btn0").hide(); // 隐藏确认按钮
        }
    });
</script>
</body>
</html>