{% extends "@templates/"~template~"/view/base.html.twig" %}

{% block content %}
    <div>
        {% for offer in offers %}
            <div style="border:1px solid #ccc;margin:15px;padding:15px;">
                <div>
                {% for category in offer.categories %}
                    <span class="label">{{ category.name }}</span>
                {% endfor %}
                </div>
                <div>{{ offer.content|nl2br }}</div>
                <div>
                    <div>{{ offer.dateExpired|date('d.m.Y') }}</div>
                    <div>{{ offer.location }}</div>
                    <div>{{ offer.price|number_format(2, ',') }}</div>
                </div>
            </div>
        {% endfor %}
    </div>

    {{ knp_pagination_render(offers, '@KnpPaginator/Pagination/sliding.html.twig') }}
{% endblock %}
