<h2>Inbox</h2>
<form action="{ROOT_URL}messages/delete" method="post">
	<table class="table table-striped text-center">
		<thead>
			<tr>
				<th style="width: 15%">From</th>
				<th style="width: 40%">Subject</th>
				<th style="width: 20%">Last Reply</th>
				<th style="width: 10%"></th>
				<th style="width: 10%"></th>
				<th style="width: 5%">
					<INPUT type="checkbox" onchange="checkAll(this)" name="check.t" value="T_[]"/>
				</th>
			</tr>
		</thead>
		<tbody>
			{LOOP}
			<tr {unreadBadge}>
				<td><a href="{ROOT_URL}home/profile/{userFrom}" class="text-decoration-none">{userFromPretty}</a></td>
				<td><a href="{ROOT_URL}messages/view/{ID}" class="text-decoration-none">{subject}</a></td>
				<td>{DTC date}{lastReply}{/DTC}</td>
				<td><a href="{ROOT_URL}messages/read/{ID}" class="btn btn-sm btn-info"><i class="fa-solid fa-envelope-open"></i></a></td>
				<td><a href="{ROOT_URL}messages/delete/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></a></td>
				<td>
					<input type="checkbox" value="{ID}" name="T_[]">
				</td>
			</tr>
			{/LOOP}
			{ALT}
			<tr>
				<td align="center" colspan="6">
					No Messages.
				</td>
			</tr>
			{/ALT}
		</tbody>
	</table>
	<button name="submit" value="submit" type="submit" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-trash"></i></button>
	<a href="{ROOT_URL}messages/create" class="btn btn-sm btn-primary">New message</a>
</form>
