statping/source/tmpl/users.html

85 lines
3.2 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/base.css">
<title>Statup | Users</title>
</head>
<body>
<div class="container col-md-7 col-sm-12 mt-md-5 bg-light">
{{template "nav"}}
<div class="col-12">
<h3>Users</h3>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Username</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
{{range .}}
<tr>
<td>{{.Username}}</td>
<td class="text-right">
<div class="btn-group">
<a href="/users/{{.Id}}/delete" class="btn btn-danger">Delete</a>
</div>
</td>
</tr>
{{end}}
</tbody>
</table>
<h3>Create User</h3>
<form action="/users" method="POST">
<div class="form-group row">
<label for="inputEmail3" class="col-sm-4 col-form-label">Username</label>
<div class="col-sm-8">
<input type="text" name="username" class="form-control" id="inputEmail3" placeholder="Username">
</div>
</div>
<div class="form-group row">
<label for="inputEmail3" class="col-sm-4 col-form-label">Email Address</label>
<div class="col-sm-8">
<input type="text" name="email" class="form-control" id="inputEmail3" placeholder="user@domain.com">
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-4 col-form-label">Password</label>
<div class="col-sm-8">
<input type="password" name="password" class="form-control" id="inputPassword3" placeholder="Password">
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-4 col-form-label">Confirm Password</label>
<div class="col-sm-8">
<input type="password" name="password_confirm" class="form-control" id="inputPassword3" placeholder="Confirm Password">
</div>
</div>
<div class="form-group row">
<div class="col-sm-8">
<button type="submit" class="btn btn-primary">Create User</button>
</div>
</div>
</form>
</div>
</div>
{{template "footer"}}
<script src="/js/jquery-3.3.1.slim.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>