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
{% extends 'base.html.twig' %}
 
{% block title %}{% trans %}borrow_list_title{% endtrans %}{% endblock %}
 
{% block content %}
    <div class="page_content">
        <h2>{% trans %}borrow_list_title{% endtrans %}</h2>
 
        {% if pagination.getTotalItemCount() == 0 %}
            <p>{% trans %}borrow_list_empty{% endtrans %}</p>
        {% endif %}
    </div>
 
    {% if pagination.getTotalItemCount() > 0 %}
        <div class="results">
            {% for borrow in pagination %}
                {% embed 'book/_tile.html.twig' with {book: borrow.book} %}
                    {% block status %}
                        <span class="label label-rounded label-warning">{{ 'borrow_lent_to'|trans({'%who%': borrow.who, '%date%': borrow.at|date('Y-m-d')}) }}</span>
                    {% endblock %}
                {% endembed %}
            {% endfor %}
 
            {{ knp_pagination_render(pagination) }}
        </div>
    {% endif %}
{% endblock %}