You are here

extensions.html.twig in Devel 8.3

{% block toolbar %}
    {% set icon %}
    <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'drupal_extension'}) }}"
       title="{{ 'Extensions'|t }}">
        <img width="20" height="28" alt="{{ 'Extensions'|t }}"
             src="data:image/png;base64,{{ collector.icon }}"/>
        <span class="sf-toolbar-info-piece-additional sf-toolbar-status{% if 150 < collector.countExtensions %} sf-toolbar-status-yellow{% endif %}">{{ collector.getExtensionsCount }}</span>
    </a>
    {% endset %}
    {% set text %}
    <div class="sf-toolbar-info-piece">
        <b>{{ 'Active Modules'|t }}</b>
        <span>{{ collector.getModulesCount }}</span>
    </div>
    <div class="sf-toolbar-info-piece">
        <b>{{ 'Active Themes'|t }}</b>
        <span>{{ collector.getThemesCount }}</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="drupal_extension" type="text/template">
        <h2 class="panel__title">{{ 'Extensions'|t }}</h2>
        <div class="tabs">
            <input class="tabs__radio" type="radio" id="modules" name="tabs" checked/>
            <input class="tabs__radio" type="radio" id="themes" name="tabs"/>
            <ul class="tabs__tabs list--inline">
                <li><label class="tabs__label" for="modules">{{ 'Modules'|t }}</label></li>
                <li><label class="tabs__label" for="themes">{{ 'Themes'|t }}</label></li>
            </ul>

            <div class="tabs__panels">
                <div class="tabs__panel">
                    <div class="panel__container">
                        <table class="table--compact">
                            <thead>
                            <tr>
                                <th>{{ 'Name'|t }}</th>
                                <th>{{ 'Path'|t }}</th>
                                <th>{{ 'Info file'|t }}</th>
                            </tr>
                            </thead>
                            <tbody>
                            <% _.each( data.drupal_extension.modules, function( value, key ){ %>
                            <% if(value.public_type == 'module') { %>
                            <tr>
                                <td><%- key %></td>
                                <td><%- value.public_path %></td>
                                <td><%= Drupal.webprofiler.helpers.classLink({"file" :
                                    data.drupal_extension.installation_path + value.public_pathname, "class":
                                    value.public_pathname, "line": 0}) %>
                                </td>
                            </tr>
                            <% } %>
                            <% }); %>
                            </tbody>
                        </table>
                    </div>
                </div>

                <div class="tabs__panel">
                    <div class="panel__container">
                        <table class="table--compact">
                            <thead>
                            <tr>
                                <th>{{ 'Name'|t }}</th>
                                <th>{{ 'Path'|t }}</th>
                                <th>{{ 'Info file'|t }}</th>
                            </tr>
                            </thead>
                            <tbody>
                            <% _.each( data.drupal_extension.themes, function( value, key ){ %>
                            <tr>
                                <td><%- key %></td>
                                <td><%- value.public_path %></td>
                                <td><%= Drupal.webprofiler.helpers.classLink({"file" :
                                    data.drupal_extension.installation_path + value.public_pathname, "class":
                                    value.public_pathname, "line": 0}) %>
                                </td>
                            </tr>
                            <% }); %>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </script>
{% endblock %}

File

webprofiler/templates/Collector/extensions.html.twig
View source
  1. {% block toolbar %}
  2. {% set icon %}
  3. <a href="{{ url("webprofiler.dashboard", {profile: token}, {fragment: 'drupal_extension'}) }}"
  4. title="{{ 'Extensions'|t }}">
  5. <img width="20" height="28" alt="{{ 'Extensions'|t }}"
  6. src="data:image/png;base64,{{ collector.icon }}"/>
  7. <span class="sf-toolbar-info-piece-additional sf-toolbar-status{% if 150 < collector.countExtensions %} sf-toolbar-status-yellow{% endif %}">{{ collector.getExtensionsCount }}</span>
  8. </a>
  9. {% endset %}
  10. {% set text %}
  11. <div class="sf-toolbar-info-piece">
  12. <b>{{ 'Active Modules'|t }}</b>
  13. <span>{{ collector.getModulesCount }}</span>
  14. </div>
  15. <div class="sf-toolbar-info-piece">
  16. <b>{{ 'Active Themes'|t }}</b>
  17. <span>{{ collector.getThemesCount }}</span>
  18. </div>
  19. {% endset %}
  20. <div class="sf-toolbar-block">
  21. <div class="sf-toolbar-icon">{{ icon|default('') }}</div>
  22. <div class="sf-toolbar-info">{{ text|default('') }}</div>
  23. </div>
  24. {% endblock %}
  25. {% block panel %}
  26. <script id="drupal_extension" type="text/template">
  27. <h2 class="panel__title">{{ 'Extensions'|t }}</h2>
  28. <div class="tabs">
  29. <input class="tabs__radio" type="radio" id="modules" name="tabs" checked/>
  30. <input class="tabs__radio" type="radio" id="themes" name="tabs"/>
  31. <ul class="tabs__tabs list--inline">
  32. <li><label class="tabs__label" for="modules">{{ 'Modules'|t }}</label></li>
  33. <li><label class="tabs__label" for="themes">{{ 'Themes'|t }}</label></li>
  34. </ul>
  35. <div class="tabs__panels">
  36. <div class="tabs__panel">
  37. <div class="panel__container">
  38. <table class="table--compact">
  39. <thead>
  40. <tr>
  41. <th>{{ 'Name'|t }}</th>
  42. <th>{{ 'Path'|t }}</th>
  43. <th>{{ 'Info file'|t }}</th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <% _.each( data.drupal_extension.modules, function( value, key ){ %>
  48. <% if(value.public_type == 'module') { %>
  49. <tr>
  50. <td><%- key %></td>
  51. <td><%- value.public_path %></td>
  52. <td><%= Drupal.webprofiler.helpers.classLink({"file" :
  53. data.drupal_extension.installation_path + value.public_pathname, "class":
  54. value.public_pathname, "line": 0}) %>
  55. </td>
  56. </tr>
  57. <% } %>
  58. <% }); %>
  59. </tbody>
  60. </table>
  61. </div>
  62. </div>
  63. <div class="tabs__panel">
  64. <div class="panel__container">
  65. <table class="table--compact">
  66. <thead>
  67. <tr>
  68. <th>{{ 'Name'|t }}</th>
  69. <th>{{ 'Path'|t }}</th>
  70. <th>{{ 'Info file'|t }}</th>
  71. </tr>
  72. </thead>
  73. <tbody>
  74. <% _.each( data.drupal_extension.themes, function( value, key ){ %>
  75. <tr>
  76. <td><%- key %></td>
  77. <td><%- value.public_path %></td>
  78. <td><%= Drupal.webprofiler.helpers.classLink({"file" :
  79. data.drupal_extension.installation_path + value.public_pathname, "class":
  80. value.public_pathname, "line": 0}) %>
  81. </td>
  82. </tr>
  83. <% }); %>
  84. </tbody>
  85. </table>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </script>
  91. {% endblock %}