templates/admin.html (view raw)
1{{$domain := .Host}}
2{{template "header" .}}
3<h1>{{.PageTitle}}</h1>
4{{template "nav.html" .}}
5<br>
6{{ range .Users }}
7<details>
8 <summary><b>{{.Username}}</b> {{if not .Active}}<em>(inactive)</em>{{end}}</summary>
9 <div class="user-admin-details">
10 <p>Home: <a href="//{{.Username}}.{{$domain}}">{{.Username}}</a> </p>
11 <p>Email: <a href=mailto:{{.Email}}>{{.Email}}</a></p>
12{{ if not .Active }}
13<p>
14<form action="/admin/user/{{.Username}}/activate" method="POST" class="inline">
15<input
16 class="button"
17 type="submit"
18 value="activate"
19/>
20</form>
21</p>
22{{ end }}
23 <p>
24<form action="/admin/user/{{.Username}}/delete" method="POST" class="inline">
25<input
26 class="button delete"
27 type="submit"
28 onclick="return confirm('Are you SURE you want to delete this user?');"
29 value="delete"
30/>
31</form>
32</div>
33</details>
34{{end}}
35
36{{template "footer" .}}