Index.html 11.1 KB
<%include '../../common/__ui/header'%>
<%include '../../common/__partail/ListHeader'%>

<div class="contentpanel">
    <div class="panel panel-default" style="margin-bottom:10px;">
        <div class="panel-body" style="padding-bottom: 0">
            <a href="/operations/category/add" class="btn btn-success"><i class="fa fa-plus"></i> 添加分类</a>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="panel-col">
                    <select name="status" id="status" tabindex="-1" title=""
                            class="form-control select2-offscreen brandBtn-group">
                        <option value="">选择状态</option>
                        <option value="0">关闭</option>
                        <option value="1">开启</option>
                    </select>
                </div>
                <div class="panel-col">
                    <select name="platform" id="platform" tabindex="-1" title=""
                            class="form-control select2-offscreen brandBtn-group">
                        <option value="" selected="">选择显示平台</option>
                        <option value="iphone">IOS手机</option>
                        <option value="ipad">IOS Pad</option>
                        <option value="android">安卓手机</option>
                        <option value="androidpad">安卓Pad</option>
                        <option value="h5">手机网站</option>
                        <option value="web">网站</option>
                        <option value="platform">平台</option>
                        <option value="blk_pc">BLK_PC</option>
                        <option value="blk_app">BLK_APP</option>
                    </select>
                </div>
                <div class="panel-col">
                    <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
                    <a id="all-btn" href="" class="btn btn-info">全部</a>
                </div>
            </div>
        </div>
    </div>
    <div class="panel">
        <div class="panel-body nopadding">
            <div class="basicTable_wrapper" id="basicTable"></div>
        </div>
    </div>
</div>

<script type="text/template" id="grid-template">
    <div class="dd" id="nestable" style="width:100%;">
        <ol class="dd-list">
            [[each data as item index]]
            <li class="dd-item dd3-item" data-id="[[item.id]]">
                <div class="dd3-content">
                    <table class="table table-striped table-bordered" style="width:95%;padding:0px;margin:0px;">
                        <tr>
                            <td><b>[[item.sort_name]]</b></td>
                            <td>[[item.sort_name_en ? item.sort_name_en : " "]]</td>
                            <td width="100px">
                                [[if !!item.sort_ico]]
                                <img src="[[item.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')]]"
                                     width="32px"/>
                                [[/if]]
                            </td>
                            <td>[[item.platform]]</td>
                            <td>[[!!!item.sort_level ? '' : item.sort_level]]</td>
                            <td class="sorting_1">[[item.status == 1 ? '已开启' : '已关闭']]</td>
                            <td>
                                <a target="_blank" href="/operations/category/edit/[[item.id]]" class="btn btn-primary btn-xs">编辑</a>
                                <a href="JavaScript:;" data-status="[[1-item.status]]" data-id="[[item.id]]"
                                   class="btn [[item.status == 1 ? 'btn-danger' : 'btn-success']] btn-xs updateStatus">[[item.status
                                    == 1 ? '关闭分类' : '开启分类']]</a>
                            </td>
                        </tr>
                    </table>
                </div>
                [[if item.sub]]
                <ol class="dd-list">
                    [[each item.sub as item1 index]]
                    <li class="dd-item dd3-item" data-id="[[item1.id]]">
                        <div class="dd3-content" data-toggle="category">
                            <table class="table table-striped table-bordered" style="width:95%;padding:0px;margin:0px;">
                                <tr>
                                    <td><b>[[item1.sort_name]]</b></td>
                                    <td>[[item1.sort_name_en ? item1.sort_name_en : " "]]</td>
                                    <td width="100">
                                        [[if !!item1.sort_ico]]
                                        <img src="[[item1.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')]]"
                                             width="32px"/>
                                        [[/if]]
                                    </td>
                                    <td>[[item1.platform]]</td>
                                    <td>[[!!!item1.sort_level ? '' : item1.sort_level]]</td>
                                    <td class="sorting_1">[[item1.status == 1 ? '已开启' : '已关闭']]</td>
                                    <td>
                                        <a target="_blank" href="/operations/category/edit/[[item1.id]]" class="btn btn-primary btn-xs">编辑</a>
                                        <a href="JavaScript:;" data-status="[[1-item1.status]]" data-id="[[item1.id]]"
                                           class="btn [[item1.status == 1 ? 'btn-danger' : 'btn-success']] btn-xs updateStatus">[[item1.status
                                            == 1 ? '关闭分类' : '开启分类']]</a>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        [[if item1.sub]]
                        <ol class="dd-list">
                            [[each item1.sub as item2 index]]
                            <li class="dd-item dd3-item" data-id="[[item2.id]]">
                                <div class="dd3-content" data-toggle="category">
                                    <table class="table table-striped table-bordered"
                                           style="width:95%;padding:0px;margin:0px;">
                                        <tr>
                                            <td><b>[[item2.sort_name]]</b></td>
                                            <td>[[item2.sort_name_en ? item2.sort_name_en : " "]]</td>
                                            <td width="100">
                                                [[if !!item2.sort_ico]]
                                                <img src="[[item2.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')]]"
                                                     width="32px"/>
                                                [[/if]]
                                            </td>
                                            <td>[[item2.platform]]</td>
                                            <td>[[!!!item2.sort_level ? '' : item2.sort_level]]</td>
                                            <td class="sorting_1">[[item2.status == 1 ? '已开启' : '已关闭']]</td>
                                            <td>
                                                <a target="_blank" href="/operations/category/edit/[[item2.id]]"
                                                   class="btn btn-primary btn-xs">编辑</a>
                                                <a href="JavaScript:;" data-status="[[1-item2.status]]"
                                                   data-id="[[item2.id]]"
                                                   class="btn [[item2.status == 1 ? 'btn-danger' : 'btn-success']] btn-xs updateStatus">[[item2.status
                                                    == 1 ? '关闭分类' : '开启分类']]</a>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                [[if item2.sub]]
                                <ol class="dd-list">
                                    [[each item2.sub as item3 index]]
                                    <li class="dd-item dd3-item" data-id="[[item3.id]]">
                                        <div class="dd3-content" data-toggle="category">
                                            <table class="table table-striped table-bordered"
                                                   style="width:95%;padding:0px;margin:0px;">
                                                <tr>
                                                    <td><b>[[item3.sort_name]]</b></td>
                                                    <td>[[item3.sort_name_en ? item3.sort_name_en : " "]]</td>
                                                    <td width="100">
                                                        [[if !!item3.sort_ico]]
                                                        <img src="[[item3.sort_ico.replace('{mode}', '1').replace('{width}', '32').replace('{height}', '32')]]"
                                                             width="32px"/>
                                                        [[/if]]
                                                    </td>
                                                    <td>[[item3.platform]]</td>
                                                    <td>[[!!!item3.sort_level ? '' : item3.sort_level]]</td>
                                                    <td class="sorting_1">[[item3.status == 1 ? '已开启' : '已关闭']]</td>
                                                    <td>
                                                        <a target="_blank" href="/operations/category/edit/[[item3.id]]"
                                                           class="btn btn-primary btn-xs">编辑</a>
                                                        <a href="JavaScript:;" data-status="[[1-item3.status]]"
                                                           data-id="[[item3.id]]"
                                                           class="btn [[item3.status == 1 ? 'btn-danger' : 'btn-success']] btn-xs updateStatus">[[item3.status
                                                            == 1 ? '关闭分类' : '开启分类']]</a>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </li>
                                    [[/each]]
                                </ol>
                                [[/if]]
                            </li>
                            [[/each]]
                        </ol>
                        [[/if]]
                    </li>
                    [[/each]]
                </ol>
                [[/if]]
            </li>
            [[/each]]
        </ol>
    </div>
</script>