<%@ Page Language="C#" MasterPageFile="../Admin.master" AutoEventWireup="true" Inherits="Ruiao.WebSite.Public.Admin.LinkCategoryManage" Codebehind="LinkCategoryManage.aspx.cs" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="MyContent" ContentPlaceHolderID="cphMain" Runat="Server">

    <fieldset class="ContentBox">
    <div class="Head" onclick="BoxSwitch('mc_MemberNotice','si_MemberNotice')"><div class="Title"><%=MyTitle %></div><div id="si_MemberNotice" class="SwitchIcon_Up"></div></div>
    <div class="Body" id="mc_MemberNotice">
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px"><strong>注意事项：</strong></div><div class="ContentItem_03b" style="width:649px">
        <ul class="NotesMessage">
        <li>删除链接分类的同时，将会同时删除所属的所有链接，且删除操作是不可逆的，请谨慎操作。</li>
        </ul>
        </div></div>
        
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px"><strong>快捷操作：</strong></div><div class="ContentItem_03b" style="width:649px">
        <input type="button" class="LinkButton" value="添加链接" onclick="location='LinkAdd<%=ExtensionName %>'" />
        <input type="button" class="LinkButton" value="链接管理" onclick="location='LinkManage<%=ExtensionName %>'" />
        </div></div>
    </div>
    <div class="Bottom"></div>
	</fieldset>
	<div class="ContentBox_Separator"></div>
	
    <fieldset class="ContentBox">
    <div class="Head" onclick="BoxSwitch('mc_Adv','si_Adv')"><div class="Title">添加链接分类</div><div id="si_Adv" class="SwitchIcon_Down"></div></div>
    <div class="Body" id="mc_Adv" style="display:none;">
        <table border="0" cellspacing="1" class="EditTable">
            <tr class="ItemTR" onmouseover="this.className='onItemTR';" onmouseout="this.className='ItemTR';">
                <td class="NameTD">分类名称<br /><span class="Text_Notes"></span></td>
                <td class="ValueTD">
                <img id="LinkIconPreview" alt="" src="" style=" width:16px;display:none;" />
                <asp:DropDownList ID="ddlIcon" runat="server"></asp:DropDownList>
                <asp:TextBox ID="tbName" runat="server" Width="120px"></asp:TextBox>
                <span class="Text_Stress">*</span> <span class="Text_Notes"><%=Ruiao.Public.Entity.pbLinkCategory.Name_MixLength%>-<%=Ruiao.Public.Entity.pbLinkCategory.Name_MaxLength%></span>
                </td>
            </tr>
            <tr class="sepItemTR" onmouseover="this.className='onItemTR';" onmouseout="this.className='sepItemTR';">
                <td class="NameTD">显示<br /><span class="Text_Notes">链接在完整模式下的显示规则</span></td>
                <td class="ValueTD">
                <asp:CheckBox ID="cbxShowImages" runat="server" Text="图片" /><br />
                <asp:CheckBox ID="cbxShowDescription" runat="server" Text="描述" /><br />
                <asp:CheckBox ID="cbxShowRating" runat="server" Text="评级" /><br />
                <asp:CheckBox ID="cbxShowUpdated" runat="server" Text="最后更新" />
                </td>
            </tr>
            
            <tr class="ItemTR" onmouseover="this.className='onItemTR';" onmouseout="this.className='ItemTR';">
                <td class="NameTD">排序<br /><span class="Text_Notes">链接的排序规则</span></td>
                <td class="ValueTD">
                <asp:DropDownList ID="ddlSortOrder" runat="server"></asp:DropDownList><asp:CheckBox ID="cbxSortAsc" runat="server" Text="升序" Checked="true" />
                </td>
            </tr>
            <tr class="sepItemTR" onmouseover="this.className='onItemTR';" onmouseout="this.className='sepItemTR';">
                <td class="NameTD">显示限制<br /><span class="Text_Notes">在非完整模式下该分类最多显示链接的数量，0为不显示，-1为无限制</span></td>
                <td class="ValueTD">最多显示 <asp:TextBox ID="tbListLimit" runat="server" Width="20px" Text="0" /> 个链接
                <span class="Text_Stress">*</span> 
                </td>
            </tr>
            <tr class="sepItemTR">
                <td class="NameTD"></td>
                <td class="ValueTD"><asp:Button ID="btSave" runat="server" Text="添加链接分类" OnClick="btSave_Click" CssClass="SubmitButton" /></td>
            </tr>  	
	    </table>
    </div>
    <div class="Bottom"></div>
	</fieldset>
	<div class="ContentBox_Separator"></div>
    
    <table id="MemberList" class="MainContentTable" cellspacing="1">
	<tr class="HeadTR">
		<td class="HeadTD" style="width:300px;">目录名称</td>
		<td class="HeadTD" style="width:50px;">显示图片</td>
		<td class="HeadTD" style="width:50px;">显示描述</td>
		<td class="HeadTD" style="width:50px;">显示评级</td>
		<td class="HeadTD" style="width:50px;">最后更新</td>
		<td class="HeadTD" style="width:50px;">排序方式</td>
		<td class="HeadTD" style="width:50px;">升序排列</td>
		<td class="HeadTD" style="width:50px;">显示数量</td>
		<td class="HeadTD" style="width:80px;">操作</td>
	</tr>
    <asp:Repeater ID="rpLinkCategory" runat="server">
    <ItemTemplate>
    	<tr class="ItemTR" onmouseover="this.className='onItemTR';" onmouseout="this.className='ItemTR';">
        <td class="ItemTD" style="text-align:left;"><%# DataBinder.Eval(Container, "DataItem.Name")%></td>
		<td class="ItemTD"><%# ((bool)DataBinder.Eval(Container, "DataItem.ShowImages"))?"是":"否" %></td>
		<td class="ItemTD"><%# ((bool)DataBinder.Eval(Container, "DataItem.ShowDescription"))?"是":"否" %></td>
		<td class="ItemTD"><%# ((bool)DataBinder.Eval(Container, "DataItem.ShowRating")) ? "是" : "否"%></td>
		<td class="ItemTD"><%# ((bool)DataBinder.Eval(Container, "DataItem.ShowUpdated")) ? "是" : "否"%></td>
		<td class="ItemTD"><%# Ruiao.Blog.Plugins.RuiaoLink.Common.Dictionary.SortOrder.Get().TryGetValue(DataBinder.Eval(Container, "DataItem.SortOrder").ToString(), out SortOrderText)?SortOrderText:"未知排序"%></td>
		<td class="ItemTD"><%# ((bool)DataBinder.Eval(Container, "DataItem.SortAsc")) ? "是" : "否"%></td>
		<td class="ItemTD"><%# (DataBinder.Eval(Container, "DataItem.ListLimit").ToString() == "0") ? "不限制" : DataBinder.Eval(Container, "DataItem.ListLimit")%></td>
		<td class="ItemTD"><a href="LinkCategoryEdit<%=ExtensionName %>?CategoryID=<%# DataBinder.Eval(Container, "DataItem.ID")%>">编辑</a> | <a href="#" onclick="ConfirmRedirect('您是否确定要删除这个链接分类','LinkCategoryManage<%=ExtensionName %>?Action=Delete&CategoryID=<%# DataBinder.Eval(Container, "DataItem.ID")%>')">删除</a></td>
	</tr>
    </ItemTemplate>
    </asp:Repeater>
    
    <tr class="ItemTR">
    <td class="ItemTD" colspan="9" style="text-align:left;">
    <webdiyer:AspNetPager ID="Pager" runat="server" OnPageChanged="Pager_PageChanged" AlwaysShow="True" UrlPaging="False" />
    </td>
    </tr>
    
    </table>
</asp:Content>

