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

{% block title %}{{ parent() }} - List{% endblock %}

{% block body %}
    <h1>Type Mapping</h1>
    <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" action="{{ path('_admin_backend_type_mapping_index') }}" method="get">
                    {{ form_widget(form) }}
                    <p>
                        <button class="btn btn-success" type="submit" name="filter_action" value="filter">filter
                        </button>
                        <button class="btn btn-danger" type="submit" name="filter_action" value="reset">reset</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>Identifier</th>
                    <th>Type Name</th>
                    <th>Type Id</th>
                    <th>Actions</th>
                </tr>
                </thead>
                <tbody>
                {% for entity in pagination %}
                    <tr>
                        <td>{{ entity.Identifier }}</td>
                        <td>{{ entity.type.Name }}</td>
                        <td>{{ entity.type.Id }}</td>
                        <td>
                            <a class="btn btn-success btn-mini"
                               href="{{ path('_admin_backend_type_mapping_show', { 'identifier': entity.Identifier }) }}">
                                show
                            </a>&nbsp;
                        </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_type_mapping_new') }}">
                Add Type Mapping
            </a>
        </div>

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

{% endblock %}
