retrogit/app/templates/users-admin.html
Mihai Parparita 6b8e347a72 Stop looking up repos for all users on the admin page.
Takes too long to load. Move repos instead into a per-user page.

Also adds basic redacting of repo information.
2014-12-27 21:53:38 -08:00

49 lines
1.3 KiB
HTML

{{define "title"}}Users Admin{{end}}
{{define "body"}}
<link rel="stylesheet" href="/static/admin.css">
<div class="blurb">
{{len .Users}} users.
</div>
<table id="users-table">
<thead>
<tr>
<th>User ID</th>
<th>Username</th>
<th>Email</th>
<th>Frequency</th>
<th>Digest</th>
<th>Repos</th>
<th>Account</th>
</tr>
</thead>
<tbody>
{{range .Users}}
<tr>
<td>{{.Account.GitHubUserId}}</td>
<td>
{{if .User}}
{{template "user" .User}}
{{else}}
User could not be looked up, credentials have most likely been revoked.
{{end}}
</td>
<td>{{.EmailAddress}}</td>
<td>{{.Account.Frequency}}</td>
<td><a href="{{routeUrl "digest-admin"}}?user_id={{.Account.GitHubUserId}}">View</a></td>
<td><a href="{{routeUrl "repos-admin"}}?user_id={{.Account.GitHubUserId}}">View</a></td>
<td>
<form method="POST" action="{{routeUrl "delete-account-admin"}}" onsubmit="return confirm('Really delete?')">
<input type="hidden" name="user_id" value="{{.Account.GitHubUserId}}">
<input type="submit" value="Delete">
</form>
</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}