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



{% block title %}
    Object Values
{% endblock %}

{% block body %}
    <h2>Object Values</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>Object Name</th>
                    <th>AttributeGroup</th>
                    <th>Attribute Name</th>
                    <th>Attribute Value</th>
                    <th>Language</th>
                    <th>Actions</th>
                </tr>
                </thead>
                <tbody>
                {% for entity in pagination %}
                    <tr>
                        <td class="infinitely-tooltip">
                            {{ entity.id }}
                        </td>
                        <td class="infinitely-tooltip">
                            {{ entity.object.name }}
                        </td>
                        <td class="infinitely-tooltip">
                            {{ entity.attribute.attributeGroup.name }}
                        </td>
                        <td class="infinitely-tooltip">
                            {{ entity.attribute.name }}
                        </td>

                        <td class="infinitely-tooltip">
                            {{ entity.value }}
                        </td>
                        <td class="infinitely-tooltip">
                            {{ entity.language.name }}
                        </td>
                        <td>

                            <a class="btn btn-danger"
                               href="{{ path('_admin_backend_webservice_object_values_edit', { 'valueId': entity.id }) }}">
                                edit
                            </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-12 col-ld-12">
            <a class="btn btn-primary likepaginator"
               href="{{ path('_admin_backend_webservice_object_values_select_object') }}">
                Create New Object Value
            </a>
        </div>
    </div>

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

{% endblock %}