<%@ Page Language="C#" MasterPageFile="~/Blogger/Admin/BloggerAdmin.master" AutoEventWireup="true" Inherits="Ruiao.WebSite.Blogger.Plugins.RuiaoLink.Admin.Default" Codebehind="Default.aspx.cs" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="cc1" %>
<asp:Content ID="MyContent" ContentPlaceHolderID="cphMainAdmin" Runat="Server">
<form id="MainForm" runat="server">
<div id="ContentTitle"><%=MyTitle %></div>
<div id="ContentBody">

    <div style="">
    <input type="button" class="LinkButton" value="管理链接" onclick="location='Default<%=ExtensionName %>'" />
    <input type="button" class="LinkButton" value="添加链接" onclick="location='LinkAdd<%=ExtensionName %>'" />
    <input type="button" class="LinkButton" value="链接分类" onclick="location='LinkCategoryManage<%=ExtensionName %>'" />
    </div>
    
    <fieldset class="ContentBox">
    <div class="ContentBox_Head" onclick="BoxSwitch('mcBody','siBody','/Blogger/Admin/Images/Box_')"><div style="float:left;">链接筛选：</div><div id="siBody" class="SwitchIcon_Down"></div></div> 
    <div class="ContentBox_ContentBox" id="mcBody" style="display:none;">
        <div class="ContentBox_ContentItem">
        分类：<asp:DropDownList ID="ddlLinkCategory" runat="server"></asp:DropDownList>
        <asp:Button ID="btSelectData" runat="server" Text="筛选链接" OnClick="btSelectData_Click" CssClass="LinkButton" />
        </div>
    </div>
	</fieldset>
    <br />
    
    <asp:Repeater ID="rpLink" runat="server" OnItemCreated="rpLink_ItemCreated">
    <HeaderTemplate>
    <table id="LinkList" class="MainContentTable" cellpadding="3" cellspacing="1">
	<tr class="MainContentList_HeadTR">
		<td class="MainContentList_HeadTD" style="width:0px;display:none;">ID</td>
		<td class="MainContentList_HeadTD" style="width:auto;">名称</td>
		<td class="MainContentList_HeadTD" style="width:auto;">路径</td>
		<td class="MainContentList_HeadTD" style="width:120px;">关系</td>
		<td class="MainContentList_HeadTD" style="width:80px;">分类</td>
		<td class="MainContentList_HeadTD" style="width:40px;">图片</td>
		<td class="MainContentList_HeadTD" style="width:40px;">可见</td>
		<td class="MainContentList_HeadTD" style="width:30px;">操作</td>
		<td class="MainContentList_HeadTD" style="width:30px;">选择</td>
	</tr>
    </HeaderTemplate>
    <ItemTemplate>
    	<tr class="MainContentList_ItemTR">
		<td class="MainContentList_ItemTD" style="display:none;"><asp:Label ID="lbID" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ID")%>' /></td>
		<td class="MainContentList_ItemTD" style="text-align:left;"><%# DataBinder.Eval(Container, "DataItem.Name")%><br><span class="NotesText">描述：<%# DataBinder.Eval(Container, "DataItem.Description")%></span></td>
		<td class="MainContentList_ItemTD" style="text-align:left;"><%# DataBinder.Eval(Container, "DataItem.Url")%></td>
		<td class="MainContentList_ItemTD" style="text-align:left;"><%# DataBinder.Eval(Container, "DataItem.Rel")%></td>
		<td class="MainContentList_ItemTD"><%# MyCategoryData.Name%></td>
		<td class="MainContentList_ItemTD"><%# (String.IsNullOrEmpty(DataBinder.Eval(Container, "DataItem.Image").ToString())) ? "否" : "是"%></td>
		<td class="MainContentList_ItemTD"><%# ((bool)DataBinder.Eval(Container, "DataItem.Visible"))?"是":"否"%></td>
		<td class="MainContentList_ItemTD"><a href="LinkEdit<%=ExtensionName %>?LinkID=<%# DataBinder.Eval(Container, "DataItem.ID")%>">编辑</a></td>
		<td class="MainContentList_ItemTD"><asp:CheckBox ID="cbxSelect" runat="server" /></td>
	</tr>
    </ItemTemplate>
    <FooterTemplate>
    </table>
    </FooterTemplate>
    </asp:Repeater>
    
    <div>
    <div style="float:left;">
    <cc1:aspnetpager id="Pager" PageSize="20" runat="server" AlwaysShow='true' OnPageChanged="Pager_PageChanged"></cc1:aspnetpager>
    </div>
    <div style="float:right; padding:5px">
    <asp:Button ID="btDelete" runat="server" OnClick="btDelete_Click" Text="删除所选链接" CssClass="SubmitButton" />
    </div>
    </div>
</div>
<div id="ContentBottom"></div>
</form>
</asp:Content>