<%@ include file="/includes.jsp" %>
<c:set var="view"  value="${calendar.currentView}"/>
<c:set var="prev"><fmt:formatDate value="${view.previous}" type="date" pattern="dd/MM/yyyy" /></c:set>
<c:set var="next"><fmt:formatDate value="${view.next}" type="date" pattern="dd/MM/yyyy" /></c:set>
<table class="calendarTable" height="95%" width="99%">
	<tr><%-- START TITLE --%>
		<td>
			<table width="100%" cellpadding="0" cellspacing="0" class="viewTitle">
				<tr>
					<td width="33%" align="left"><a href='calendarActions.form?method=changeDate&date=${prev}'>&lt; Prev</a></td>
					<td align="center">
						<fmt:formatDate value="${view.dateRange.start}" pattern="EEEE dd MMM yyyy"/>
						<a title="Add an event" href="javascript:addEvent('<fmt:formatDate value="${view.dateRange.start}" pattern="dd/MM/yyyy"/>')"><img src="images/16x16/addEvent.png"/></a>
					</td>
					<td align="right" width="33%"><a href='calendarActions.form?method=changeDate&date=${next}'>Next &gt;</a></td>
				</tr>
			</table>
		</td>
	</tr><%-- END TITLE --%>
	<tr valign="top">
			<c:set var="gotoDay"><fmt:formatDate value="${view.dateRange.start}" pattern="dd/MM/yyyy"/></c:set>
			<td  width="120" height="100%" class="dayCell dayCellCurrentMonthtrue">
			<c:forEach var="event" items="${view.events}">
				<c:set var="title">From <fmt:formatDate value="${event.startDate}" pattern="HH:mm dd/MM/yy"/> to <fmt:formatDate value="${event.endDate}" pattern="HH:mm dd/MM/yy"/></c:set>
				<fmt:formatDate value="${event.startDate}" pattern="HH:mm"/> - <fmt:formatDate value="${event.endDate}" pattern="HH:mm"/>: <a title="${title}" href="javascript:editEvent('${event.editUrl}', '${event.type}')" style="color:${event.fgColour }; background-color:${event.bgColour }"><c:out value="${event.title}"/></a><br/><c:out value="${event.description}"/>
			
			</c:forEach>
		</td>
	</tr>
</table>