{{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">
					Organization Manage Panel (Total: {{ .Total}}) 🏢
				</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>Teams</th>
								<th>Members</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" href="{{.HomeLink}}">
											<img src="{{AppendAvatarSize .RelAvatarLink 40}}"> {{.Name}}
										</a>
									</td>
									<td>{{.NumTeams}}</td>
									<td>{{.NumMembers}}</td>
									<td>{{.NumRepos}}</td>
									<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
									<td><a href="{{AppSubURL}}/org/{{.Name}}/settings">🖊</i></a></td>
								</tr>
							{{end}}
						</tbody>
					</table>
				</div>

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