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

{% block content %}
    <div class="col-md-10 main">
        <h3>Konsultanci</h3>
        <div class="table-responsive">
            <table class="table table-striped">
                <colgroup>
                    <col class="col-xs-8">
                    <col class="col-xs-2">
                    <col class="col-xs-2">
                </colgroup>
                <thead>
                <tr>
                    <th{% if pagination.isSorted('c.email') %} class="sorted"{% endif %}>
                        {{ knp_pagination_sortable(pagination, 'email', 'c.email') }}
                    </th>
                    <th{% if pagination.isSorted('c.updatedAt') %} class="sorted"{% endif %}>
                        {{ knp_pagination_sortable(pagination, 'zmodyfikowany', 'c.updatedAt') }}
                    </th>
                    <th>opcje</th>
                </tr>
                </thead>
                <tbody>
                {% for consultant in pagination %}
                    <tr>
                        <td>{{ consultant.email }}</td>
                        <td>{{ consultant.updatedAt|date('d.m.Y H:i') }}</td>
                        <td>
                            <a href="{{ path('app_admin.consultant.history', { consultant: consultant.id }) }}">Historia</a> ,
                            <a href="{{ path('app_admin.consultant.edit', { consultant: consultant.id }) }}">Edytuj</a> ,
                            <a href="{{ path('app_admin.consultant.remove', { consultant: consultant.id }) }}">Usuń</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 %}