<%@ Page Title="Publish Library" Language="C#" MasterPageFile="~/2ColMaster.Master" AutoEventWireup="true" CodeBehind="PublishLibrary.aspx.cs" Inherits="ProcessDefinition.Auth.Admin.PublishLibrary" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentMain" runat="server">

<h2>Publish Library</h2>

    <asp:Panel id="pnlPublishingMessage" runat="server" visible="false">
        <h3 id='waitMsg'>Publishing library this may take several minutes, please wait...</h3>
        <p id='publishMsg'></p>
         <div id="progressBar">
        </div>
    </asp:Panel>

    <asp:Panel id="pnlPublishControls" runat="server">

    <p class="hBlurb ui-state-highlight">Publish this library when you are ready to freeze the whole library content.  Once published all library readers and project users will use the current versions of the processes regardless of future changes.
    To make a process update available to library readers and project users you can still individually freeze a process from the process page freeze option.</p>

    <dp:ValidatedTextBox ID="txtTitle" runat="server" LabelText="Title" Columns="100" AddLineBreak="true" ValidationGroup="titleVer" />
    <dp:ValidatedTextBox ID="txtVersion" runat="server" LabelText="Version" Columns="25" AddLineBreak="true" ValidationGroup="titleVer" />

    <asp:label runat="server" ID="lblDesc" AssociatedControlID="htmlDesc">Description:</asp:label>
    <dp:DpHtmlEditorMce ID="htmlDesc" runat="server" CssClass="htmlEditor" EditorHeight="450px" EditorWidth="100%" ShowHtmlMode="true" EnableViewState="false">
        <CustomUserCommands>
            <dp:CustomUserCommand UserCommand="Processes" CommandDialog="~/EditorModals/InsertProcessLink.aspx?type=Tool"
                CommandTitle="Insert Process Link" ButtonUrl="~/App_Themes/Default/images/InsertAnchor.gif"
                DialogWidth="850" DialogHeight="650" />
            <dp:CustomUserCommand UserCommand="Images" CommandDialog="~/EditorModals/InsertImageLink.aspx"
                CommandTitle="Insert Image Link" ButtonUrl="~/App_Themes/Default/images/ImageManager.gif"
                DialogWidth="850" DialogHeight="600" />
            <dp:CustomUserCommand UserCommand="Files" CommandDialog="~/EditorModals/InsertFilesLink.aspx"
                CommandTitle="Insert File Link" ButtonUrl="~/App_Themes/Default/images/TemplateManager.gif"
                DialogWidth="850" DialogHeight="640" />
        </CustomUserCommands>
    </dp:DpHtmlEditorMce>
               
    </asp:Panel>
    
    
<div style='display:none;' class='assignTask ui-corner-all' id='publishLibraryDlg'>
    <div class="hBlurb ui-state-highlight">
        Once you have published a library it can't be unpublished.  The current versions of each
        process will be used for project tasks and library reader users.
    </div>
    <p style="text-align:right;margin-right:10px;margin-top:5px;">
        <asp:Button runat="server" ID='btnPublishLibrary' Text="Publish" CssClass="ui-corner-all ui-state-default dpButton" 
            OnClientClick="javascript: publishLibrary()" OnClick="btnPublishLibrary_OnClick" />
        <input type="button" id='btnCancelPublish' value="Cancel" class="ui-corner-all ui-state-default ui-priority-secondary dpButton"/>
    </p>
    
    </div>
    
                
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentOptions" runat="server">

    <ul class='ui-widget-content' id="ulCancel">
        <li class="btn"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span><a href="..">Cancel</a></li>
    </ul>
    <ul class='ui-widget-content' id="ulSave">
        <li class="btn btnSave" id="publishLibrary"><span class="ui-icon ui-icon-play"></span><a href="#">Publish</a></li>
    </ul>

</asp:Content>
