routing.html.twig 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {% block toolbar %}
  2. {% set icon %}
  3. <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'routing'}) }}" title="{{ 'Routing'|t }}">
  4. <img width="20" height="28" alt="{{ 'Routing'|t }}"
  5. src="data:image/png;base64,{{ collector.icon }}">
  6. <span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ collector.getRoutesCount }}</span>
  7. </a>
  8. {% endset %}
  9. {% set text %}
  10. <div class="sf-toolbar-info-piece">
  11. <b>{{ 'Routes'|t }}</b>
  12. <span>{{ collector.getRoutesCount }}</span>
  13. </div>
  14. {% endset %}
  15. <div class="sf-toolbar-block">
  16. <div class="sf-toolbar-icon">{{ icon|default('') }}</div>
  17. <div class="sf-toolbar-info">{{ text|default('') }}</div>
  18. </div>
  19. {% endblock %}
  20. {% block panel %}
  21. <script id="routing" type="text/template">
  22. <h2 class="panel__title">{{ 'Routing'|t }}</h2>
  23. <div class="panel__container">
  24. <table class="table--duo">
  25. <thead>
  26. <tr>
  27. <th>{{ 'name'|t }}</th>
  28. <th>{{ 'path'|t }}</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. <% _.each( data.routing, function( item ){ %>
  33. <tr>
  34. <td>
  35. <%- item.name %>
  36. </td>
  37. <td>
  38. <%- item.path %>
  39. </td>
  40. </tr>
  41. <% }); %>
  42. </tbody>
  43. </table>
  44. </div>
  45. </script>
  46. {% endblock %}