| 1 | {{define "title"}}{{say "admin.title"}}{{end}} |
| 2 | {{define "content"}} |
| 3 | <div class="ledger"> |
| 4 | <h1 class="ledger__title">{{say "admin.title"}}</h1> |
| 5 | |
| 6 | {{/* The tally, in the bill's own hand. Confirmed rows only: a pending |
| 7 | row is an address nobody has proven owns it, joined to a stated |
| 8 | position, which is the pair this app takes most care with. */}} |
| 9 | <p class="ledger__tally"> |
| 10 | <b>{{len .Rows}}</b> {{say "admin.confirmed"}} |
| 11 | <span>·</span> |
| 12 | <b>{{.Pending}}</b> {{say "admin.pending"}} |
| 13 | </p> |
| 14 | |
| 15 | <p class="ledger__split"> |
| 16 | {{range $key, $count := .Counts}}<span><b>{{$count}}</b> {{say (printf "stance.%s.label" $key)}}</span>{{end}} |
| 17 | </p> |
| 18 | |
| 19 | <p><a class="bill__out" href="/admin/export.csv">{{say "admin.export"}}</a></p> |
| 20 | |
| 21 | <table class="ledger__table"> |
| 22 | <thead> |
| 23 | <tr> |
| 24 | <th>{{say "admin.col.name"}}</th> |
| 25 | <th>{{say "admin.col.email"}}</th> |
| 26 | <th>{{say "admin.col.stance"}}</th> |
| 27 | <th>{{say "admin.col.when"}}</th> |
| 28 | <th>{{say "admin.col.background"}}</th> |
| 29 | </tr> |
| 30 | </thead> |
| 31 | <tbody> |
| 32 | {{range .Rows}} |
| 33 | <tr> |
| 34 | <td>{{.Name}}</td> |
| 35 | <td>{{.Email}}</td> |
| 36 | <td>{{say (printf "stance.%s.label" .Stance)}}</td> |
| 37 | <td>{{.When.Format "2006-01-02"}}</td> |
| 38 | <td>{{.Background}}</td> |
| 39 | </tr> |
| 40 | {{else}} |
| 41 | <tr><td colspan="5">{{say "admin.empty"}}</td></tr> |
| 42 | {{end}} |
| 43 | </tbody> |
| 44 | </table> |
| 45 | |
| 46 | <form method="post" action="/signout"> |
| 47 | <button type="submit" class="stamp">{{say "admin.signout"}}</button> |
| 48 | </form> |
| 49 | </div> |
| 50 | {{end}} |
| 51 | |