{{template "header.html" .S}}
<h4>Users:</h4>
<table class="table table-hover">
<thead>
<th>username</th>
<th>role</th>
<th>password</th>
<th>last login</th>
</thead>
<tbody>
{{range .Users}}
<tr>
<td>{{.Username}}</td>
<td><form class="row form-inline" method="POST" action="/admin/users/">
<input type="hidden" id="username" name="username" value="{{.Username}}">
<input type="text" id="role" name="role" value="{{.Role}}">
<button type="submit" class="btn btn-primary">Update</button>
</form>
</td>
<input type="password" id="password" name="password" placeholder="password">
<td>{{.LastLogin.Format "2006-01-02"}}</td>
</tr>
{{end}}
</tbody>
</table>
<h4>Add user:</h4>
<form class="form-horizontal" method="POST" action="/admin/users/add/">
<div class="control-group">
<label class="control-label" for="username">Username</label>
<div class="controls">
<input type="text" id="username" name="username">
</div>
<label class="control-label" for="role">Role</label>
<input type="text" id="role" name="role" value="moderator">
<label class="control-label" for="password">Password</label>
<input type="password" id="password" name="password">
<div class="form-actions">
<button type="submit" class="btn btn-primary">Submit</button>
{{template "footer.html" .S}}