<%@ include file="/includes.jsp" %>
<c:if test="${emdt.formDomain != null }">
	<c:set var="fDom" value="${emdt.formDomain}"/>
	<sec:authorize access="hasRole('${fDom.roles}')" >
		<c:forEach var="group" items="${fDom.children}">
				<sec:authorize access="hasRole('${group.roles}')">
					<c:if test="${fn:length(forms) gt 0 }">
						<div align="center" class="menuItem" title='<c:out value="${group.description }"/>'>--<c:out value="${group.label }"/>--</div>
						<c:forEach var="form" items="${forms}">
							<sec:authorize access="hasRole('${form.roles}')">
								<c:if test="${form.liveStatus != 0}">
									<div class="menuItem" ><a onclick="return dataGuard()"  href="/emdt/patientHistoryActions.form?filterFormId=<c:out value="${form.id }"/>" title="<c:out value="${form.description }"/>"><c:out value="${form.label }"/></a></div>
								</c:if>
								<c:if test="${form.liveStatus eq 0 and emdt.currentUser.username eq form.owner}">
									<div class="menuItem" ><a onclick="return dataGuard()"  href="/emdt/patientHistoryActions.form?filterFormId=<c:out value="${form.id }"/>" title="<c:out value="${form.description }"/>"><c:out value="${form.label }"/></a></div>
								</c:if>
							</sec:authorize>
						</c:forEach>
					</c:if>
				</sec:authorize>
		</c:forEach>
	</sec:authorize>
</c:if>