{layout:default} {class:Shop.Admin.product.Property_Value}
<lbhead>
    <title><%=Shop.Bussiness.Language.Content(pmodel.Name,CurrentLanguage.Code) %>-<%=Tag("属性规格")%>-<%=site.title%></title>
</lbhead>
<lbfile>
    <script type="text/javascript" src="<%=site.AdminJsPath %>/ajaxfileupload.js"></script>
</lbfile>
<lbpath>
    <div class="tools">
    <ul>
    <%if (PageReturnMsg == ""){%>
    <li class="add"><a href="javascript:void(0);" onclick="EditProPerty(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="<%=site.AdminPath %>/product/"><%=Tag("商品管理")%></a> > <a href="<%=site.AdminPath %>/product/Property.aspx?tid=<%=tmodel.id %>"><%=Tag(tmodel.Name)%></a> > <%=Shop.Bussiness.Language.Content(pmodel.Name,CurrentLanguage.Code) %></span></li>
    </ul>
    </div>
</lbpath>
<lbbody>
    <div class="searchbox">
        <input type="text" id="key" name="key" class="input-query" value="<%=key %>" onkeydown="if(event.keyCode==13){search_();}" /><input type="button" id="btnSou" class="btn-query" onclick="search_();" />
    </div>
    <table class="datalist">
        <tr class="title">
            <th style="width: 40px">
                <%=Tag("ID")%>
            </th>
            <th style="width: 100px">
                <%=Tag("代码")%>
            </th>
            <th style="width: 200px">
                <%=Tag("属性名称")%>
            </th>
            <th style="width: 100px">
                <%=Tag("图标")%>
            </th>
            <th style="width: 100px">
                <%=Tag("排序")%>
            </th>
            <th >
                <%=Tag("操作")%>
            </th>
        </tr>
        <%foreach (DB.LebiShop.Lebi_ProPerty model in models)
          { %>
        <tr class="list" ondblclick="EditProPerty(<%=model.id %>)">
            <td>
                <%=model.id%>
            </td>
            <td>
                <%=model.Code%>
            </td>
            <td>
                <%=Shop.Bussiness.Language.Content(model.Name, CurrentLanguage.Code)%>
            </td>
            <td>
            <%if (model.ImageUrl != "")
              { %>
             <img src="<%=site.WebPath + model.ImageUrl%>" height="23" />   
             <%}
              else
              {%>&nbsp;<%} %>
            </td>
            <td>
                <%=model.Sort%>
            </td>
            <td>
                <a href="javascript:void(0);" onclick="EditProPerty(<%=model.id%>);"><%=Tag("编辑")%></a> | <a href="javascript:" onclick="DelProPerty(<%=model.id %>)"><%=Tag("删除")%></a>
            </td>
        </tr>
        <%} %>
    </table>
    <script type="text/javascript">
        function EditProPerty(id) {
            var title_ = "<%=Tag("编辑子项")%>";
            if (id == 0) title_ = "<%=Tag("添加子项")%>";
            var url_ = "property_value_edit_window.aspx?id=" + id + "&pid=<%=pmodel.id %>";
            var width_ = 600;
            var height_ = "auto";
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
        function DelProPerty(id) {
            var postData;
            if (id == 0)
                postData = GetFormJsonData("del");
            else
                postData = { "id": id };
            var url = "<%=site.AdminPath %>/ajax/ajax_product.aspx?__Action=Property_Del";
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
        function search_() {
            var key = $("#key").val();
            window.location = "?pid=<%=pid %>&key=" + escape(key);
        }
    </script>
</lbbody>
<lbbottom>
<div class="bottom" id="body_bottom">
    <%=PageString%>
</div>
</lbbottom>