{% extends "SsoBackendBundle:token:base.html.twig" %}
{% form_theme filterForm ':Forms:bootstrap.layout.html.twig' %}


{% block title %}
    Webservice Timezones
{% endblock %}

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

    <a href="{{ path('_admin_backend_webservice_timezone_insertAllTimezoneCodes') }}" 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" action="{{ path('_admin_backend_webservice_timezone') }}"
                      method="get" {{ form_enctype(filterForm) }}>
                    {{ form_widget(filterForm) }}
                    <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">
            <table class="table table-striped table-bordered table-condensed">
                <thead>
                <tr>
                    <th>Id</th>
                    <th>Name</th>
                    <th>Latitude</th>
                    <th>Longitude</th>
                    <th>CountryCode</th>
                    <th>Comments</th>
                </tr>
                </thead>
                <tbody>
                {% for entity in entities %}
                    <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_timezone_show', { 'countryId': entity.id }) }}">id</a></span>
                        </td>
                        <td>{{ entity.Name }}</td>
                        <td>{{ entity.Latitude }}</td>
                        <td>{{ entity.Longitude }}</td>
                        <td>{{ entity.CountryCode }}</td>
                        <td>{{ entity.Comments }}</td>

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

        <div class="col-md-12 col-ld-12">
            {{ pagerHtml|raw }}
        </div>

    </div>

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

{% endblock %}