<%@ Page Language="C#" EnableTheming="false" Title="Subtext 管理 - 评论" MasterPageFile="~/Admin/WebUI/AdminPageTemplate.Master" Codebehind="Feedback.aspx.cs" AutoEventWireup="True" Inherits="Subtext.Web.Admin.Pages.Feedback" %>

<asp:Content ID="actions" ContentPlaceHolderID="actionsHeading" runat="server">菜单</asp:Content>

<asp:Content ID="categoryListTitle" ContentPlaceHolderID="categoryListHeading" runat="server"></asp:Content>

<asp:Content ID="categoriesLinkListing" ContentPlaceHolderID="categoryListLinks" runat="server"></asp:Content>

<asp:Content ID="entryEditor" ContentPlaceHolderID="pageContent" runat="server">

	<st:MessagePanel id="Messages" runat="server" />
	
	<span class="FeedbackTypeControl">
	    <asp:CheckBox ID="cbShowOnlyComments" visible="false" runat="server" Text="只显示评论" ToolTip="Hide feedback that is not of type 'Comment'" AutoPostBack="true" OnCheckedChanged="cbShowOnlyComments_CheckedChanged"/>
        <asp:RadioButtonList ID="rbFeedbackFilter" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" OnSelectedIndexChanged="rbFeedbackFilter_SelectedIndexChanged">
            <asp:ListItem Selected="True" Value="None">显示所有</asp:ListItem>
            <asp:ListItem Value="Comment">只显示评论</asp:ListItem>
            <asp:ListItem Value="PingTrack">只显示Pingtrack</asp:ListItem>
        </asp:RadioButtonList></span>
        <st:AdvancedPanel id="Results" runat="server" Collapsible="False" HeaderText="评论" HeaderCssClass="CollapsibleHeader" DisplayHeader="true">
		<asp:Repeater id="rprSelectionList" runat="server">
			<HeaderTemplate>
				<table id="feedback" class="Listing highlightTable" style="<%= CheckHiddenStyle() %>">
					<tr>
						<th>标题</th>						
						<th>作者</th>
						<th width="100">日期</th>
						<th width="50"><input id="cbCheckAll" class="inline" type="checkbox" onclick="ToggleCheckAll(this);" title="全选/反选" /><label for="cbCheckAll" title="全选/反选">全选</label></th>
					</tr>
			</HeaderTemplate>
			<ItemTemplate>
				<tr>
					<td>
						<strong><%# GetTitle(Container.DataItem) %></strong>
					</td>
					<td>
						<strong><%# GetAuthor(Container.DataItem) %></strong> <%# GetAuthorInfo(Container.DataItem) %>
					</td>
					<td nowrap="nowrap">
						<%# DataBinder.Eval(Container.DataItem, "DateCreated", "{0:M/d/yy h:mmt}") %>
					</td>
					<td>
						<asp:CheckBox id="chkDelete" Runat="Server"></asp:CheckBox>
						<input type="hidden" id="FeedbackId" name="FeedbackId" value='<%# DataBinder.Eval(Container.DataItem, "Id") %>' runat="server" />
					</td>
				</tr>
				<tr class="body">
					<td colspan="5">
						<%# GetBody(Container.DataItem) %>
					</td>
				</tr>
			</ItemTemplate>
			<AlternatingItemTemplate>
				<tr class="Alt">
					<td>
						<strong><%# GetTitle(Container.DataItem) %></strong>
					</td>
					<td>
						<strong><%# GetAuthor(Container.DataItem) %></strong> <%# GetAuthorInfo(Container.DataItem) %>
					</td>
					<td nowrap="nowrap">
						<%# DataBinder.Eval(Container.DataItem, "DateCreated", "{0:M/d/yy h:mmt}") %>
					</td>
					<td>
						<asp:CheckBox id="chkDeleteAlt" Runat="Server"></asp:CheckBox>
						<input type="hidden" id="FeedbackIdAlt" name="FeedbackIdAlt" value='<%# DataBinder.Eval(Container.DataItem, "Id") %>' runat="server" />
					</td>
				</tr>
				<tr class="body Alt">
					<td colspan="4">
						<%# GetBody(Container.DataItem) %>
					</td>
				</tr>				
			</AlternatingItemTemplate>
			<FooterTemplate>
			</table>
		</FooterTemplate>
		</asp:Repeater>
		<st:PagingControl id="resultsPager" runat="server" 
			PrefixText="<div>分页</div>" 
			LinkFormatActive='<a href="{0}" class="Current">{1}</a>' 
			UrlFormat="Feedback.aspx?pg={0}" 
			CssClass="Pager" />
		<asp:Button id="btnDelete" runat="server" CssClass="buttonSubmit" style="float:right" Text="删除" onclick="OnDeleteClick" ToolTip="Move To Trash" />
		<asp:Button id="btnDestroy" runat="server" CssClass="buttonSubmit" style="float:right" Text="彻底删除" onclick="OnDestroyClick" Visible="false" OnClientClick="return confirm('This will delete these comments permanently. Continue?');" ToolTip="Delete Forever" />
		<asp:Button id="btnConfirmSpam" runat="server" CssClass="buttonSubmit" style="float:right" Text="垃圾" onclick="OnConfirmSpam" ToolTip="Confirm Spam Moves Item To Trash" />
		<asp:Button id="btnApprove" runat="server" CssClass="buttonSubmit" style="float:right" Text="通过" onclick="OnApproveClick" ToolTip="Approve" Visible="false" />
		<asp:Button id="btnEmpty" runat="server" CssClass="buttonSubmit" style="float:right" Text="全部清空" OnClick="OnEmptyClick" OnClientClick="return confirm('This will permanently delete every comment of this type. Continue?');" ToolTip="Empty" Visible="false" />
		<br class="clear" />
	</st:AdvancedPanel>
</asp:Content>