<%@ Page Language="VB" MasterPageFile="~/Site.master" Title="Charter - CMS" AutoEventWireup="false" ValidateRequest="false" CodeFile="Publish.aspx.vb" Inherits="PublIsh" %>
<%@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="adminPageBody" Runat="Server">

    <script language="javascript" type="text/javascript">
    function fnConfirm()
        {
            if(confirm("Do you want to Publish the changes? -Publish will move the changes to the live version of the site! ") )
                {
                    return true;
                }
             return false;
        }
    </script>

       
          <div>
              <asp:HyperLink ID="linkPreview" runat="server" Target="_blank">Click here to view all approved changes</asp:HyperLink>
              <br />
              <asp:HyperLink ID="lnkCreate" Font-Bold="true" NavigateUrl="Default.aspx" runat="server">CMS Menu</asp:HyperLink>
              <br />
              <br />
        <strong>Choose the Template ID to Publish:</strong>
        <asp:DropDownList ID="ddlTemplate" runat="server" 
             AutoPostBack="True">
        </asp:DropDownList><br />
        &nbsp;
        <br />
        <asp:Button OnClientClick="javascript:return fnConfirm();" ID="btnPublish" runat="server" Font-Bold="True" Height="31px" Text="Publish"
            Width="192px" />
        <asp:Button ID="btnRefreshCache" runat="server" Font-Bold="True" Height="31px" Text="Refresh Template Cache" Width="192px" />
        <br />
        <br />
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" CellPadding="4" DataKeyNames="VersionID" DataSourceID="ObjectDataSource2"
            ForeColor="#333333" GridLines="None">
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="VersionID" HeaderText="VersionID" InsertVisible="False"
                    ReadOnly="True" SortExpression="VersionID" />
                <asp:BoundField DataField="CONTENT_NAME" HeaderText="CONTENT_NAME" SortExpression="CONTENT_NAME" />
                <asp:BoundField DataField="ApprovedBy" HeaderText="Approved By" />
                <asp:BoundField DataField="ApprovedDate" HeaderText="Approved Date" />
            </Columns>
            <RowStyle BackColor="#EFF3FB" />
            <EditRowStyle BackColor="#2461BF" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
              <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetApprovedVersions"
                  TypeName="CMSContentManager">
                  <SelectParameters>
                      <asp:ControlParameter ControlID="ddlTemplate" Name="TemplateID" PropertyName="SelectedValue"
                          Type="Int32" />
                  </SelectParameters>
              </asp:ObjectDataSource>
              &nbsp; &nbsp;&nbsp;<br />
        <FCKeditorV2:FCKeditor ID="FCKeditor" runat="server" BasePath="FCKeditor/" Height="495px"
            ToolbarSet="Greenhouse" Width="700px" Visible="False">
        </FCKeditorV2:FCKeditor>
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
    </div>    
</asp:Content>