{% block toolbar %}
    {% set icon %}
    <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'routing'}) }}" title="{{ 'Routing'|t }}">
        <img width="20" height="28" alt="{{ 'Routing'|t }}"
             src="data:image/png;base64,{{ collector.icon }}">
        <span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ collector.getRoutesCount }}</span>
    </a>

    {% endset %}

    {% set text %}
    <div class="sf-toolbar-info-piece">
        <b>{{ 'Routes'|t }}</b>
        <span>{{ collector.getRoutesCount }}</span>
    </div>
    {% endset %}

    <div class="sf-toolbar-block">
        <div class="sf-toolbar-icon">{{ icon|default('') }}</div>
        <div class="sf-toolbar-info">{{ text|default('') }}</div>
    </div>
{% endblock %}

{% block panel %}
    <script id="routing" type="text/template">
        <h2 class="panel__title">{{ 'Routing'|t }}</h2>
        <div class="panel__container">
            <table class="table--duo">
                <thead>
                <tr>
                    <th>{{ 'name'|t }}</th>
                    <th>{{ 'path'|t }}</th>
                </tr>
                </thead>
                <tbody>
                <% _.each( data.routing, function( item ){ %>
                    <tr>
                        <td>
                            <%- item.name %>
                        </td>
                        <td>
                            <%- item.path %>
                        </td>
                    </tr>
                <% }); %>
                </tbody>
            </table>
        </div>
    </script>
{% endblock %}
