{{template "base/head" .}}
<div class="admin user">
	<div class="ui container">
		<div class="ui grid">
			{{template "admin/navbar" .}}
			<div class="twelve wide column content">
				{{template "base/alert" .}}
				<h4 class="ui top attached header">
					User Manage Panel (Total: {{.Total}}) 👦
					<div class="ui right">
						<a class="ui black tiny button" href="{{AppSubURL}}/admin/users/new">Create New Account</a>
					</div>
				</h4>
				<div class="ui attached segment">
					{{template "admin/base/search" .}}
				</div>
				<div class="ui unstackable attached table segment">
					<table class="ui unstackable very basic striped table">
						<thead>
							<tr>
								<th>ID</th>
								<th>Name</th>
								<th>Email</th>
								<th>Repos</th>
								<th>Created</th>
								<th>Edit</th>
							</tr>
						</thead>
						<tbody>
							{{range .Users}}
								<tr>
									<td>{{.ID}}</td>
									<td>
										<a class="ui image label {{if .Suspended}}red{{end}}" href="{{AppSubURL}}/{{.Name}}">
											<img src="{{AppendAvatarSize .RelAvatarLink 40}}"> {{.Name}}
										</a>
										<br/>
										{{if .IsVerified}}<i class="admin-badge verified octicon octicon-verified"></i>{{end}}
										{{if .IsBeta}}<i class="admin-badge developer octicon octicon-circuit-board"></i>{{end}}
										{{if .IsStaff}}<i class="admin-badge isstaff octicon octicon-tools"></i>{{end}}
										{{if .GitoteDeveloper}}<i class="admin-badge gitotedeveloper octicon octicon-jersey"></i>{{end}}
									</td>
									<td><span class="text truncate email">{{.Email}}</span></td>
									<td>{{.NumRepos}}</td>
									<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created }}</span></td>
									<td><a href="{{$.Link}}/{{.ID}}">🖊</a></td>
								</tr>
							{{end}}
						</tbody>
					</table>
				</div>

				{{template "admin/base/page" .}}
			</div>
		</div>
	</div>
</div>
{{template "base/footer" .}}
