<html xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude">
	<xi:include href="../layout.html" />
	<head>
		<title>Session Log For Day</title>
		<link rel="stylesheet" type="text/css" href="/data/manager.css" />
	</head>
	<body>
		<navheader>/manager/session_log</navheader>
		<table>
			<thead><tr><th>Daily ID</th><th>User</th><th>Status</th><th>Start Time</th><th>End Time</th><th>System</th></tr></thead>
			<tbody>
				<tr py:for="session in result">
					<th>#$session.daily_id</th>
					<td>$session.user</td>
					<td py:choose="">
						<py:when test="not session.start_time and not session.end_time">Waiting</py:when>
						<py:when test="session.start_time and not session.end_time">Logged on</py:when>
						<py:when test="session.start_time and session.end_time">Done</py:when>
					</td>
					<td>${session.start_time.strftime('%I:%M:%S %p') if session.start_time else 'N/A'}</td>
					<td>${session.end_time.strftime('%I:%M:%S %p') if session.end_time else 'N/A'}</td>
					<td>${session.system or 'N/A'}</td>
					<td py:if="not session.end_time">
						<form action="" method="POST">
							<input type="hidden" name="session_id" value="$session.session_id" />
							<input name="method" type="hidden" value="DELETE" />
							<button type="submit">Delete</button>
						</form>
					</td>
				</tr>
			</tbody>
		</table>
	</body>
</html>
