<%@ page title="" language="C#" masterpagefile="../../Common/MasterPage.master" autoeventwireup="true" inherits="Admin_Modules_UI_Detail, App_Web_52exx4on" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link href="../../images/site.css" rel="stylesheet" type="text/css" /> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" Runat="Server">
<asp:Label runat="server" ID="lbl_result" Visible="false" ForeColor="Red" Font-Bold="true"></asp:Label>
<asp:Panel runat="server" ID="pan_ActiveResult" Visible="false">
<script language="javascript">
  alert("启用风格"+"<% Response.Write(activeresult); %>!");
</script>
</asp:Panel>
<asp:Panel ID="pan_detail" runat="server">
<table>
  <tr><th colspan="2"><asp:Label runat="server" ID="lbl_Name"></asp:Label> 模板信息</th></tr>
  <tr><td>模板名称</td><td><asp:Label runat="server" ID="lbl_Name2"></asp:Label></td></tr>
  <tr><td>作者</td><td><asp:HyperLink runat="server" ID="hy_Author"></asp:HyperLink></td></tr>
  <tr><td>目录</td><td><asp:Label runat="server" ID="lbl_Folder"></asp:Label></td></tr>
  <tr><td>状态</td><td><asp:Label runat="server" ID="lbl_status"></asp:Label></td></tr>
  <tr><td>文件</td><td><asp:DropDownList runat="server" ID="ddl_templatefiles" DataValueField="Name" DataTextField="Name"></asp:DropDownList></td></tr>
</table>
  <asp:DataGrid runat="server" ID="grid_PageList" AllowCustomPaging="false" AllowPaging="false" Width="97%" AutoGenerateColumns="false" Caption="模板风格列表" CaptionAlign="Left">
    <Columns>
      <asp:TemplateColumn>
        <HeaderTemplate>效果截图</HeaderTemplate>
        <ItemTemplate>
          <a href="<%# Aspxsite.Objects.SiteConfig.BasePath + "/UI/"+Request.QueryString["Folder"]+"/Themes/"+ DataBinder.Eval(Container.DataItem, "Folder") + "/" + DataBinder.Eval(Container.DataItem, "ScreenShot")%>"><img src="<%# Aspxsite.Objects.SiteConfig.BasePath +"/UI/"+Request.QueryString["Folder"]+"/Themes/"+ DataBinder.Eval(Container.DataItem, "Folder") + "/" + DataBinder.Eval(Container.DataItem, "ScreenShot")%>" /></a>
        </ItemTemplate>
      </asp:TemplateColumn>
      <asp:BoundColumn DataField="Name" HeaderText="风格名"></asp:BoundColumn>
      
      <asp:HyperLinkColumn HeaderText="作者" DataNavigateUrlField="Link" DataTextField="Author"></asp:HyperLinkColumn>
      <asp:TemplateColumn> 
      <HeaderTemplate>目录名</HeaderTemplate>
      <ItemTemplate><%# DataBinder.Eval(Container.DataItem, "Folder")%></ItemTemplate>
      </asp:TemplateColumn>
      
      <asp:TemplateColumn> 
      <HeaderTemplate>状态</HeaderTemplate>
      <ItemTemplate><%# enabled && Aspxsite.Objects.SiteConfig.Theme.ToLower() == DataBinder.Eval(Container.DataItem, "Folder").ToString().ToLower() ? "<font color=\"red\">当前风格</font> | " : ""%><%# Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "Broken"))?"XML错误":"正常" %></ItemTemplate>
      </asp:TemplateColumn>
     <asp:TemplateColumn>
       <HeaderTemplate>可用操作</HeaderTemplate>
       <ItemTemplate>
        <a href="Detail.Aspx?Folder=<%# Request.QueryString["Folder"] %>&Theme=<%# DataBinder.Eval(Container.DataItem, "Folder") %>&Action=Enable" onclick="javascript:return confirm('确认启用？')">启用</a>
       </ItemTemplate>
     </asp:TemplateColumn>
    </Columns>
  </asp:DataGrid>
  </asp:Panel>
</asp:Content>

