You are here

system-modules-details.html.twig in Drupal 10

Default theme implementation for the modules listing page.

Displays a list of all packages in a project.

Available variables:

  • modules: Contains multiple module instances. Each module contains:

    • attributes: Attributes on the row.
    • checkbox: A checkbox for enabling the module.
    • name: The human-readable name of the module.
    • id: A unique identifier for interacting with the details element.
    • enable_id: A unique identifier for interacting with the checkbox element.
    • description: The description of the module.
    • machine_name: The module's machine name.
    • version: Information about the module version.
    • requires: A list of modules that this module requires.
    • required_by: A list of modules that require this module.
    • links: A list of administration links provided by the module.

File

core/themes/claro/templates/admin/system-modules-details.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation 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. * @ingroup themeable
  25. */
  26. #}
  27. <table class="responsive-enabled module-list">
  28. <thead>
  29. <tr>
  30. <th class="checkbox visually-hidden">{{ 'Installed'|t }}</th>
  31. <th class="name visually-hidden">{{ 'Name'|t }}</th>
  32. <th class="description visually-hidden priority-low">{{ 'Description'|t }}</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. {% for module in modules %}
  37. <tr{{ module.attributes.addClass('module-list__module') }}>
  38. <td class="module-list__checkbox">
  39. {{ module.checkbox }}
  40. </td>
  41. <td class="module-list__module">
  42. <label id="{{ module.id }}" for="{{ module.enable_id }}" class="module-list__module-name table-filter-text-source">{{ module.name }}</label>
  43. </td>
  44. <td class="expand priority-low module-list__description">
  45. <details class="js-form-wrapper form-wrapper module-list__module-details claro-details" id="{{ module.enable_id }}-description">
  46. <summary aria-controls="{{ module.enable_id }}-description" role="button" aria-expanded="false" class="claro-details__summary module-list__module-summary"><span class="text module-description">{{ module.description }}</span></summary>
  47. <div class="claro-details__wrapper module-details__wrapper">
  48. <div class="module-details__description">
  49. <div class="module-details__requirements">
  50. <div class="module-details__requirement">{{ 'Machine name: <span dir="ltr" class="table-filter-text-source">@machine-name</span>'|t({'@machine-name': module.machine_name }) }}</div>
  51. {% if module.version %}
  52. <div class="module-details__requirement">{{ 'Version: @module-version'|t({'@module-version': module.version }) }}</div>
  53. {% endif %}
  54. {% if module.requires %}
  55. <div class="module-details__requirement">{{ 'Requires: @module-list'|t({'@module-list': module.requires }) }}</div>
  56. {% endif %}
  57. {% if module.required_by %}
  58. <div class="module-details__requirement">{{ 'Required by: @module-list'|t({'@module-list': module.required_by }) }}</div>
  59. {% endif %}
  60. </div>
  61. {% if module.links %}
  62. <div class="module-details__links">
  63. {% for link_type in ['help', 'permissions', 'configure'] %}
  64. {{ module.links[link_type] }}
  65. {% endfor %}
  66. </div>
  67. {% endif %}
  68. </div>
  69. </div>
  70. </details>
  71. </td>
  72. </tr>
  73. {% endfor %}
  74. </tbody>
  75. </table>

Related topics