<%@ Page Inherits="Caicai.Framework.UI.Admin.Templates" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="style.css" rel="stylesheet" rev="stylesheet" media="all" />
<script type="text/javascript" src="../files/common/jquery.js"></script>
<script type="text/javascript" src="../files/xheditor/xheditor-zh-cn.min.js"></script>
<script type="text/javascript" src="include/xheditor.js"></script>
<script type="text/javascript" src="include/common.js"></script>
<script type="text/javascript">
$(function()
{
	if($("#templates").length != 0)
	{			
		$(".files").hide();

		$(".folder").click(function()
		{
			$(".folder_"+ $(this).attr("name")).toggle();
			return false;
		})

		$(".folder_" + $(".edit .focus").attr("name")).show();
	}
})
</script>
</head>
<body id="templates">
<form id="form1" runat="server">
<table class="table subsubmenu">
<thead>
<tr class="noeffect">
	<td colspan="2" class="tabtitle"><a href="#" class="tag"><%= Caicai.Framework.Common.Language.Get("SeleteTemplate") %></a><a href="#" class="tag"><%= Caicai.Framework.Common.Language.Get("BannerTemplate") %></a><a href="#" class="tag"><%= Caicai.Framework.Common.Language.Get("UpdateTemplate") %></a></td>
</tr>
</thead>
</table>
<br />
<div class="tabcontent">
<table class="table">
<tr class="noeffect">
	<td class="templates">
	<asp:Repeater ID="RepeaterTemplates" runat="server">
	<ItemTemplate>
	<a href="templates.aspx?action=change&name=<%# Eval("Name") %>" <%# CurrentTemplates(Eval("Name").ToString()) %>><img src="../files/templates/<%# Eval("Name") %>.jpg" width="120" height="90" /><span><%# Eval("Name") %></span></a>
	</ItemTemplate>
	</asp:Repeater>
	</td>
</tr>
</table>
<table class="table">
<thead>
<tr class="noeffect">
	<td colspan="2"><a href="#" class="helpall">[?]</a></td>
</tr>
</thead>
<asp:Panel runat="server" ID="PanelConfig">
<tr>
	<th style="width:140px;"><%= Caicai.Framework.Common.Language.Get("PageTemplateBanner") %>&nbsp;<a href="#" class="help">[?]</a></th>
	<td><span class="note"><%= Caicai.Framework.Common.Language.Get("PageTemplateBanner","note") %></span><Cai:CTextBox  ID="Page_TemplateBanner" runat="server" /><a href="#" class="uploadpic xheditorupload" height="400"><%= Caicai.Framework.Common.Language.Get("Upload") %></a><a href="Page_TemplateBanner" class="showpic"><%= Caicai.Framework.Common.Language.Get("ShowPic") %></td>
</tr>
</asp:Panel>
<tr class="noeffect">
	<th></th>
	<td><asp:Button ID="ButtonConfig" runat="server" CssClass="button"  OnClick="Manage_Click" /><input type="reset" class="button" value='<%= Caicai.Framework.Common.Language.Get("Reset") %>' /></td>
</tr>
</table>
<table class="table edit">
<thead>
	<tr class="noeffect">
		<td><%= Caicai.Framework.Common.Language.Get("File") %></td>
		<td style="width:120px;"><%= Caicai.Framework.Common.Language.Get("CreateDate") %></td>
		<td style="width:40px;"><%= Caicai.Framework.Common.Language.Get("Manage") %></td>
	</tr>
</thead>
<asp:Repeater runat="server" id="RepeaterTemplatesFiles">
<ItemTemplate>
	<tr <%# CurrentTemplates(Eval("Name").ToString()) %> name="<%# Eval("Name") %>">
		<td><img class="file" alt="file" src="images/ico_browseFolder.gif" />&nbsp;<strong><a href="#" name="<%# Eval("Name") %>" class="folder"><%# Eval("Name") %> <%= Caicai.Framework.Common.Language.Get("Template") %></a></strong></td>
		<td></td>
		<td></td>
	</tr>
	<tbody class="folder_<%# Eval("Name") %> files">
	<asp:Repeater runat="server"  DataSource='<%# BrowseFiles(Eval("Name")) %>'>
	<ItemTemplate>
	<tr>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img class="file" alt="file" src="images/ico_browsefiles.gif" />&nbsp;<a href="fileupdate.aspx?action=update&name=<%# Server.UrlEncode(Eval("FullName")) %>" class="html" title="<%# Eval("FullName") %>" target="_blank"><%# Eval("Name") %></a></td>
		<td><span><%# Eval("LastWriteTime")%></span></td>
		<td><a href="fileupdate.aspx?action=update&name=<%# Server.UrlEncode(Eval("FullName")) %>" class="html" target="_blank"><%= Caicai.Framework.Common.Language.Get("Editor") %></a></td>
	</tr>
	</ItemTemplate>
	</asp:Repeater>
	</tbody>
</ItemTemplate>
</asp:Repeater>
</table>
</div>
</form>
</body>
</html>