2019-01-05 04:28:29 +01:00
|
|
|
{{define "users"}}
|
|
|
|
{{template "header" .}}
|
|
|
|
|
|
|
|
<div class="snug content-container">
|
|
|
|
{{template "admin-header" .}}
|
|
|
|
|
2019-01-05 15:37:53 +01:00
|
|
|
<h2 id="posts-header" style="display: flex; justify-content: space-between;">Users <span style="font-style: italic; font-size: 0.75em;">{{.TotalUsers}} total</strong></h2>
|
2019-01-05 04:28:29 +01:00
|
|
|
|
2019-01-05 15:37:53 +01:00
|
|
|
<table class="classy export" style="width:100%">
|
2019-01-05 04:28:29 +01:00
|
|
|
<tr>
|
|
|
|
<th>User</th>
|
|
|
|
<th>Joined</th>
|
|
|
|
<th>Type</th>
|
2019-08-28 21:37:45 +02:00
|
|
|
<th>Status</th>
|
2019-01-05 04:28:29 +01:00
|
|
|
</tr>
|
|
|
|
{{range .Users}}
|
|
|
|
<tr>
|
|
|
|
<td><a href="/admin/user/{{.Username}}">{{.Username}}</a></td>
|
|
|
|
<td>{{.CreatedFriendly}}</td>
|
|
|
|
<td style="text-align:center">{{if .IsAdmin}}Admin{{else}}User{{end}}</td>
|
2019-08-28 21:37:45 +02:00
|
|
|
<td style="text-align:center">
|
|
|
|
<a
|
|
|
|
href="/admin/user/{{.Username}}#status"
|
2019-10-25 21:04:24 +02:00
|
|
|
title="View or change account status">{{if eq .Status 1}}suspended{{else}}active{{end}}</a></td>
|
2019-01-05 04:28:29 +01:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</table>
|
|
|
|
|
2019-01-05 15:37:53 +01:00
|
|
|
<nav class="pager">
|
|
|
|
{{range $n := .TotalPages}}<a href="/admin/users{{if ne $n 1}}?p={{$n}}{{end}}" {{if eq $.CurPage $n}}class="selected"{{end}}>{{$n}}</a>{{end}}
|
|
|
|
</nav>
|
|
|
|
|
2019-01-05 04:28:29 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{template "footer" .}}
|
|
|
|
{{end}}
|