owl-blogs/render/templates/views/binary_manager.tmpl

73 lines
1.6 KiB
Cheetah
Raw Normal View History

2023-07-27 20:04:00 +00:00
{{define "title"}}Files{{end}}
2024-02-24 20:21:48 +00:00
{{define "head"}}{{end}}
2023-07-27 20:02:13 +00:00
{{define "main"}}
2023-08-05 11:35:56 +00:00
<a href="/admin">&larr; Back</a>
2023-07-27 20:04:00 +00:00
<br>
<br>
<h2>Files</h2>
2023-07-27 20:02:13 +00:00
2024-02-23 12:02:13 +00:00
<h3>Upload File</h3>
2023-07-27 20:02:13 +00:00
<form action="/admin/binaries/new" method="post" enctype="multipart/form-data">
2024-02-23 12:02:13 +00:00
<fieldset role="group">
2023-07-27 20:02:13 +00:00
<input type="file" name="file" id="file">
<input type="submit" value="Upload">
2024-02-23 12:02:13 +00:00
</fieldset>
2023-07-27 20:02:13 +00:00
</form>
2024-02-23 11:34:05 +00:00
<hr>
2024-02-23 12:02:13 +00:00
<h3>Files</h3>
2024-02-23 11:34:05 +00:00
<form action="" method="get">
2024-02-23 12:02:13 +00:00
<fieldset role="search">
2024-02-23 11:34:05 +00:00
<input type="filter" name="filter" id="filter" value="{{.Filter}}">
<input type="submit" value="Search">
</fieldset>
</form>
2023-07-27 20:02:13 +00:00
<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}}