diff options
Diffstat (limited to 'templates/panel.html')
-rw-r--r-- | templates/panel.html | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/templates/panel.html b/templates/panel.html new file mode 100644 index 0000000..be0fe14 --- /dev/null +++ b/templates/panel.html @@ -0,0 +1,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> + + {{ $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 }} + + {{ 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-{{.id}}">Reason: </label><input type="text" name="reason" id="reason-{{.id}}" /> + <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 }} + + <script src="{{.Prefix}}static/jquery.min.js"></script> + <script src="{{.Prefix}}static/bootstrap/js/bootstrap.min.js"></script> + </body> +</html> |