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