{layout name="manager/layout" /}

<div class="layui-row layui-col-space12">
    <div class="layui-col-xs12 layui-col-md12">
        <div class="layuimini-container location-index-page">
            <div class="layuimini-main">
                <fieldset class="table-search-fieldset" style="display: none">
                    <legend>搜索信息</legend>
                    <div style="margin: 10px 10px 10px 10px">
                        <form class="layui-form layui-form-pane" action="">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">状态</label>
                                    <div class="layui-input-block">
                                        <select name="status">
                                            <option value=""></option>
                                            <option value="0">禁用</option>
                                            <option value="1">正常</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">类型</label>
                                    <div class="layui-input-block">
                                        <select name="type">
                                            <option value=""></option>
                                            <option value="normal">普通视频</option>
                                            <option value="video_number">视频号</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">标题</label>
                                    <div class="layui-input-block">
                                        <input class="layui-input" name="title" placeholder="支持模糊查询">
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">副标题</label>
                                    <div class="layui-input-block">
                                        <input class="layui-input" name="subtitle" placeholder="支持模糊查询">
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <button type="submit" class="layui-btn layui-btn-primary" lay-submit
                                            lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </fieldset>
                <div class="image-table">
                    <table id="table-container" class="layui-table" data-url="/manager/video/index"
                           lay-filter="table-container-filter"></table>
                </div>
            </div>
        </div>
    </div>
</div>


<!-- 隐藏列 -->
<!-- 编辑单元格提交url -->
<input type="hidden" id="row-modify" data-url="/manager/video/modify">

<!-- 列-上下架 -->
<script type="text/html" id="row-saleable">
    <input type="checkbox" name="status" value="{{d.id}}" lay-skin="switch" lay-text="是|否" lay-filter="changeSaleable"
           {{ d.status == 1 ? 'checked' : '' }}>
</script>

<!-- 列-是否推荐到首页 -->
<script type="text/html" id="row-home">
    <input type="checkbox" name="is_home" value="{{d.id}}" lay-skin="switch" lay-text="是|否" lay-filter="changeHome" {{ d.is_home == 1 ? 'checked' : '' }}>
</script>

<!-- 操作列 -->
<script type="text/html" id="row-operate">
    <a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/video/edit.html?id={{d.id}}" data-title="编辑"
       lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" data-href="/manager/video/del.html" lay-event="del">删除</a>
</script>

<!-- toolbar -->
<script type="text/html" id="toolbar-tpl">
    <a class="layui-btn layui-btn-primary layui-btn-sm" data-table-refresh lay-event="refresh"><i
            class="fa fa-refresh"></i></a>
    <a class="layui-btn layui-btn-normal layui-btn-sm" data-href="/manager/video/add.html" data-title="添加"
       lay-event="add">添加</a>
    <a class="layui-btn layui-btn-danger layui-btn-sm" data-href="/manager/video/del.html" lay-event="del">删除</a>
</script>

<script src="__MANAGER__/js/video/video.js?v={:mt_rand()}"></script>