{% extends "base.html" %} {% import "components/typography.html" as typography %} {% import "components/dropdown.html" as dropdown %} {% import "components/cards.html" as cards %} {% block main %} {{ typography::heading("All books") }} {% call cards::card() %}
{% match query.title %} {% when Some with (value) %} {% when None %} {% endmatch %}
{% match query.authors %} {% when Some with (value) %} {% when None %} {% endmatch %}
{% endcall %} {% call cards::card() %} {% for book_user in books_with_user %} {% endfor %}
# Name Author(s) Owner Current Holder Actions
{{ book_user.book.id }} {{ book_user.book.title }} {{ book_user.book.authors }} {{ book_user.owner.name }} {% match book_user.current_holder %} {% when Some with (current_holder) %} {{ current_holder.name }} {% when None %} - {% endmatch %} {{ dropdown::crud_dropdown_button(book_user.book, "Actions", "books") }}
{% if total_page > 1 %}
{% endif %} {% endcall %} {% endblock %}