{% extends "base.html" %}

{% block title %}
	&raquo; Report Downloads
{% endblock %}

{% block nav %}
	Report Downloads
{% endblock %}

{% block content %}

	<table>
		<caption><a href="/downloads">Refresh page</a> ({{num_running}} running)</caption>
		<thead>
			<tr>
				<th>Name</th>
				<th>Size</th>
				<th>Last Modified</th>
				<th>
				</th>
			</tr>
		</thead>
		<tbody>
			{% for file in files %}
				<tr>
					<td>
						<a href="/downloads/{{file.name}}">{{file.name}}</a>
					</td>
					<td style="text-align: right;">
						{{"{:,}".format(file.size)}} B
					</td>
					<td>{{file.last_modified|date_format}}</td>
					<td>
						<form hx-delete="/downloads/{{file.name}}"
								hx-confirm="Are you sure you want to delete this file?">
							<fieldset>
								<input type="submit" name="delete" value="Delete">
							</fieldset>
						</form>
					</td>
				</tr>
			{% endfor %}
		</tbody>
	</table>
{% endblock %}
