<%@ include file="/includes.jsp"%>
<tiles:importAttribute />
<script>
//<!--
	function editEvent(url, type) {
		if(type == "event") {
			window.open(url,'editEvent','scrollbars=1,toolbar=0,status=1,menubar=1,resizable=1,location=0,directories=0,width=500,height=600');
		} else if(type == "meeting") {
			document.location = url;
		}
	}
	
	function update() {
		document.location.reload();
	}
//-->
</script>
<div style="font-weight: bold; font-size: 10pt;">Today's events:</div>
<br />
<c:set var="events" value="${calmodule.eventSummary}" />
<c:forEach var="event" items="${events}">
	<c:if test="${event.type eq 'event'}">
		<div>
			<fmt:formatDate value="${event.event}" pattern="HH:mm" />-<fmt:formatDate value="${event.endDate}" pattern="HH:mm" /><a href="javascript:editEvent('${event.editUrl}', 'event')"><c:out value="${event.title}" /></a>
		</div>
	</c:if>
</c:forEach>
<c:if test="${empty events }">
	<div>No events today</div>
</c:if>
