udemy-go-web-2/cmd/web/templates/all-users.page.gohtml
2024-08-23 21:07:13 +02:00

29 lines
599 B
Plaintext

{{ template "base". }}
{{ define "title" }}
All Users
{{ end }}
{{ define "content" }}
<h2 class="mt-5">All Admin users</h2>
<hr>
<div class="float-end">
<a class="btn btn-outline-secondary" href="/admin/all-users/0">Add User</a>
</div>
<div class="clearfix"></div>
<table id="user-table" class="table table-striped">
<thead>
<tr>
<th>User</th>
<th>Email</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
{{ end }}
{{ define "js" }}
<script type="module">
import {showUsers} from "/static/js/users.js"
showUsers({{.API}});
</script>
{{ end }}