<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="	com.novell.emframe.dev.MUtils" %>

<!-- //File: simple/Launch.jsp -->

<%@ taglib uri="/WEB-INF/iman.tld" prefix="iman" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c-rt" %>


<iman:stringtable bundle="DevResources"/>
<iman:stringtable bundle="FwResources"/>

<HTML>
<head>
  <title><iman:string key="RBAInstall.RolesTitle" /></title>
  <LINK rel="stylesheet" href="<%= MUtils.getModulesUrl(request) %>/fw/css/HF_style1.css">
  <script type="text/javascript">

     function showHiddenTaskMessage()
     {
        parent.Content.location.href="webacc?taskId=fw.HomePage&merge=fw.HomePage&User.context=<c:out value="${User.context}" />";
     }

  </script>
</head>
<body <c:if test="${requestScope['Launch.ShowHiddenTasksMessage'] == 'true'}">onload="showHiddenTaskMessage();" </c:if>marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" bgcolor="<c:out value="${menuColor}" />">
	<c:choose>
	<c:when test="${requestScope['Task_Role_Count'] == '0'}">
		<table align="center" border="0" cellpadding="5">
			<tr>
				<td align="center">
					<b><iman:string key="Launch.NoRolesText" /></b>
				</td>
			</tr>
		</table>
	</c:when>
	<c:otherwise>
	<div class="padding4" style="font-weight: bold; background: url(<%= MUtils.getModulesUrl(request) %>/fw/images/header_pattern4.gif) repeat-x; background-color: <c:out value="${headerColor}" />" width="100%">
		<img class="margin5l" src="<%= MUtils.getModulesUrl(request) %>/fw/images/<c:out value="${view}" />Heading.gif" width="16" height="16" align="absmiddle">&nbsp;&nbsp;<c:out value="${requestScope['Launch.HeadingText']}" />
	</div>
	<!--br-->
	<table cellspacing="0" cellpadding="1">
		<tr><td height="8"></td></tr>
<%	 int roleCount = ((Integer)request.getAttribute("Task_Role_Count")).intValue(); %>
	<c-rt:forEach var="currRoleIdx" begin="0" end="<%= roleCount -1 %>">
		<c:set var="menuItemNameParam">Task_Role_<c:out value="${currRoleIdx}" />_Name</c:set>
	   <c:if test="${currRoleIdx != '0'}">
	   	<tr><td height="8"></td></tr>
		</c:if>
		<tr>
			<td colspan="2">
				&nbsp;&nbsp;&nbsp;<b><c:out value="${requestScope[menuItemNameParam]}" /></b>
			</td>
		</tr>
<%	 	int taskCount = ((Integer)request.getAttribute("Task_Role_" + pageContext.getAttribute("currRoleIdx")+"_Task_Count")).intValue(); %>
		<c-rt:if test="<%= taskCount > 0 %>">
			<c-rt:forEach var="currTaskIdx" begin="0" end="<%=taskCount - 1%>">
				<c:set var="currTaskParam">Task_Role_<c:out value="${currRoleIdx}" />_Task_<c:out value="${currTaskIdx}" /></c:set>	
				<tr>
					<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
					<td class="smalltext2a">
						<c-rt:set var="currTaskUrl" value="<%=request.getAttribute((String)pageContext.getAttribute(\"currTaskParam\")+\"_Url\")%>" />
						<c:if test="${empty currTaskUrl}">
							<c:set var="currTaskUrl">frameservice?NPService=fw.LaunchService&NPAction=Delegate&delegate=<%=request.getAttribute((String)pageContext.getAttribute("currTaskParam")+"_TaskId")%>&launcher=fw.HomePage&lifecycle=Recreate&repeatable=true</c:set>
						</c:if>
						<a href="<c:out value="${currTaskUrl}" />" target="Content"><%=request.getAttribute((String)pageContext.getAttribute("currTaskParam")+"_Name")%></a>
					</td>
				</tr>
			</c-rt:forEach>
		</c-rt:if>
	</c-rt:forEach>
	</table>
	</c:otherwise>
	</c:choose>
</body>
</HTML>
