<?php /*a:4:{s:75:"E:\phpstudy_pro\WWW\data\hkcms\template\admin\adminlte\cms\flags\index.html";i:1715617489;s:74:"E:\phpstudy_pro\WWW\data\hkcms\template\admin\adminlte\common\default.html";i:1715617489;s:71:"E:\phpstudy_pro\WWW\data\hkcms\template\admin\adminlte\common\meta.html";i:1715617489;s:73:"E:\phpstudy_pro\WWW\data\hkcms\template\admin\adminlte\common\script.html";i:1715617489;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta name="csrf-token" content="<?php echo token(); ?>">

    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="referrer" content="never">
<meta name="renderer" content="webkit">
<title><?php echo $site['title']; ?> - <?php echo lang("Backstage panel"); ?></title>

<link rel="Shortcut Icon" href="<?php echo $site['favicon']; ?>?v=<?php echo env('APP_DEBUG')?time():$site['version']; ?>" type="image/x-icon" />

<!-- Font Awesome 5.13.0 字体图标库 -->
<link rel="stylesheet" href="/static/libs/fontawesome-free/css/all.min.css">
<!-- AdminLTE v3.2.0 | Bootstrap v4.6.0 CSS框架 -->
<link rel="stylesheet" href="/static/module/admin/adminlte/css/adminlte.css?v=<?php echo env('APP_DEBUG')?time():$site['version']; ?>">
<link rel="stylesheet" href="/static/module/admin/adminlte/css/common.css?v=<?php echo env('APP_DEBUG')?time():$site['version']; ?>">

<script type="text/javascript">
    window.Config = <?php echo json_encode($site); ?>;
    window.Lang = <?php echo json_encode($tempLang); ?>;
    window.Tpl = <?php echo json_encode($Tpl); ?>;
</script>

    <style>
        html,body,.wrapper {
            height: 100% !important;
        }
        .content {
            min-height: 100%;
            height: auto;
            padding-bottom: 20px;
            background-color: #f2f3f5;
        }
        .operatePage .card-footer {
            width: 100%;
            position: fixed;
            bottom: 0;
            z-index: 99;
        }
    </style>

    {__STYLE__}

</head>
<body class="sidebar-mini layout-top-nav overlayScrollbars" >

    <?php if(empty($popup)): ?>
    <!-- 子页 -->
    <div class="wrapper">
        <div class="content">
            <div class="container-fluid" style="padding-top: 16px">
                <div class="card">
    <div class="card-body">
        <div id="toolbar" class="toolbar">
            <?php if(has_rule('add')): ?>
            <button type="button" class="btn btn-primary btn-add " data-url="<?php echo url('/cms.flags/add'); ?>"><i class="fas fa-plus"></i> <?php echo lang('Add'); ?></button>
            <?php endif; ?>
            <div class="dropdown mr-1 btn-toggle" data-toggle="tooltip" data-placement="right" data-title="点击表格行进行批量操作">
                <a class="btn btn-secondary dropdown-toggle btn-disabled disabled" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="<?php echo lang('Batch operation'); ?>"><i class="fas fa-cog"></i> <?php echo lang('More'); ?></a>
                <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
                    <?php if(has_rule('del')): ?>
                    <a class="dropdown-item btn-del" href="#" data-url="<?php echo url('/cms.flags/del'); ?>"><i class="fas fa-trash-alt"></i> <?php echo lang('Batch delete'); ?></a>
                    <?php endif; ?>
                    <div class="dropdown-divider"></div>
                    <?php if(has_rule('batches')): ?>
                    <a class="dropdown-item status" href="#" data-params="status=normal"><i class="fas fa-check-circle"></i> <?php echo lang('Set to enable'); ?></a>
                    <a class="dropdown-item status" href="#" data-params="status=hidden"><i class="fas fa-ban"></i> <?php echo lang('Set to disabled'); ?></a>
                    <?php endif; ?>
                </div>
            </div>
        </div>

        <table id="table"
               data-edit="<?php if(has_rule('edit')): ?><?php echo url('/cms.flags/edit'); ?><?php endif; ?>"
               data-del="<?php if(has_rule('del')): ?><?php echo url('/cms.flags/del'); ?><?php endif; ?>"
               data-batches="<?php if(has_rule('batches')): ?><?php echo url('/cms.flags/batches'); ?><?php endif; ?>"
        ></table>
    </div>
</div>

{block:script}
<script>
    require(['admin','table'], function (admin, Table) {
        $(function () {
            Table.init({
                url: "<?php echo url('/cms.flags/index'); ?>",
                showToggle: false,
                search: true,
                contentLangSw: true,
                formatSearch: function(){return "<?php echo lang('Search'); ?><?php echo lang('Title'); ?>"},
                columns: [{
                    field: 'state',
                    checkbox: true,
                    formatter: function (value, row, index, field) {
                        if (row['name']=='top') {
                            return {disabled:true};
                        } else {
                            return {disabled:false};
                        }
                    }
                },{
                    field: 'weigh',
                    title: '<?php echo lang("Weigh"); ?>',
                    formatter:Table.formatter.txtEditBtn,
                    events:Table.events.txtEditBtn
                },{
                    field: 'id',
                    title: 'ID',
                    visible: false
                },{
                    field: 'title',
                    title: '<?php echo lang("Title"); ?>',
                },{
                    field: 'name',
                    title: '<?php echo lang("Name"); ?>',
                },{
                    field: 'create_time',
                    title: '<?php echo lang("Create time"); ?>',
                    visible: false
                },{
                    field: 'update_time',
                    title: '<?php echo lang("Update time"); ?>',
                    visible: true
                },{
                    field: 'status',
                    title: '<?php echo lang("Status"); ?>',
                    formatter: Table.formatter.switchBtn,
                    events: Table.events.switchBtn
                },{
                    field: 'operate',
                    title: '<?php echo lang("Operate"); ?>',
                    formatter: function (value, row, index) {
                        if (row['name']=='top') {
                            return '<button type="button" class="btn btn-primary btn-xs btn-row-edit" data-toggle="tooltip" data-placement="top" title="" data-popup="true"><i class="fas fa-pen"></i></button>';
                        }
                        return Table.formatter.operate.call(this, value, row, index)
                    },
                    events: Table.events.operate
                }]});
        })
    })
</script>
{/block:script}
            </div>
        </div>
    </div>

    <?php else: ?>
    <div class="operatePage">
        <div class="card">
    <div class="card-body">
        <div id="toolbar" class="toolbar">
            <?php if(has_rule('add')): ?>
            <button type="button" class="btn btn-primary btn-add " data-url="<?php echo url('/cms.flags/add'); ?>"><i class="fas fa-plus"></i> <?php echo lang('Add'); ?></button>
            <?php endif; ?>
            <div class="dropdown mr-1 btn-toggle" data-toggle="tooltip" data-placement="right" data-title="点击表格行进行批量操作">
                <a class="btn btn-secondary dropdown-toggle btn-disabled disabled" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="<?php echo lang('Batch operation'); ?>"><i class="fas fa-cog"></i> <?php echo lang('More'); ?></a>
                <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
                    <?php if(has_rule('del')): ?>
                    <a class="dropdown-item btn-del" href="#" data-url="<?php echo url('/cms.flags/del'); ?>"><i class="fas fa-trash-alt"></i> <?php echo lang('Batch delete'); ?></a>
                    <?php endif; ?>
                    <div class="dropdown-divider"></div>
                    <?php if(has_rule('batches')): ?>
                    <a class="dropdown-item status" href="#" data-params="status=normal"><i class="fas fa-check-circle"></i> <?php echo lang('Set to enable'); ?></a>
                    <a class="dropdown-item status" href="#" data-params="status=hidden"><i class="fas fa-ban"></i> <?php echo lang('Set to disabled'); ?></a>
                    <?php endif; ?>
                </div>
            </div>
        </div>

        <table id="table"
               data-edit="<?php if(has_rule('edit')): ?><?php echo url('/cms.flags/edit'); ?><?php endif; ?>"
               data-del="<?php if(has_rule('del')): ?><?php echo url('/cms.flags/del'); ?><?php endif; ?>"
               data-batches="<?php if(has_rule('batches')): ?><?php echo url('/cms.flags/batches'); ?><?php endif; ?>"
        ></table>
    </div>
</div>

{block:script}
<script>
    require(['admin','table'], function (admin, Table) {
        $(function () {
            Table.init({
                url: "<?php echo url('/cms.flags/index'); ?>",
                showToggle: false,
                search: true,
                contentLangSw: true,
                formatSearch: function(){return "<?php echo lang('Search'); ?><?php echo lang('Title'); ?>"},
                columns: [{
                    field: 'state',
                    checkbox: true,
                    formatter: function (value, row, index, field) {
                        if (row['name']=='top') {
                            return {disabled:true};
                        } else {
                            return {disabled:false};
                        }
                    }
                },{
                    field: 'weigh',
                    title: '<?php echo lang("Weigh"); ?>',
                    formatter:Table.formatter.txtEditBtn,
                    events:Table.events.txtEditBtn
                },{
                    field: 'id',
                    title: 'ID',
                    visible: false
                },{
                    field: 'title',
                    title: '<?php echo lang("Title"); ?>',
                },{
                    field: 'name',
                    title: '<?php echo lang("Name"); ?>',
                },{
                    field: 'create_time',
                    title: '<?php echo lang("Create time"); ?>',
                    visible: false
                },{
                    field: 'update_time',
                    title: '<?php echo lang("Update time"); ?>',
                    visible: true
                },{
                    field: 'status',
                    title: '<?php echo lang("Status"); ?>',
                    formatter: Table.formatter.switchBtn,
                    events: Table.events.switchBtn
                },{
                    field: 'operate',
                    title: '<?php echo lang("Operate"); ?>',
                    formatter: function (value, row, index) {
                        if (row['name']=='top') {
                            return '<button type="button" class="btn btn-primary btn-xs btn-row-edit" data-toggle="tooltip" data-placement="top" title="" data-popup="true"><i class="fas fa-pen"></i></button>';
                        }
                        return Table.formatter.operate.call(this, value, row, index)
                    },
                    events: Table.events.operate
                }]});
        })
    })
</script>
{/block:script}
    </div>
    <?php endif; ?>

    <script src="/static/libs/require/require.js"></script>
<script src="/static/module/admin/adminlte/js/main.js?v=<?php echo env('APP_DEBUG')?time():$site['version']; ?>"></script>

<!-- // 加载插件JS-->
<?php echo load_js(); ?>



    {__SCRIPT__}
    
</body>
</html>