{% extends "base.html" %} {% import "components/typography.html" as typography %} {% import "components/dropdown.html" as dropdown %} {% import "components/cards.html" as cards %} {% block main %} {% call typography::heading(t!("book.index.title")) %} {{ t!("common.download") }} (csv) {% endcall %} {% 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() %} {% if books_with_user.is_empty() %}

{{ t!("common.no_result") }}

{{ t!("book.new.button_short") }}
{% else %} {% for book_user in books_with_user %} {% endfor %}
# {{ t!("book.attributes.title") }} {{ t!("book.attributes.authors") }} {{ t!("book.attributes.owner") }} {{ t!("book.attributes.current_holder") }} {{ t!("common.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, t!("common.actions"), "books") }}
{% if total_page > 1 %}
{% endif %} {% endif %} {% endcall %} {% endblock %}