all repos — flounder @ 4ef29f5b6813e3343f9a3743881320f8dd37ce67

A small site builder for the Gemini protocol

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    <p>Reference: {{.Reference}}</p>
13{{ if not .Active }}
14<p>
15<form action="/admin/user/{{.Username}}/activate" method="POST" class="inline">
16<input
17  class="button"
18  type="submit"
19  value="activate"
20/>
21</form>
22</p>
23{{ end }}
24  <p>
25<form action="/admin/user/{{.Username}}/delete" method="POST" class="inline">
26<input
27  class="button delete"
28  type="submit"
29  onclick="return confirm('Are you SURE you want to delete this user?');"
30  value="delete"
31/>
32</form>
33</div>
34</details>
35{{end}}
36
37{{template "footer" .}}