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

{% block content %}
    <div class="col-md-10 main">
        <h3>Opłaty dodatkowe</h3>

        <div class="table-responsive">
            <table class="table table-striped">
                <colgroup>
                    <col class="col-xs-5">
                    <col class="col-xs-3">
                    <col class="col-xs-2">
                    <col class="col-xs-2">
                </colgroup>
                <thead>
                <tr>
                    <th{% if pagination.isSorted('s.name') %} class="sorted"{% endif %}>
                        {{ knp_pagination_sortable(pagination, 'nazwa', 's.name') }}
                    </th>
                    <th{% if pagination.isSorted('s.value') %} class="sorted"{% endif %}>
                        {{ knp_pagination_sortable(pagination, 'wartość', 'c.value') }}
                    </th>
                    <th{% if pagination.isSorted('s.updatedAt') %} class="sorted"{% endif %}>
                        {{ knp_pagination_sortable(pagination, 'zmodyfikowany', 's.updatedAt') }}
                    </th>
                    <th>opcje</th>
                </tr>
                </thead>
                <tbody>
                {% for setting in pagination %}
                    <tr>
                        <td>{{ setting.name }}</td>
                        <td>{{ setting.value }}</td>
                        <td>{{ setting.updatedAt|date('d.m.Y H:i') }}</td>
                        <td>
                            <a href="{{ path('app_admin.setting.history', { setting: setting.id }) }}">Historia</a> ,
                            <a href="{{ path('app_admin.setting.edit', { setting: setting.id }) }}">Edytuj</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 %}
