blob: 7d79d9bb44c9dd6e45f8558d21370028371b9fbf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mod panel</title>
<link href="{{.Prefix}}static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<h1>Mod panel</h1>
{{ if .Entries }}
<table class="table table-hover">
<thead>
<tr>
<th>id</th>
{{ range $k, $v := (index .Entries 0) }}
{{ if ne $k "id" }}<th>{{$k}}</th>{{ end }}
{{ end }}
<th>Delete</th>
</tr>
</thead>
{{ range .Entries }}
<tr>
<td><a href="file/{{.id}}">{{.id}}</a></td>
{{ range $k, $v := . }}
{{ if ne $k "id" }}<td>{{$v}}</td>{{ end }}
{{ end }}
<td>
<form action="delete" method="post">
<input type="hidden" name="id" value="{{.id}}" />
<input type="hidden" name="file" value="{{.hash}}" />
<label for="reason-{{.hash}}">Reason: </label><input type="text" name="reason" id="reason-{{.hash}}" />
<button type="submit" name="type" value="file">Delete file</button>
<button type="submit" name="type" value="id">Delete ID</button>
</form>
</td>
</tr>
{{ end }}
</table>
{{ end }}
{{ $current := .Current }}
{{ if .Logs }}
<nav>
<ul class="pagination">
{{ range .Logs }}
<li {{ if eq . $current }}class="active" {{ end }}><a href="{{.}}">{{.}}</a></li>
{{ end }}
</ul>
</nav>
{{ end }}
<script src="{{.Prefix}}static/jquery.min.js"></script>
<script src="{{.Prefix}}static/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
|