{layout:default} {class:Shop.Admin.cms.ImageList}
<lbhead>
    <title><%=node.Name%>-<%=pnode.Name%>-<%=site.title%></title>
</lbhead>
<lbpath>
    <h3 class="text-themecolor m-b-0 m-t-0"><%=node.Name%></h3>
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="<%=site.AdminPath %>/Ajax/ajax_admin.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a></li>
        <li class="breadcrumb-item"><a href="UserNodeList.aspx?code=<%=pnode.Code %>"><%=pnode.Name%></a></li>
        <li class="breadcrumb-item active"><%=node.Name%></li>
    </ol>
</lbpath>
<lbbody>
    <div class="col-12">
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="col-12">
                        <%if (PageReturnMsg == ""){%>
                        <button class="btn btn-info" onclick="location.href='<%=Shop.Bussiness.NodePage.AdminPage(node) %>'"><i class="ti-plus"></i> <%=Tag("添加")%></button>
                        <button class="btn btn-danger" onclick="DeleteConfirm()"><i class="ti-trash"></i> <%=Tag("删除")%></button>
                        <%}%>
                    </div>
                </div>
                <div class="table-responsive">
                    <table class="table m-t-10 table-hover no-wrap">
                        <thead>
                            <tr class="no-wrap">
                                <th class="selectAll" style="width:40px">
                                    <a href="javascript:void(0);" onclick="$('input[name=\'ids\']').attr('checked',!$(this).attr('checked'));$(this).attr('checked',!$(this).attr('checked'));"><%=Tag("全选")%></a>
                                </th>
                                <th>
                                    <%=Tag("图片")%>
                                </th>
                                <th>
                                    <%=Tag("语言")%>
                                </th>
                                <th>
                                    <%=Tag("名称")%>
                                </th>
                                <th>
                                    <%=Tag("排序")%>
                                </th>
                                <th>
                                    <%=Tag("时间")%>
                                </th>
                                <th>
                                    <%=Tag("操作")%>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <%foreach (DB.LebiShop.Lebi_Page model in pages)
                            {%>
                            <tr onclick="Page_Edit('<%=Shop.Bussiness.NodePage.AdminPage(model) %>');">
                                <td>
                                    <input type="checkbox" id="checkbox<%=model.id %>" name="ids" del="true" value="<%=model.id %>" />
                                    <label for="checkbox<%=model.id %>"></label>
                                </td>
                                <td>
                                    <img src="<%=model.ImageSmall%>" height="30" />
                                </td>
                                <td>
                                    <%=model.Language%>
                                </td>
                                <td>
                                    <%=model.Name%>
                                </td>

                                <td>
                                    <%=model.Sort%>
                                </td>
                                <td>
                                    <%=FormatTime(model.Time_Add)%>
                                </td>
                                <td>
                                    <a href="<%=Shop.Bussiness.NodePage.AdminPage(model) %>"><%=Tag("编辑")%></a>
                                </td>
                            </tr>
                            <%} %>
                        </tbody>
                    </table>
                </div>
                <div class="row">
                    <div class="col-12">
                        <nav aria-label="Page navigation ">
                            <%=PageString%>
                        </nav>
                    </div>
                </div>
            </div>
        </div>
    </div>
</lbbody>
<lbscripts>
    <script>
        function Node_Edit(pid, id) {
            $("#EditModal").modal("show");
            $.ajax({
                url: "usernode_edit_window.aspx",
                type: "GET",
                cache: false,
                data: {id: id,pid: pid},
            }).done(function(result){
                $("#EditModal .modal-content").html(result);
            });
        }
        function DeleteConfirm() {
            $("#Modal-Confirm").modal("show");
            $("#Confirm-Content").html("<%=Tag("确认要删除吗？")%>");
            $("#Modal-Confirm .btn-success.btn-ok").attr("onclick", "Page_Del();");
        }
        function Page_Del(id) {
            $('#Modal-Confirm').modal('hide');
            var postData = GetFormJsonData("del");
            var url = "<%=site.AdminPath %>/ajax/ajax_node.aspx?__Action=Page_Del";
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
        function Page_Edit1(nodeid, id) {
            window.location = "page_edit.aspx?Node_id=" + nodeid + "&Page_id=" + id;
        }
        function Page_Edit(url) {
            window.location = url;
        }
    </script>
</lbscripts>