<%@ include file="/includes.jsp" %>
<br/>
<center>
	<c:if test="${emdt.licenseValid == false}">
		<div class="summary">
			<div class="summaryTitle"><img style="vertical-align: bottom; " width="16" height="16" src="../images/16x16/exclamation.png"/> Licence problem</div>
				<div class="summarySection">
				<c:if test="${emdt.licenseExpired == true}">
					Please note that the license for this copy of eMDT has expired.
				</c:if>
				<c:if test="${emdt.licenseExpired == false}">
				There is a problem with your registration key - it is either missing or has been corrupted<br/>
				</c:if>
				<br/>
				Please <a href="../admin/index.jsp">click here</a> to register and activate your copy of eMDT.
			</div>
		</div>
		<br/>
	</c:if>	
	<c:forEach var="module" items="${webapp.modules }">
		<c:if test="${module.moduleInfo.summaryTile != null}">
		
			<sec:authorize access="hasRole('${module.moduleInfo.roles}')">
				<div class="summary">
					<div class="summaryTitle"><img style="vertical-align: bottom; " width="16" height="16" src="../${module.moduleInfo.name}/${module.moduleInfo.icon}"/> <c:out value="${module.moduleInfo.label}"/></div>
					<div class="summarySection">
						<c:set var="moduleInfo" value="/${module.moduleInfo.name}/${module.moduleInfo.summaryTile}"/>
						<tiles:insertTemplate template="${moduleInfo}">
							<tiles:putAttribute name="calmodule" value="${module}"></tiles:putAttribute>
						</tiles:insertTemplate>
					</div>
				</div>
				<br/>
			</sec:authorize>
		</c:if>
	</c:forEach>
		
</center>