Add files missing from 0157ac3c46.

This commit is contained in:
Mihai Parparita 2014-11-16 21:50:18 -08:00
parent 0157ac3c46
commit 19f257f02e
3 changed files with 70 additions and 0 deletions

22
app/static/admin.css Normal file
View file

@ -0,0 +1,22 @@
#users-table {
border-collapse: collapse;
}
#users-table th,
#users-table td {
padding: 2px 5px;
}
#users-table th {
text-align: left;
}
#users-table td {
border: solid 1px #eee;
font-size: 14px;
}
#users-table .avatar {
padding-right: 1px;
vertical-align: text-bottom;
}

View file

@ -0,0 +1,12 @@
{{define "user"}}
<a href="https://github.com/{{.Login}}"
title="{{.Name}}">
<img src="{{.AvatarURL}}"
width="20"
height="20"
border="0"
class="avatar">{{.Login}}
</a>
{{end}}

View file

@ -0,0 +1,36 @@
{{define "title"}}Users Admin{{end}}
{{define "body"}}
<link rel="stylesheet" href="/static/admin.css">
<table id="users-table">
<thead>
<tr>
<th>User ID</th>
<th>Username</th>
<th>Email</th>
<th>Frequency</th>
<th>Repositories</th>
</tr>
</thead>
<tbody>
{{range .Users}}
<tr>
<td><a href="{{routeUrl "digest-admin"}}?user_id={{.GitHubUserId}}">{{.Account.GitHubUserId}}</a></td>
<td>{{template "user" .User}}</td>
<td>{{.EmailAddress}}</td>
<td>{{.Account.Frequency}}</td>
<td>
{{if .ReposError}}
{{.ReposError}}
{{else}}
{{len .Repos.AllRepos}} from {{len .Repos.OtherUserRepos}} other users and {{len .Repos.OrgRepos}} organizations
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}