bookforge/templates/users/index.html

38 lines
1.3 KiB
HTML
Raw Normal View History

2026-01-23 13:56:30 +01:00
{% extends "base.html" %}
{% import "components/typography.html" as typography %}
2026-01-29 23:52:55 +01:00
{% import "components/dropdown.html" as dropdown %}
2026-01-28 00:38:24 +01:00
{% import "components/cards.html" as cards %}
2026-01-29 23:52:55 +01:00
{% import "components/inputs.html" as form_helpers %}
2026-01-23 13:56:30 +01:00
{% block main %}
2026-01-29 23:52:55 +01:00
{% call typography::heading("All users") %}
<a class="btn-success btn" href="/users/new">Add User</a>
{% endcall %}
2026-01-23 13:56:30 +01:00
2026-01-28 00:38:24 +01:00
{% 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>
2026-01-29 23:52:55 +01:00
{% for user_information in user_with_books_number %}
2026-01-29 23:59:44 +01:00
<tr class="align-middle">
2026-01-29 23:52:55 +01:00
<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>
2026-01-28 00:38:24 +01:00
<td>
2026-01-29 23:52:55 +01:00
{{ dropdown::crud_dropdown_button(user_information.user, "Actions", "users", show = false) }}
2026-01-28 00:38:24 +01:00
</td>
</tr>
{% endfor %}
</tbody>
2026-01-29 23:52:55 +01:00
</table>
2026-01-28 00:38:24 +01:00
{% endcall %}
{% endblock %}