Version 1
[yaffs-website] / web / core / modules / system / templates / system-modules-details.html.twig
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" data-striping="1">
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       {% set zebra = cycle(['odd', 'even'], loop.index0) %}
38       <tr{{ module.attributes.addClass(zebra) }}>
39         <td class="checkbox">
40           {{ module.checkbox }}
41         </td>
42         <td class="module">
43           <label id="{{ module.id }}" for="{{ module.enable_id }}" class="module-name table-filter-text-source">{{ module.name }}</label>
44         </td>
45         <td class="description expand priority-low">
46           <details class="js-form-wrapper form-wrapper" id="{{ module.enable_id }}-description">
47             <summary aria-controls="{{ module.enable_id }}-description" role="button" aria-expanded="false"><span class="text module-description">{{ module.description }}</span></summary>
48             <div class="details-wrapper">
49               <div class="details-description">
50                 <div class="requirements">
51                   <div class="admin-requirements">{{ 'Machine name: <span dir="ltr" class="table-filter-text-source">@machine-name</span>'|t({'@machine-name': module.machine_name }) }}</div>
52                   {% if module.version %}
53                     <div class="admin-requirements">{{ 'Version: @module-version'|t({'@module-version': module.version }) }}</div>
54                   {% endif %}
55                   {% if module.requires %}
56                     <div class="admin-requirements">{{ 'Requires: @module-list'|t({'@module-list': module.requires }) }}</div>
57                   {% endif %}
58                   {% if module.required_by %}
59                     <div class="admin-requirements">{{ 'Required by: @module-list'|t({'@module-list': module.required_by }) }}</div>
60                   {% endif %}
61                 </div>
62                 {% if module.links %}
63                   <div class="links">
64                     {% for link_type in ['help', 'permissions', 'configure'] %}
65                       {{ module.links[link_type] }}
66                     {% endfor %}
67                   </div>
68                 {% endif %}
69               </div>
70             </div>
71           </details>
72         </td>
73       </tr>
74     {% endfor %}
75   </tbody>
76 </table>