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

<h2>Library Export</h2>

<p class="hBlurb ui-state-highlight">Select to export the process library definition to xml or download the library file content as a zip.</p>

<asp:Button runat="server" ID="lnkExportXml" Text="Export to Xml" PostBackUrl="~/Library/Xml" />&nbsp;<asp:Button runat="server" ID="btnDownloadContent" Text="Download Files" PostBackUrl="~/Library/Files" />

    <h2>Library Types Export</h2>

<p class="hBlurb ui-state-highlight">Select to export the process types definition to xml or download the type icons content as a zip.</p>

<asp:Button runat="server" ID="lnkExportTypesXml" Text="Export Process Types to Xml" PostBackUrl="~/Library/XmlTypes" />&nbsp;<asp:Button runat="server" ID="btnDownloadTypesContent" Text="Download Process Type Icons" PostBackUrl="~/Library/FilesTypes" />


<h2>Library Import</h2>

<p class="hBlurb ui-state-highlight">Select to import the process library definition from xml or upload the library file content as a zip.  When importing library definition or content any existing content will be replaced.</p>

<div id="pnlImportControls">
    <asp:FileUpload ID="uploadXml" runat="server" /><dp:ConfirmButton ID="btnUploadXml" runat="server" OnClick="btnUploadXml_Click" Text="Import from Xml" 
        ConfirmMessage="Are you sure you want to import the selected xml definition file into the library?" OnOkScript="this.Enabled=false;"  />
    <br />
    <asp:FileUpload ID="uploadZip" runat="server" /><dp:ConfirmButton ID="btnUploadZip" runat="server" OnClick="btnUploadZip_Click" Text="Upload Files" ConfirmMessage="Are you sure you want to upload the selected zip file into the library content?" />    
    <br />
</div>
    
    <div id="importingMessage" style="display:none;">
        <h3>Importing library. This may take several minutes, please wait...</h3>
        <p style="margin:10px 0px 20px 200px;"><img src="../../App_Themes/default/images/dpupd.gif" /></p>
    </div>
    
    <asp:Label runat="server" ID="lblInfo"></asp:Label><br />
        <h2>Update process urls</h2>
    <p class="hBlurb ui-state-highlight">Rename process components urls and updated process html links.</p>
    
    <asp:Button ID="btnRenameLinks" runat="server" Text="Update process urls" OnClick="btnRenameLinks_Click" CausesValidation="false" /><br />
    <asp:Literal ID="litRenameLinksMessage" runat="server" />

    <h2>Index content</h2>
    <p class="hBlurb ui-state-highlight">Index the uploaded files in your repository to allow your colleagues to search inside attached process documents.</p>
    
    <asp:Button ID="btnIndexFiles" runat="server" Text="Index files" OnClick="btnIndexFiles_Click" CausesValidation="false" /><br />
    <asp:Literal ID="litIndexedMessage" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentOptions" runat="server">

    <ul class='ui-widget-content'>
        <li class="btn"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span><a href="..">
            Back to library</a></li>
        <li class="btn"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span><a href="<%=pd.R.GetReposRoot()+"/Admin/MigrateServer" %>">
            Server migration</a></li>
    
    </ul>

</asp:Content>
