<%@ Page Language="C#" AutoEventWireup="true" Inherits="TopWinCMS.WebUI.HtmlTemplateList"
    CodeBehind="HtmlTemplateList.aspx.cs" %>

<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="TopWinCMS.WebControls" Namespace="TopWinCMS.WebControls" TagPrefix="cc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>网页模板集</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <meta content="no-cache" http-equiv="Pragma" />

    <script language="javascript" type="text/javascript" src="../TopWin.js"></script>

    <link href="../Style.css" rel="stylesheet" type="text/css" />

    <script language="javascript" src="../../Images/skysoft.js" type="text/javascript"></script>
    <style type="text/css">
        .style1
        {
            width: 120px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
       
            <table id="NavigationPath" border="0" cellpadding="4" cellspacing="0" width="100%">
                <tr>
                    <td width="50%">
                        <img src='../../Images/arrow.gif' alt="" />
                        您现在的位置：
                        <asp:Label ID="LB_Path" runat="server"></asp:Label>
                    </td>
                    <td width="50%">管理导航：<a href="HtmlTemplateList.aspx">模板集管理</a> &nbsp;| &nbsp;<a href="HtmlTemplate_Add.aspx">
                                        添加模板集</a>
                    </td>
                </tr>
            </table>
            <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" CssClass="GridView"
                DataKeyNames="ID" OnRowDataBound="GV_List_RowDataBound" OnRowCommand="GV_List_RowCommand">
                <HeaderStyle CssClass="HeaderStyle" />
                <Columns>
                    <asp:BoundField DataField="ID" HeaderText="ID">
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:BoundField>
                    <asp:HyperLinkField   DataNavigateUrlFields="ID" 
                        HeaderText="模板名称" DataTextField="TemplateName" DataNavigateUrlFormatString="HtmlTemplate_Add.aspx?Action=Edit&amp;ID={0}">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:HyperLinkField  
                        HeaderText="模板目录" DataTextField="TemplatePath">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:BoundField DataField="Style" HeaderText="样式表目录">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="HtmlTemplate_Add.aspx?Action=Edit&amp;ID={0}"
                        HeaderText="修改" Target="_self" Text="修改">
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:HyperLinkField>
                    <asp:TemplateField HeaderText="启用" ShowHeader="False">
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="UsedIt"
                                Text="启用" CommandArgument='<%# Eval("ID") %>'></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:ButtonField CommandName="Template_Delete" Text="删除" HeaderText="删除">
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:ButtonField>
                    <asp:BoundField DataField="IsUsed" Visible="False" />
                </Columns>
            </asp:GridView>
          <table style="width:100%;">
                <tr>
                    <td class="style1">
                        <input ID="Button1" class="btn" 
                            onclick="window.location.href='HtmlTemplate_Add.aspx'" style="cursor: hand" 
                            type="button" value="添加" /></td>
                    <td>
                        说明： 点击“模板名称”将转到修改模板的页面，本页的“修改”只是修改<strong>模板集</strong>信息 
                    </td>
                </tr>
            </table>
<div class="pagefield">
                <cc1:PageNavigation ID="PageNavigation1" runat="server" OnPageChanging="PageNavigation1_PageChanging"
                    EnableViewState="False" CssClass="pagenumber">
                </cc1:PageNavigation>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
