{% extends 'AppBundle:Admin/Port:layout.html.twig' %}

{% block content %}
    <div class="col-md-10 main">
        <h3>Porty: usunięte</h3>
        <div class="table-responsive">
            <table class="table table-striped">
                <colgroup>
                    <col class="col-xs-2">
                    <col class="col-xs-6">
                    <col class="col-xs-2">
                    <col class="col-xs-2">
                </colgroup>
                <thead>
                <tr>
                    <th{% if pagination.isSorted('p.name') %} class="sorted"{% endif %}>
                        {{ knp_pagination_sortable(pagination, 'nazwa', 'p.name') }}
                    </th>
                    <th{% if pagination.isSorted('p.country') %} class="sorted"{% endif %}>
                        {{ knp_pagination_sortable(pagination, 'kraj', 'p.country') }}
                    </th>
                    <th{% if pagination.isSorted('p.updatedAt') %} class="sorted"{% endif %}>
                        {{ knp_pagination_sortable(pagination, 'usunięty', 'p.updatedAt') }}
                    </th>
                    <th>opcje</th>
                </tr>
                </thead>
                <tbody>
                {% for port in pagination %}
                    <tr>
                        <td>{{ port.name }}</td>
                        <td>{{ port.country }}</td>
                        <td>{{ port.updatedAt|date('d.m.Y H:i') }}</td>
                        <td>
                            <a href="{{ path('app_admin.port.history', { port: port.id }) }}">Historia</a>
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>

            <div class="text-center">
                {{ knp_pagination_render(pagination, 'KnpPaginatorBundle:Pagination:twitter_bootstrap_v3_pagination.html.twig') }}
            </div>
        </div>
    </div>
{% endblock %}