<%@ Page Title="" Language="VB" MasterPageFile="~/App_MasterPage/mpManager.master" AutoEventWireup="false" CodeFile="TemplateList.aspx.vb" Inherits="Manager_TemplateList" %>
<%@ Register assembly="ControlPageing" namespace="ControlPageing" tagprefix="cc1" %>
<%@ Register assembly="HTMLEditor" namespace="HTMLEditor" tagprefix="cc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="chpPageTitle" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="chpHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="chpScript" Runat="Server">
<script type="text/javascript" src="/App_Themes/ManagerTheme/Js/jquery.min.js"></script> 
<script type="text/javascript" src="/App_Themes/ManagerTheme/js/lhgdialog.min.js"></script>
<script language="javascript" type="text/javascript">
    function confirmWindow(url) {
        $.dialog.confirm('<div style="width:240px;line-height:25px;">单击确定将删除此模板，删除后将无法恢复！<br />你确定要删除这个模板吗？</div>', function() {
            window.location=url;
        });
    }
</script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="chpTitle" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="chpContent" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View_Edit" runat="server">
    	    <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" class="line_table">
	    	<tr>
                    <td align="right" width="20%">模板组：</td>
                    <td width="30%">
                        <asp:DropDownList ID="dplClassID" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>
                <tr>
                    <td align="right" width="20%">模板名称：</td>
                    <td width="30%">
                        <asp:TextBox ID="txtTmpName" runat="server" Width="96%"></asp:TextBox>
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>	    	<tr>
                    <td align="right" width="20%">文件名：</td>
                    <td width="30%">
                        <asp:TextBox ID="txtFileName" runat="server"  Width="96%" ></asp:TextBox>
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>
                <tr>
                    <td align="right" width="20%">模板内容：</td>
                    <td colspan="2">
                        <cc2:Editor ID="HtmlContent" runat="server" EditorHeight="400" FlashEx=".swf" 
                            PicEx=".gif,.jpg,.bmp,.png" PlugPath="/App_Themes/ManagerTheme/Images/Explorer/" 
                            PlugUploadPath="/App_Themes/ManagerTheme/Images/Explorer/" VideoEx=".wmv" />
                    </td>
                </tr>	    		    	                                                                                             	            
                <tr>
                    <td align="right" colspan="3">
                        <p align="center">
                　          <asp:ImageButton ID="imgSave" runat="server" 
                                ImageUrl="~/App_Themes/ManagerTheme/Images/tj.jpg" style="height: 22px" ToolTip="添加" />
                        </p>
                    </td>
                    <td width="50%"></td>
                </tr>
	    </table>        
        </asp:View>
        <asp:View ID="View_List" runat="server">
    	    <div style="text-align: right;" class="edittd">
        	<asp:CheckBox ID="cbSelectAll" runat="server" AutoPostBack="True" Text="全部" />&nbsp;
        	<asp:LinkButton ID="lnkBtnDel" runat="server"><img src="/App_Themes/ManagerTheme/Images/Delete.gif" style=" border:0px"/>&nbsp;删除选中</asp:LinkButton>&nbsp;&nbsp;
        	<a href="TemplateList.aspx?Action=Add&ClassID=<%=Request("ClassID") %>"><img src="/App_Themes/ManagerTheme/Images/add.gif" style=" border:0px" />&nbsp;添加</a>
    	    </div>       
            <asp:Repeater ID="rptList" runat="server">
                <HeaderTemplate>
                    <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" class="line_table">
			<tr>
			    <td width="5%" align="center" class="left_bt2">选择</td>
			    <td width="30%" align="left" class="left_bt2">模板名称</td>
			    <td width="30%" align="left" class="left_bt2">文件名</td>
			    <td width="20%" align="center" class="left_bt2">首页</td>
			    <td align="center" width="15%" class="left_bt2">操作</td>
			</tr>
	        </HeaderTemplate>
                <ItemTemplate>
                    <tr class="menuout"   onMouseOver="this.className='menuin'" onMouseOut="this.className='menuout'">
			<td width="5%" align="center"><asp:CheckBox ID="CheckOn" runat="server" ToolTip='<%#Eval("ID")%>' /></td>
			<td width="30%" align="left"><%#Eval("TmpName")%></td>
			<td width="30%" align="left"><%#Eval("FileName")%></td>
			<td width="20%" align="center"><%#DefaultPage(Eval("IsDefault"), Eval("ID"))%></td>
			<td width="15%" align="center">
			<a href="/<%#Eval("FileName") %>.html" target="_blank"><img src="/App_Themes/ManagerTheme/Images/Search.gif" style=" border:0px" />&nbsp;预览</a>&nbsp;&nbsp;&nbsp;
			<a href="TemplateList.aspx?Action=Edit&ClassID=<%=Request("ClassID") %>&ID=<%#Eval("ID") %>"><img src="/App_Themes/ManagerTheme/Images/Edit.gif" style=" border:0px" />&nbsp;编辑</a>&nbsp;&nbsp;&nbsp;
			<span style=" cursor:pointer;" onclick="confirmWindow('TemplateList.aspx?Action=Del&ClassID=<%=Request("ClassID") %>&ID=<%#Eval("ID") %>');"><img src="/App_Themes/ManagerTheme/Images/Delete.gif" style=" border:0px" />&nbsp;删除</span></td>
			        </tr>
                </ItemTemplate>
                <FooterTemplate></table></FooterTemplate>
            </asp:Repeater>
            <div style="text-align:center"> <cc1:iPaging ID="ListPaging" runat="server" /></div>        
        </asp:View>        
    </asp:MultiView>
</asp:Content>