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

{% block title %}
    Webservice Languages
{% endblock %}

{% block body %}
    <h2 class="pull-left">Webservice Languages</h2>

    <a href="{{ path('_admin_backend_webservice_language_insertAllLanguagesCodes') }}" class="btn btn-danger pull-right"
       style="margin-top: 25px;">
        fill all
    </a>

    <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>Name</th>
                    <th>Actions</th>
                </tr>
                </thead>
                <tbody>
                {% for entity in pagination %}
                    <tr>
                        <td class="infinitely-tooltip">
                            <span class="cutstring"><a class="tt" data-toggle="tooltip" data-placement="top"
                                                       data-html="1" title="Id: {{ entity.id|e }}"
                                                       href="{{ path('_admin_backend_webservice_language_show', { 'languageCode': entity.id }) }}">{{ entity.id }}</a></span>
                        </td>
                        <td>{{ entity.Name }}</td>
                        <td>
                            <a class="btn btn-success btn-mini"
                               href="{{ path('_admin_backend_webservice_language_show', { 'languageCode': entity.id }) }}">
                                show
                            </a>&nbsp;
                            <a class="btn btn-danger"
                               href="{{ path('_admin_backend_webservice_language_edit', { 'languageCode': entity.id }) }}">
                                edit
                            </a></td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>

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

    </div>

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

{% endblock %}