94 lines
3.2 KiB
HTML
94 lines
3.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Uploads{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="grow container mx-auto mt-4">
|
|
<div id="upload-list-container" class="panel gap-2">
|
|
<div class="flex flex-row justify-between items-center">
|
|
<h1 class="heading">
|
|
<a href="/admin">Administration</a> / Uploads
|
|
</h1>
|
|
<div class="buttons">
|
|
<button
|
|
class="button"
|
|
type="button"
|
|
hx-get="/admin/uploads"
|
|
hx-target="#upload-list-container"
|
|
hx-select="#upload-list-container"
|
|
hx-swap="outerHTML">
|
|
<span class="icon-refresh-cw"></span>
|
|
Refresh
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="table">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th class="text-nowrap text-right">ID</th>
|
|
<th class="text-nowrap text-left">Slug</th>
|
|
<th class="text-nowrap text-left">Filename</th>
|
|
<th class="text-nowrap text-left">Access</th>
|
|
<th class="text-nowrap text-right">Downloads</th>
|
|
<th class="text-nowrap text-right">Limit</th>
|
|
<th class="text-nowrap text-left">Expires</th>
|
|
<th class="text-nowrap text-left">Uploaded At</th>
|
|
<th class="text-nowrap text-left">Uploaded By</th>
|
|
<th class="text-nowrap text-left">Uploaded From</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for upload in uploads %}
|
|
<tr>
|
|
<td class="text-right text-nowrap">{{ upload.id }}</td>
|
|
<td class="text-left text-nowrap">
|
|
<a href="/uploads/{{ upload.slug }}" target="_blank">
|
|
{{ upload.slug }}
|
|
</a>
|
|
</td>
|
|
<td class="text-left">
|
|
<code class="text-nowrap">{{ upload.filename }}</code>
|
|
</td>
|
|
<td class="text-nowrap">
|
|
{% if upload.public %}Public{% else %}Private{% endif %}
|
|
</td>
|
|
<td class="text-right text-nowrap">
|
|
{{ upload.downloads }}
|
|
</td>
|
|
<td class="text-right text-nowrap">
|
|
{% if upload.limit %}
|
|
{{ upload.limit }} ({{ upload.remaining }} remaining)
|
|
{% else %}
|
|
<i>Unlimited</i>
|
|
{% endif %}
|
|
</td>
|
|
<td class="text-left text-nowrap">
|
|
{% if upload.expiry_date %}
|
|
<parcel-date value="{{ upload.expiry_date | date }}">
|
|
{{ upload.expiry_date | date }}
|
|
</parcel-date>
|
|
{% else %}
|
|
<i>Never</i>
|
|
{% endif %}
|
|
</td>
|
|
<td class="text-left text-nowrap">
|
|
<parcel-datetime value="{{ upload.uploaded_at | datetime }}">
|
|
{{ upload.uploaded_at | datetime }}
|
|
</parcel-datetime>
|
|
</td>
|
|
<td class="text-left text-nowrap">
|
|
{{ upload.uploaded_by_name }}
|
|
</td>
|
|
<td class="text-left text-nowrap">
|
|
<code>{{ upload.remote_addr }}</code>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|