<%@ Page Language="C#" Inherits="SiteServer.BackgroundPages.ConsoleSiteTemplate" %>
<%@ Register TagPrefix="bairong" Namespace="BaiRong.Controls" Assembly="BaiRong.Controls" %>
<%@ Register TagPrefix="user" Namespace="UserCenter.Controls" Assembly="UserCenter.Pages" %>
<%@ Register TagPrefix="site" Namespace="SiteServer.Controls" Assembly="SiteServer.Controls" %>

<html>
<head>
<!--#include file="../inc/html_head.inc"-->
<user:custom type="style" runat="server"></user:custom>

<bairong:Code type="Prototype" runat="server" />
<bairong:Code type="Scriptaculous" runat="server" />

<meta http-equiv="content-type" content="text/html;charset=gb2312">
</head>
<body>

<form id="myForm" runat="server">
<bairong:Message runat="server"></bairong:Message>

<DIV class="column">
<div class="columntitle">站点模板管理</div>

		<ASP:DataGrid id="MyDataGrid" runat="server"
			Width="100%"
			Align="center"
			ShowHeader="true"
			ShowFooter="false"
			CellPadding="2"
			BorderWidth="0"
AutoGenerateColumns="false"
			DataKeyField="Name"
			OnItemDataBound="MyDataGrid_ItemBound"
			HeaderStyle-CssClass="summary-title"
			ItemStyle-CssClass="tdbg"
			CellSpacing="2" >
		<HeaderStyle HorizontalAlign="center" Height="25" />
		<ItemStyle Height="25"/>

		<Columns>
			<asp:TemplateColumn
				HeaderText="站点模板名称">
				<ItemTemplate>
					<nobr><%#GetSiteTemplateName((string)DataBinder.Eval(Container.DataItem,"Name")) %></nobr>
				</ItemTemplate>
				<ItemStyle Width="140" HorizontalAlign="center"/>
			</asp:TemplateColumn>
			<asp:BoundColumn
				HeaderText="站点模板文件夹"
				DataField="Name" >
				<ItemStyle Width="100" HorizontalAlign="center" />
			</asp:BoundColumn>
			<asp:TemplateColumn
				HeaderText="站点模板介绍">
				<ItemTemplate>
					<%#GetDescription((string)DataBinder.Eval(Container.DataItem,"Name")) %>
				</ItemTemplate>
				<ItemStyle HorizontalAlign="left" />
			</asp:TemplateColumn>
			<asp:TemplateColumn
				HeaderText="样图">
				<ItemTemplate>
					<%#GetSamplePicHtml((string)DataBinder.Eval(Container.DataItem,"Name")) %>
				</ItemTemplate>
				<ItemStyle Width="130" HorizontalAlign="center"/>
			</asp:TemplateColumn>
			<asp:BoundColumn
				HeaderText="建立日期"
				DataField="CreationTime"
				DataFormatString="{0:yyyy-MM-dd}"
				ReadOnly="true">
				<ItemStyle Width="70" HorizontalAlign="center" />
			</asp:BoundColumn>
			<asp:TemplateColumn
				HeaderText="删除">
				<ItemTemplate>
					<a href="console_siteTemplate.aspx?Delete=True&SiteTemplateDir=<%# DataBinder.Eval(Container.DataItem,"Name")%>" onClick="javascript:return confirm('此操作将会删除此站点模板“<%# DataBinder.Eval(Container.DataItem,"Name")%>”，确认吗？');">删除</a>
				</ItemTemplate>
				<ItemStyle Width="70" HorizontalAlign="center" />
			</asp:TemplateColumn>
		</Columns>
	</ASP:DataGrid>

	
</div>
</form>

</body>
</html>