2026-01-29 23:59:44 +01:00

39 lines
1.3 KiB
HTML

{% extends "base.html" %}
{% import "components/typography.html" as typography %}
{% import "components/dropdown.html" as dropdown %}
{% import "components/cards.html" as cards %}
{% import "components/inputs.html" as form_helpers %}
{% block main %}
{% call typography::heading("All users") %}
<a class="btn-success btn" href="/users/new">Add User</a>
{% endcall %}
{% call cards::card() %}
<table class="table table-hover">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Owner book</th>
<th scope="col">Borrowed book</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
{% for user_information in user_with_books_number %}
<tr class="align-middle">
<th scope="row">{{ user_information.user.id }}</th>
<td>{{ user_information.user.name }}</td>
<td>{{ user_information.owner_book_number }}</td>
<td>{{ user_information.borrowed_book_number }}</td>
<td>
{{ dropdown::crud_dropdown_button(user_information.user, "Actions", "users", show = false) }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endcall %}
{% endblock %}