<%@ Page language="c#" Codebehind="GenerateProjectByTemplate.aspx.cs" AutoEventWireup="false" Inherits="Mediachase.UI.Web.Projects.GenerateProjectByTemplate" %>
<%@ Register TagPrefix="ibn" TagName="BlockHeader" src="..\Modules\BlockHeader.ascx" %>
<%@ register TagPrefix="lst" namespace="Mediachase.UI.Web.Modules" Assembly="Mediachase.UI.Web" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
<html>
  <HEAD id="pT_headTag">
    <title>
			<%=LocRM.GetString("tCreateFromTemplate") %>
	</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
    <script src="../Scripts/browser.js"></script>
	<script src="../Scripts/buttons.js"></script>
	<LINK href="../layouts/styles/windows.css" type="text/css" rel="stylesheet">
	<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/theme.css" rel="stylesheet">
	<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/color1.css" rel="stylesheet">
	<script><!--
		if ((browseris.mac) && !browseris.ie5up)
		{
			var macstyle = "../layouts/styles/mac.css";
			document.write("<link rel='stylesheet' Type='text/css' href='" + macstyle + "'>");
		}
	
	//--></script>
  </head>
  <body class="UserBackground" id="pT_body" leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">
	
    <form id="frmMain" runat="server">
		<ibn:blockheader id="secHeader" title="ToolBar" runat="server"></ibn:blockheader>
		<table class="text" style="HEIGHT: 100%" height="100%" cellSpacing="0" cellPadding="3" width="100%" border="0">
			<tr height="22">
				<td class="boldtext" width="280" height="22"><%=LocRM.GetString("tAvailable") %>:</td>
				<td width="4">&nbsp;</td>
				<td class="ibn-navframe boldtext">
					<%=LocRM.GetString("tAssigned") %>:
				</td>
			</tr>
			<tr style="HEIGHT: 100%">
				<td vAlign="top" width="280">
					<!-- Groups & Users -->
					<table class="text" style="MARGIN-TOP: 5px" cellSpacing="0" cellPadding="3" width="100%">
						<tr>
							<td width="9%" style="HEIGHT: 18px">
								<%=LocRM.GetString("tGroup") %>:
							</td>
							<td width="91%" style="HEIGHT: 18px">
								<lst:indenteddropdownlist id="ddGroups" runat="server" CssClass="text" Width="190px" AutoPostBack="True" DataTextField="GroupName" DataValueField="GroupId"></lst:indenteddropdownlist>
							</td>
						</tr>
						<TR>
							<TD width="9%"><%=LocRM.GetString("tSearch") %>:</TD>
							<TD width="91%">
								<asp:TextBox id="tbSearch" runat="server" CssClass="text" Width="125px"></asp:TextBox>
								<asp:button id="btnSearch" runat="server" Width="60px" CssClass="text" CausesValidation="False"></asp:button>
							</TD>
						</TR>
						<tr>
							<td vAlign="top" height="96">
								<%=LocRM.GetString("tUser") %>:
							</td>
							<td vAlign="top">
								<asp:listbox id="lbUsers" runat="server" CssClass="text" Width="190px" SelectionMode="Multiple" Rows="6"></asp:listbox>
							</td>
						</tr>
						<tr>
							<td width="9%" style="HEIGHT: 18px">
								<%=LocRM.GetString("tRole") %>:
							</td>
							<td width="91%" style="HEIGHT: 18px">
								<lst:indenteddropdownlist id="ddRole" runat="server" CssClass="text" Width="190px" AutoPostBack="True" DataTextField="RoleName" DataValueField="RoleId"></lst:indenteddropdownlist>
							</td>
						</tr>
						<tr>
							<td vAlign="top" height="28">&nbsp;</td>
							<td><button id="btnAdd" runat="server" Class="text" style="width:90px" type="button"></button>
								<Button id="btnSave" runat="server" Text="Button" style="DISPLAY:none" type="button">
								</Button>
								<Button id="btnDelete" type=button Text="Button1" runat="server" style="display:none">
								</Button>
							</td>
						</tr>
					</table>
					<!-- End Groups & Users -->
				</td>
				<td width="4">&nbsp;</td>
				<td vAlign="top" class="ibn-navframe" height="100%">
					<div style="OVERFLOW:auto;HEIGHT:240px">
					<!-- Repeater -->
					<table border=0 cellpadding=3 cellspacing=0 class="text" width="100%">
						<asp:Repeater ID="repRoles" Runat=server>
							<ItemTemplate>
								<tr>
									<td class="ibn-vb2" style="COLOR:#606060">
										<b><%# DataBinder.Eval(Container.DataItem,"RoleName")%></b>
									</td>
								</tr>
								<tr>
									<td class="ibn-vb2">
										<table border=0 cellpadding=0 cellspacing=1 class="text" width=100%>
										<colgroup>
											<col width="30px">
											<col>
											<col width="25px">
										</colgroup>
											<asp:Repeater ID="repUsers" Runat=server>
												<ItemTemplate>
													<tr>
														<td></td>
														<td>
															<%# Mediachase.UI.Web.Util.CommonHelper.GetUserStatusUL(int.Parse(DataBinder.Eval(Container.DataItem,"PrincipalId").ToString()))%>
														</td>
														<td>
															<%# DataBinder.Eval(Container.DataItem,"Delete")%>
														</td>
													</tr>
												</ItemTemplate>
											</asp:Repeater>
										</table>
										<asp:Label style="PAdding-left:60px" ID="lblNone" Runat=server Text="tutu"></asp:Label>
									</td>
								</tr>
							</ItemTemplate>
						</asp:Repeater>
					</table>
					<!-- End Repeater -->
					</div>
				</td>
			</tr>
		</table>
		<input type="hidden" runat="server" id="hidPrId" NAME="hidPrId"/>
		<input type="hidden" runat="server" id="hidRoleId" NAME="hidRoleId"/>
		<script language=javascript>
			function FuncSave()
			{
				DisableButtons(document.forms[0].<%=btnSave.ClientID%>);
				<%=Page.GetPostBackClientEvent(btnSave,"") %>;
			}
		
			function DeleteItem(PrincipalId, RoleId)
			{
				if(confirm('<%=LocRM.GetString("tWarning")%>'))
				{
					document.forms[0].<%=hidPrId.ClientID%>.value = PrincipalId;
					document.forms[0].<%=hidRoleId.ClientID%>.value = RoleId;
					DisableButtons(document.forms[0].<%=btnDelete.ClientID%>);
					<%=Page.GetPostBackClientEvent(btnDelete,"") %>;
				}
			}
		</script>
     </form>
	
  </body>
</html>
