system-modules-details.html.twig 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. {#
  2. /**
  3. * @file
  4. * Theme override for the modules listing page.
  5. *
  6. * Displays a list of all packages in a project.
  7. *
  8. * Available variables:
  9. * - modules: Contains multiple module instances. Each module contains:
  10. * - attributes: Attributes on the row.
  11. * - checkbox: A checkbox for enabling the module.
  12. * - name: The human-readable name of the module.
  13. * - id: A unique identifier for interacting with the details element.
  14. * - enable_id: A unique identifier for interacting with the checkbox element.
  15. * - description: The description of the module.
  16. * - machine_name: The module's machine name.
  17. * - version: Information about the module version.
  18. * - requires: A list of modules that this module requires.
  19. * - required_by: A list of modules that require this module.
  20. * - links: A list of administration links provided by the module.
  21. *
  22. * @see template_preprocess_system_modules_details()
  23. */
  24. #}
  25. <table class="responsive-enabled" data-striping="1">
  26. <thead>
  27. <tr>
  28. <th class="checkbox visually-hidden">{{ 'Installed'|t }}</th>
  29. <th class="name visually-hidden">{{ 'Name'|t }}</th>
  30. <th class="description visually-hidden priority-low">{{ 'Description'|t }}</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. {% for module in modules %}
  35. {% set zebra = cycle(['odd', 'even'], loop.index0) %}
  36. <tr{{ module.attributes.addClass(zebra) }}>
  37. <td class="checkbox">
  38. {{ module.checkbox }}
  39. </td>
  40. <td class="module">
  41. <label id="{{ module.id }}" for="{{ module.enable_id }}" class="module-name table-filter-text-source">{{ module.name }}</label>
  42. </td>
  43. <td class="description expand priority-low">
  44. <details class="js-form-wrapper form-wrapper" id="{{ module.enable_id }}-description">
  45. <summary aria-controls="{{ module.enable_id }}-description" role="button" aria-expanded="false"><span class="text module-description">{{ module.description }}</span></summary>
  46. <div class="details-wrapper">
  47. <div class="details-description">
  48. <div class="requirements">
  49. <div class="admin-requirements">{{ 'Machine name: <span dir="ltr" class="table-filter-text-source">@machine-name</span>'|t({'@machine-name': module.machine_name }) }}</div>
  50. {% if module.version %}
  51. <div class="admin-requirements">{{ 'Version: @module-version'|t({'@module-version': module.version }) }}</div>
  52. {% endif %}
  53. {% if module.requires %}
  54. <div class="admin-requirements">{{ 'Requires: @module-list'|t({'@module-list': module.requires }) }}</div>
  55. {% endif %}
  56. {% if module.required_by %}
  57. <div class="admin-requirements">{{ 'Required by: @module-list'|t({'@module-list': module.required_by }) }}</div>
  58. {% endif %}
  59. </div>
  60. {% if module.links %}
  61. <div class="links">
  62. {% for link_type in ['help', 'permissions', 'configure'] %}
  63. {{ module.links[link_type] }}
  64. {% endfor %}
  65. </div>
  66. {% endif %}
  67. </div>
  68. </div>
  69. </details>
  70. </td>
  71. </tr>
  72. {% endfor %}
  73. </tbody>
  74. </table>