bookforge/templates/books/show.html

43 lines
1.6 KiB
HTML
Raw Normal View History

2026-01-23 13:56:30 +01:00
{% extends "base.html" %}
{% import "components/typography.html" as typography %}
{% import "components/dropdown.html" as dropdown %}
{% import "components/fields.html" as fields %}
2026-01-28 00:38:24 +01:00
{% import "components/cards.html" as cards %}
2026-01-23 13:56:30 +01:00
{% block main %}
2026-01-28 00:38:24 +01:00
{{ typography::book_heading(book.title, book, show = false) }}
2026-01-23 13:56:30 +01:00
2026-01-28 00:38:24 +01:00
{% call cards::card() %}
<div class="mt-4">
2026-01-30 18:23:54 +01:00
<h5 class="mt-4 fw-bold">{{ t!("book.show.book_details") }}</h5>
{{ fields::field(t!("book.attributes.title"), book.title) }}
{{ fields::field(t!("book.attributes.authors"), book.authors) }}
2026-01-23 13:56:30 +01:00
2026-01-28 00:38:24 +01:00
{% match book.description %}
{% when Some with (description) %}
2026-01-30 18:23:54 +01:00
{{ fields::field(t!("book.attributes.description"), description) }}
2026-01-28 00:38:24 +01:00
{% when None %}
2026-01-30 18:23:54 +01:00
{{ fields::field(t!("book.attributes.description"), "-") }}
2026-01-28 00:38:24 +01:00
{% endmatch %}
2026-01-23 13:56:30 +01:00
2026-01-30 18:23:54 +01:00
<h5 class="mt-50px fw-bold">{{ t!("book.show.user_details") }}</h5>
{{ fields::field(t!("book.attributes.owner"), owner.name) }}
2026-01-28 00:38:24 +01:00
{% match current_holder %}
{% when Some with (current_holder) %}
2026-01-30 18:23:54 +01:00
{{ fields::field(t!("book.attributes.current_holder"), current_holder.name) }}
2026-01-28 00:38:24 +01:00
{% when None %}
2026-01-30 18:23:54 +01:00
{{ fields::field(t!("book.attributes.current_holder"), "-") }}
2026-01-28 00:38:24 +01:00
{% endmatch %}
2026-01-30 18:23:54 +01:00
<h5 class="mt-50px fw-bold">{{ t!("book.show.more_informations") }}</h5>
2026-01-28 00:38:24 +01:00
{% match book.comment %}
{% when Some with (comment) %}
2026-01-30 18:23:54 +01:00
{{ fields::field(t!("book.attributes.comment"), comment) }}
2026-01-28 00:38:24 +01:00
{% when None %}
2026-01-30 18:23:54 +01:00
{{ fields::field(t!("book.attributes.comment"), "-") }}
2026-01-28 00:38:24 +01:00
{% endmatch %}
</div>
{% endcall %}
{% endblock %}