You are here

theme.html.twig in Devel 8.3

{% block toolbar %}
    {% set negotiator %}
    <a href="{{ idelink(collector.themeNegotiator.class.file, collector.themeNegotiator.class.line)|raw }}">{{ abbr(collector.themeNegotiator.class.class)|raw }}
        ::{{ collector.themeNegotiator.class.method }}</a>
    {% endset %}
    {% set time = collector.templatecount ? '%0.0f ms'|format(collector.time) : 'n/a' %}
    {% set icon %}
    <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'theme'}) }}" title="{{ 'Theme'|t }}">
        <img width="20" height="28" alt="{{ 'Theme'|t }}"
             src="data:image/png;base64,{{ collector.icon }}"/>
        <span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ collector.activeTheme.name }}</span>
    </a>
    {% endset %}
    {% set text %}

    <div class="sf-toolbar-info-piece">
        <b>{{ 'Name'|t }}</b>
        <span>{{ collector.activeTheme.name }}</span>
    </div>
    <div class="sf-toolbar-info-piece">
        <b>{{ 'Engine'|t }}</b>
        <span>{{ collector.activeTheme.engine }}</span>
    </div>
    <div class="sf-toolbar-info-piece">
        <b>{{ 'Negotiator'|t }}</b>
        <span>{{ negotiator }}</span>
    </div>
    <div class="sf-toolbar-info-piece">
        <b>{{ 'Render Time'|t }}</b>
        <span>{{ time }}</span>
    </div>
    <div class="sf-toolbar-info-piece">
        <b>{{ 'Template Calls'|t }}</b>
        <span>{{ collector.templatecount }}</span>
    </div>
    <div class="sf-toolbar-info-piece">
        <b>{{ 'Block Calls'|t }}</b>
        <span>{{ collector.blockcount }}</span>
    </div>
    <div class="sf-toolbar-info-piece">
        <b>{{ 'Macro Calls'|t }}</b>
        <span>{{ collector.macrocount }}</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="theme" type="text/template">
        <h2 class="panel__title">{{ 'Theme'|t }}</h2>
        <div class="panel__container">
            <table class="table--fixed">
                <tr>
                    <th>{{ 'Name'|t }}</th>
                    <td><%- data.activeTheme.name %> (<a href="/admin/appearance/settings/bartik">{{ 'Edit'|t }})</a>
                    </td>
                </tr>
                <tr>
                    <th>{{ 'Engine'|t }}</th>
                    <td><%- data.activeTheme.engine %></td>
                </tr>
                <tr>
                    <th>{{ 'Base theme'|t }}</th>
                    <td><%- data.activeTheme.extension.base_theme %></td>
                </tr>
                <tr>
                    <th>{{ 'Regions'|t }}</th>
                    <td><%= Drupal.webprofiler.helpers.frm(data.activeTheme.regions) %></td>
                </tr>
                <tr>
                    <th>{{ 'Libraries'|t }}</th>
                    <td><%= Drupal.webprofiler.helpers.frm(data.activeTheme.libraries) %></td>
                </tr>
                <tr>
                    <th>{{ 'Style sheets removed'|t }}</th>
                    <td><%= Drupal.webprofiler.helpers.frm(data.activeTheme.styleSheetsRemove) %></td>
                </tr>
                <tr>
                    <th>{{ 'Path'|t }}</th>
                    <td><%- data.activeTheme.path %></td>
                </tr>
                <tr>
                    <th>{{ 'Negotiator'|t }}</th>
                    <td><%= Drupal.webprofiler.helpers.classLink(data.negotiator.class) %></td>
                </tr>
            </table>
        </div>

        <div class="panel__container">
            <ul class="list--inline">
                <li><b>{{ 'Twig statistics'|t }}</b></li>
            </ul>

            <table class="table--fixed">
                <tr>
                    <th>{{ 'Total Render Time'|t }}</th>
                    <td><%- Drupal.webprofiler.helpers.printTime(data.twig.render_time) %></td>
                </tr>
                <tr>
                    <th>{{ 'Template Calls'|t }}</th>
                    <td><%- data.twig.template_count %></td>
                </tr>
                <tr>
                    <th>{{ 'Block Calls'|t }}</th>
                    <td><%- data.twig.block_count %></td>
                </tr>
                <tr>
                    <th>{{ 'Macro Calls'|t }}</th>
                    <td><%- data.twig.macro_count %></td>
                </tr>
            </table>
        </div>

        <div class="panel__container">
            <ul class="list--inline">
                <li><b>{{ 'Twig rendered templates'|t }}</b></li>
            </ul>

            <table class="table--fixed">
                <thead>
                <tr>
                    <th>{{ 'template'|t }}</th>
                    <th>{{ 'count'|t }}</th>
                </tr>
                </thead>
                <% _.each( data.twig.templates, function( item, key ){ %>
                <tr>
                    <th><%- key %></th>
                    <td><%- item %></td>
                </tr>
                <% }); %>
            </table>
        </div>

        <div class="panel__container">
            <ul class="list--inline">
                <li><b>{{ 'Twig callgraph'|t }}</b></li>
            </ul>

            <%= data.twig.callgraph %>
        </div>
    </script>
{% endblock %}

File

webprofiler/templates/Collector/theme.html.twig
View source
  1. {% block toolbar %}
  2. {% set negotiator %}
  3. <a href="{{ idelink(collector.themeNegotiator.class.file, collector.themeNegotiator.class.line)|raw }}">{{ abbr(collector.themeNegotiator.class.class)|raw }}
  4. ::{{ collector.themeNegotiator.class.method }}</a>
  5. {% endset %}
  6. {% set time = collector.templatecount ? '%0.0f ms'|format(collector.time) : 'n/a' %}
  7. {% set icon %}
  8. <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'theme'}) }}" title="{{ 'Theme'|t }}">
  9. <img width="20" height="28" alt="{{ 'Theme'|t }}"
  10. src="data:image/png;base64,{{ collector.icon }}"/>
  11. <span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ collector.activeTheme.name }}</span>
  12. </a>
  13. {% endset %}
  14. {% set text %}
  15. <div class="sf-toolbar-info-piece">
  16. <b>{{ 'Name'|t }}</b>
  17. <span>{{ collector.activeTheme.name }}</span>
  18. </div>
  19. <div class="sf-toolbar-info-piece">
  20. <b>{{ 'Engine'|t }}</b>
  21. <span>{{ collector.activeTheme.engine }}</span>
  22. </div>
  23. <div class="sf-toolbar-info-piece">
  24. <b>{{ 'Negotiator'|t }}</b>
  25. <span>{{ negotiator }}</span>
  26. </div>
  27. <div class="sf-toolbar-info-piece">
  28. <b>{{ 'Render Time'|t }}</b>
  29. <span>{{ time }}</span>
  30. </div>
  31. <div class="sf-toolbar-info-piece">
  32. <b>{{ 'Template Calls'|t }}</b>
  33. <span>{{ collector.templatecount }}</span>
  34. </div>
  35. <div class="sf-toolbar-info-piece">
  36. <b>{{ 'Block Calls'|t }}</b>
  37. <span>{{ collector.blockcount }}</span>
  38. </div>
  39. <div class="sf-toolbar-info-piece">
  40. <b>{{ 'Macro Calls'|t }}</b>
  41. <span>{{ collector.macrocount }}</span>
  42. </div>
  43. {% endset %}
  44. <div class="sf-toolbar-block">
  45. <div class="sf-toolbar-icon">{{ icon|default('') }}</div>
  46. <div class="sf-toolbar-info">{{ text|default('') }}</div>
  47. </div>
  48. {% endblock %}
  49. {% block panel %}
  50. <script id="theme" type="text/template">
  51. <h2 class="panel__title">{{ 'Theme'|t }}</h2>
  52. <div class="panel__container">
  53. <table class="table--fixed">
  54. <tr>
  55. <th>{{ 'Name'|t }}</th>
  56. <td><%- data.activeTheme.name %> (<a href="/admin/appearance/settings/bartik">{{ 'Edit'|t }})</a>
  57. </td>
  58. </tr>
  59. <tr>
  60. <th>{{ 'Engine'|t }}</th>
  61. <td><%- data.activeTheme.engine %></td>
  62. </tr>
  63. <tr>
  64. <th>{{ 'Base theme'|t }}</th>
  65. <td><%- data.activeTheme.extension.base_theme %></td>
  66. </tr>
  67. <tr>
  68. <th>{{ 'Regions'|t }}</th>
  69. <td><%= Drupal.webprofiler.helpers.frm(data.activeTheme.regions) %></td>
  70. </tr>
  71. <tr>
  72. <th>{{ 'Libraries'|t }}</th>
  73. <td><%= Drupal.webprofiler.helpers.frm(data.activeTheme.libraries) %></td>
  74. </tr>
  75. <tr>
  76. <th>{{ 'Style sheets removed'|t }}</th>
  77. <td><%= Drupal.webprofiler.helpers.frm(data.activeTheme.styleSheetsRemove) %></td>
  78. </tr>
  79. <tr>
  80. <th>{{ 'Path'|t }}</th>
  81. <td><%- data.activeTheme.path %></td>
  82. </tr>
  83. <tr>
  84. <th>{{ 'Negotiator'|t }}</th>
  85. <td><%= Drupal.webprofiler.helpers.classLink(data.negotiator.class) %></td>
  86. </tr>
  87. </table>
  88. </div>
  89. <div class="panel__container">
  90. <ul class="list--inline">
  91. <li><b>{{ 'Twig statistics'|t }}</b></li>
  92. </ul>
  93. <table class="table--fixed">
  94. <tr>
  95. <th>{{ 'Total Render Time'|t }}</th>
  96. <td><%- Drupal.webprofiler.helpers.printTime(data.twig.render_time) %></td>
  97. </tr>
  98. <tr>
  99. <th>{{ 'Template Calls'|t }}</th>
  100. <td><%- data.twig.template_count %></td>
  101. </tr>
  102. <tr>
  103. <th>{{ 'Block Calls'|t }}</th>
  104. <td><%- data.twig.block_count %></td>
  105. </tr>
  106. <tr>
  107. <th>{{ 'Macro Calls'|t }}</th>
  108. <td><%- data.twig.macro_count %></td>
  109. </tr>
  110. </table>
  111. </div>
  112. <div class="panel__container">
  113. <ul class="list--inline">
  114. <li><b>{{ 'Twig rendered templates'|t }}</b></li>
  115. </ul>
  116. <table class="table--fixed">
  117. <thead>
  118. <tr>
  119. <th>{{ 'template'|t }}</th>
  120. <th>{{ 'count'|t }}</th>
  121. </tr>
  122. </thead>
  123. <% _.each( data.twig.templates, function( item, key ){ %>
  124. <tr>
  125. <th><%- key %></th>
  126. <td><%- item %></td>
  127. </tr>
  128. <% }); %>
  129. </table>
  130. </div>
  131. <div class="panel__container">
  132. <ul class="list--inline">
  133. <li><b>{{ 'Twig callgraph'|t }}</b></li>
  134. </ul>
  135. <%= data.twig.callgraph %>
  136. </div>
  137. </script>
  138. {% endblock %}