<!-- referrals/tiles/forms/formsMenu.jsp start -->
<% pageContext.setAttribute("newLineChar", "\n"); %>
<%@ include file="/includes.jsp"%>
<c:choose>
	<c:when test="${filterForm.name ne null }"><c:set var="nameOfForm" value="${filterForm.name}"></c:set></c:when>
	<c:otherwise><c:if test="${consultationNoteForm ne null}"><c:set var="nameOfForm" value="${consultationNoteForm.view.formName}"></c:set></c:if></c:otherwise>
</c:choose>
<c:forEach var="formSummaryMapOrder"
	items="${referralsDefinition.formSummaryMapOrder}">
	<c:if test="${formSummaryMapOrder.groupName==groupBy}">
		<c:choose>
			<c:when test="${formSummaryMapOrder.type=='Form'}">
				<c:choose>
					<c:when	test="${formSummaryMapOrder.formOrSummaryName eq nameOfForm and summaryName eq null and (addToMeeting eq null or addToMeeting ne true)}">
						<c:set var="menuButtonHolderDivClass" value="menuButtonSquare selected"/>
					</c:when>
				<c:otherwise>
					<c:set var="menuButtonHolderDivClass" value="menuButtonSquare blue"/>
				</c:otherwise>
			</c:choose>
			<div class="<c:out value="${menuButtonHolderDivClass}"/>">
				<a href="javascript:getConsNote(<c:out value="${formSummaryMapOrder.filterFormId}"/>)" style="cursor: pointer;">
				<pre><c:out value="${formSummaryMapOrder.name}"/></pre></a>
			</div>
			</c:when>
			<c:otherwise>
				<c:choose>
					<c:when	test="${formSummaryMapOrder.formOrSummaryName eq summaryName and (addToMeeting eq null or addToMeeting ne true)}">
						<c:set var="menuButtonHolderDivClass" value="menuButtonSquare selected"/>
					</c:when>
					<c:otherwise>
						<c:set var="menuButtonHolderDivClass" value="menuButtonSquare blue"/>
					</c:otherwise>
				</c:choose>
				<div class="<c:out value="${menuButtonHolderDivClass}"/>">
					<a href="patientSummaryActions.form?method=view&summaryId=<c:out value="${formSummaryMapOrder.summaryGuid}"/>&page=referrals">
						<pre><c:out value="${formSummaryMapOrder.name}"/></pre></a>
				</div>
			</c:otherwise>
		</c:choose>
	</c:if>
</c:forEach>
<!-- referrals/tiles/forms/formsMenu.jsp end -->
