72 lines
1.6 KiB
Cheetah
72 lines
1.6 KiB
Cheetah
{{define "title"}}Files{{end}}
|
|
|
|
{{define "main"}}
|
|
|
|
<a href="/admin">← Back</a>
|
|
<br>
|
|
<br>
|
|
|
|
<h2>Files</h2>
|
|
|
|
|
|
<h3>Upload File</h3>
|
|
<form action="/admin/binaries/new" method="post" enctype="multipart/form-data">
|
|
<fieldset role="group">
|
|
<input type="file" name="file" id="file">
|
|
<input type="submit" value="Upload">
|
|
</fieldset>
|
|
</form>
|
|
|
|
<hr>
|
|
|
|
<h3>Files</h3>
|
|
<form action="" method="get">
|
|
<fieldset role="search">
|
|
<input type="filter" name="filter" id="filter" value="{{.Filter}}">
|
|
<input type="submit" value="Search">
|
|
</fieldset>
|
|
</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}} |