{% extends "SsoBackendBundle:token:base.html.twig" %}

{% block title %}
    Sso Attribute Group
{% endblock %}

{% block body %}
    <h2>Attribute Group</h2>
    <div class="row">
        <div class="col-md-12 col-ld-12">
            <a class="btn btn-primary dropdown-toggle" data-toggle="collapse" data-target="#filters">
                show filter
                <span class="caret"></span>
            </a>
        </div>
        <div class="col-md-12 col-ld-12">
            <div id="filters" class="collapse">
                <form class="well" method="get" action="">
                    {{ form_rest(form) }}
                    <p>
                        <button class="btn btn-primary" type="submit" name="filter_action"
                                value="filter">{% trans %}btn.filter{% endtrans %}</button>
                        <button id="reset" class="btn btn-danger" type="submit" name="filter_action"
                                value="reset">{% trans %}btn.reset{% endtrans %}</button>
                    </p>
                </form>
            </div>
        </div>
    </div>
    <hr/>
    <div class="row">
        <div class="col-md-12 col-ld-12">
            <div style="font-size: 20px;margin-bottom: 20px;" class="pull-right">
                <span class="label label-success label-as-badge">count: {{ pagination.getTotalItemCount }}</span>
            </div>
            <table class="table table-striped table-bordered table-condensed">
                <thead>
                <tr>
                    <th>Id</th>
                    <th {% if pagination.isSorted('a.name') %} class="sorted"{% endif %}>{{ knp_pagination_sortable(pagination, 'Name', 'a.name') }}</th>
                    <th>Actions</th>
                </tr>
                </thead>
                <tbody>
                {% for entity in pagination %}
                    <tr>
                        <td class="infinitely-tooltip">
                            {{ entity.id }}
                        </td>
                        <td class="infinitely-tooltip">
                            {{ entity.name }}
                        </td>
                        <td>
                            <a class="btn btn-success btn-mini"
                               href="{{ path('_admin_backend_webservice_attribute_group_show', { 'groupId': entity.id }) }}">
                                show
                            </a>&nbsp;
                            <a class="btn btn-danger"
                               href="{{ path('_admin_backend_webservice_attribute_group_edit', { 'groupId': entity.id }) }}">
                                edit
                            </a>
                            <a class="btn btn-danger"
                               href="{{ path('_admin_backend_webservice_attribute_group_delete', { 'groupId': entity.id }) }}">
                                delete
                            </a>

                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>

        <div class="col-md-12 col-ld-12">
            <div class="navigation">
                {{ knp_pagination_render(pagination) }}
            </div>
        </div>

        <div class="col-md-6 col-ld-6">
            <a class="btn btn-success likepaginator" href="{{ path('_admin_backend_webservice_attribute_group_new') }}">
                New Attribute Group
            </a>
        </div>

    </div>

    <script>
        $(function () {
            $(".tt").tooltip();
        });
    </script>

{% endblock %}