diff options
author | clsr <clsr@clsr.net> | 2016-11-15 19:49:55 +0100 |
---|---|---|
committer | clsr <clsr@clsr.net> | 2016-11-15 19:49:55 +0100 |
commit | 6781fbf03de68483ab7a8d57be85d2f2fc9a4df6 (patch) | |
tree | 4e69a053318d39016a1a10436626f475ead13e40 /templates | |
download | gomf-modpanel-web-6781fbf03de68483ab7a8d57be85d2f2fc9a4df6.tar.gz gomf-modpanel-web-6781fbf03de68483ab7a8d57be85d2f2fc9a4df6.zip |
Initial commit
Diffstat (limited to 'templates')
-rw-r--r-- | templates/deletion_log.html | 32 | ||||
-rw-r--r-- | templates/panel.html | 57 |
2 files changed, 89 insertions, 0 deletions
diff --git a/templates/deletion_log.html b/templates/deletion_log.html new file mode 100644 index 0000000..64fd7cb --- /dev/null +++ b/templates/deletion_log.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Deletion log</title> + <link href="{{.Prefix}}static/bootstrap/css/bootstrap.min.css" rel="stylesheet"> + </head> + <body> + <h1>Deletion log</h1> + + <table class="table table-hover"> + <thead> + <tr> + {{ range $k, $v := (index .Deletions 0) }} + <th>{{$k}}</th> + {{ end }} + </tr> + </thead> + {{ range .Deletions }} + <tr> + {{ range $k, $v := . }} + <td>{{$v}}</td> + {{ end }} + </tr> + {{ end }} + </table> + + <script src="{{.Prefix}}static/jquery.min.js"></script> + <script src="{{.Prefix}}static/bootstrap/js/bootstrap.min.js"></script> + </body> +</html> 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> |