2023-07-27 20:04:00 +00:00
|
|
|
{{define "title"}}Files{{end}}
|
2023-07-27 20:02:13 +00:00
|
|
|
|
|
|
|
{{define "main"}}
|
|
|
|
|
2023-08-05 11:35:56 +00:00
|
|
|
<a href="/admin">← Back</a>
|
2023-07-27 20:04:00 +00:00
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
<h2>Files</h2>
|
2023-07-27 20:02:13 +00:00
|
|
|
|
|
|
|
<form action="/admin/binaries/new" method="post" enctype="multipart/form-data">
|
|
|
|
<div>
|
|
|
|
<label for="file">File</label>
|
|
|
|
<input type="file" name="file" id="file">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<input type="submit" value="Upload">
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<table role="grid">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">File</th>
|
|
|
|
<th scope="col">Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{{ range .Binaries }}
|
|
|
|
<tr>
|
|
|
|
<td scope="row">
|
|
|
|
<a href="/media/{{ . }}">{{ . }}</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<form action="/admin/binaries/delete" method="post">
|
|
|
|
<input type="hidden" name="file" value="{{ . }}">
|
|
|
|
<label for="confirm">
|
|
|
|
<input type="checkbox" name="confirm"> Confirm
|
|
|
|
</label>
|
|
|
|
<input style="padding:0;height:2rem;" type="submit" value="Delete">
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
<nav class="row">
|
|
|
|
{{ if not .FirstPage }}
|
|
|
|
<div>
|
|
|
|
<a href="?page={{ .PrevPage }}">Prev</a>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<div>Page {{.Page}}</div>
|
|
|
|
|
|
|
|
{{ if not .LastPage }}
|
|
|
|
<div>
|
|
|
|
<a href="?page={{ .NextPage }}">Next</a>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
{{end}}
|