39 lines
944 B
HTML
39 lines
944 B
HTML
{% extends "base.html" %}
|
|
{% import "components/typography.html" as typography %}
|
|
|
|
{% block main %}
|
|
{{ typography::heading("All users") }}
|
|
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">#</th>
|
|
<th scope="col">Name</th>
|
|
<th scope="col">Nombre de livres</th>
|
|
<th scope="col">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for user in users %}
|
|
<tr>
|
|
<th scope="row">{{ user.id }}</th>
|
|
<td>{{ user.name }}</td>
|
|
<td>10</td>
|
|
<td>
|
|
<form method="post" action="/users/{{ user.id }}">
|
|
<input value="Delete" type="submit" class="btn btn-danger btn-sm">
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<form action="/users" method="post">
|
|
<label class="form-label">Name</label>
|
|
<input type="text" name="name" class="form-control">
|
|
|
|
<input type="submit" value="Create user" class="btn btn-success mt-3">
|
|
</form>
|
|
|
|
{% endblock %} |