extensions.html.twig 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 %}