{layout:default} {class:Shop.Admin.admin.menu}
<lbhead>
    <title><%=Tag("菜单管理")%>-<%=site.title%></title>
</lbhead>
<lbfile>
    <style>
        .bottom{height: 0;overflow: hidden;display: none;}
    </style>
</lbfile>
<lbpath>
    <div class="tools">
        <ul>
            <%if (PageReturnMsg == ""){%>
            <li class="add"><a href="javascript:void(0);" onclick="Edit(0,0);"><b></b><span><%=Tag("添加")%></span></a></li>
            <%}%>
            <li class="name"><span id="navIgation"><%=Tag("当前位置")%>：<a href="<%=site.AdminPath %>/Ajax/ajax_admin.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a> > <a href="Admin_Group.aspx"><%=Tag("菜单")%></a></span></li>
        </ul>
    </div>
</lbpath>
<lbbody>
    <%foreach (DB.LebiShop.Lebi_Menu p in models)
      { %>
    <div class="proBox clear">
        <ul class="btns clear">
            <li class="menu">
               <a href="javascript:void(0);" onclick="Edit(0,<%=p.id %>);"><%if (p.Image != ""){%><img height="16" src="<%=site.WebPath + p.Image%>" /> <%} %><%=Tag(p.Name)%></a></li>
            <li class="add" onclick="Edit(<%=p.id %>,0);">
                <%=Tag("添加")%></li>
        </ul>
        <div class="iTabHead">
            <table class="datalist">
                <%foreach (DB.LebiShop.Lebi_Menu p2 in GetMenu(p.id))
                  {
                %>
                <tr class="list">
                    <td style="width:150px;">
                        [<%=p2.Sort %>] <a href="javascript:Edit(<%=p.id %>,<%=p2.id %>)"><%=Tag(p2.Name)%></a>
                        <a class="add" href="javascript:void(0);" onclick="Edit(<%=p2.id %>,0);">
                            <%=Tag("添加")%></a>
                    </td>
                    <td align="left">
                        <% 
                            foreach (DB.LebiShop.Lebi_Menu p3 in GetMenu(p2.id))
        {
                        %>
                        <div class="limit">
                            [<%=p3.Sort %>] <a href="javascript:Edit(<%=p2.id %>,<%=p3.id %>)"><%=Tag(p3.Name)%></a>
                        </div>
                        <%} %>
                    </td>
                </tr>
                <%}%>
            </table>
        </div>
    </div>
<%} %>
<script type="text/javascript">
    function Edit(pid,id) {
        var title_ = "<%=Tag("编辑菜单")%>";
        var url_ = "menu_edit_window.aspx?id=" + id+"&pid="+pid;
        var width_ = 600;
        var height_ = "auto";
        var modal_ = true;
        EditWindow(title_, url_, width_, height_, modal_);
    }
</script>
</lbbody>
<lbbottom>
<div class="bottom" id="body_bottom">
</div>
</lbbottom>