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

<div class="pageheader">
    <div class="media">
        <div class="pageicon pull-left">
            <i class="fa fa-th-list"></i>
        </div>
        <div class="media-body">
            <ul class="breadcrumb">
                <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
                <li><a href="">分类管理</a></li>
                <li>分类列表管理</li>
            </ul>

            <div>
                <div style="width: 30%;float: left;">
                    <h4>分类列表管理</h4>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="panel panel-default" style="margin-bottom:10px;">
    <div class="panel-heading">
        <a href="/operations/category/add" class="btn btn-info btn-xs">添加分类</a>
    </div><!-- panel-heading -->
    <div class="panel-body">
        <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>
            </select>
        </div>
        <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
        <a id="all-btn" href="" class="btn btn-info">全部</a>
    </div>
</div>

<div class="panel panel-primary-head">
    <div class="basicTable_wrapper" id="basicTable">
    </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 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-info'%> 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 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-info'%> 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 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-info'%> 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 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-info'%> 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>