Jacek Kowalski
4 hours ago 6b9278a5d57091fce636dbb640b380cfb990db6c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{% set show_url = path(show_path|default('book_show'), {id: book.id}) %}
<div class="tile{% if book.borrowed|default(false) %} tile-borrowed{% endif %}">
    <a class="tile-icon" href="{{ show_url }}" tabindex="-1" aria-hidden="true">
        {% if book.cover %}
            <img class="tile-cover" src="{{ asset('covers/' ~ book.cover ~ '.list.jpg') }}" alt="" loading="lazy"/>
        {% else %}
            <i class="icon icon-photo centered"></i>
        {% endif %}
    </a>
    <div class="tile-content">
        <div class="tile-title"><a href="{{ show_url }}"><strong>{{ book.title }}</strong></a> · {{ book.author }}</div>
        <div class="tile-subtitle">{% if book.edition %}{% trans %}book_list_edition_pre{% endtrans %} {{ book.edition }} {% trans %}book_list_edition_post{% endtrans %} · {% endif %}
            <span class="text-gray">{% if book.publisher %}{{ book.publisher }} · {% endif %}{{ book.publicationLoc }}{% if book.publicationYear %} {{ book.publicationYear }}{% endif %}</span>
        </div>
        <div class="tile-subtitle">
            <span class="label label-rounded label-primary">{{ book.id }}</span>
            {% if book.placement %}<span
                    class="label label-rounded label-secondary">{{ book.placement }}</span>{% endif %}
            {% block status %}
                {% if book.borrowed %}<span
                        class="label label-rounded label-warning">{% trans %}borrow_status_lent{% endtrans %}</span>{% endif %}
            {% endblock %}
            {% for label in book.textLabels %}<span class="label label-rounded">{{ label.label }}</span> {% endfor %}
        </div>
        {% block details %}{% endblock %}
    </div>
    <div class="tile-action">
        {% block actions %}
            <a class="btn btn-link"
               href="{{ path('book_edit', {id: book.id}) }}">{% trans %}book_action_edit{% endtrans %}</a>
            <br/>
            <a class="btn btn-link" href="{{ show_url }}">{% trans %}book_action_more{% endtrans %}</a>
        {% endblock %}
    </div>
</div>