<%@ Page Language="C#" MasterPageFile="~/2ColMaster.Master" AutoEventWireup="true"
    CodeBehind="NewProject.aspx.cs" Inherits="ProcessDefinition.NewProject" Title="New project library" %>
    
<asp:Content ID="Content1" ContentPlaceHolderID="ContentMain" runat="server">
    <h2>New project library</h2>
    <p class="hBlurb ui-state-highlight" id='nameFeedback'>Project libraries are used to group projects and assign project member rights.<br />
        Once a project library has been created you can create projects from processes.</p>
    <asp:Panel ID="pnlNewProject" runat="server" DefaultButton="btnCreate">
        <dp:ValidatedTextBox ID="txtProjectName" runat="server" LabelText="Project library name" ValidationGroup="newProj" Columns="40" />
        <br />
        <asp:Button ID="btnCreate" runat="server" Text="Create project library" ValidationGroup="newProj" OnClick="btnCreate_Click" />

        <asp:ObjectDataSource ID="odsItems" runat="server" OldValuesParameterFormatString="original_{0}"
            SelectMethod="GetProjects" TypeName="DevProcess.ProcessDefinitionService.ProcessDefinitionManager">
            <SelectParameters>
                <asp:Parameter Name="repositoryName" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ListView ID="lstItems" runat="server" ItemPlaceholderID="itemList" EnableViewState="False"
            DataSourceID="odsItems">
            <LayoutTemplate>
                <h2>
                    Existing project libraries based on this repository</h2>
                <ul>
                    <asp:PlaceHolder ID="itemList" runat="server" />
                </ul>
            </LayoutTemplate>
            <ItemTemplate>
                <li class='pSum'>
                    <a href='<%#DevProcess.Common.Utils.StringHelper.Format("{0}/Project/{1}/SelectProject", ReposRoot, DevProcess.ProcessDefinitionService.ProcessDefinitionManager.ScrambleProjectId((int)Eval("ProjectId")))%>'>
                    <%# DevProcess.Common.Utils.StringHelper.Format("{0:multilinenourl}", Eval("ProjectName"))%>
                 </a>
                </li>
            </ItemTemplate>
            <EmptyDataTemplate>
            </EmptyDataTemplate>
        </asp:ListView>
    </asp:Panel>
</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>
    </ul>
</asp:Content>
