Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / themes / stable / templates / admin / system-modules-uninstall.html.twig
1 {#
2 /**
3  * @file
4  * Theme override for the modules uninstall page.
5  *
6  * Available variables:
7  * - form: The modules uninstall form.
8  * - modules: Contains multiple module instances. Each module contains:
9  *   - attributes: Attributes on the row.
10  *   - module_name: The name of the module.
11  *   - checkbox: A checkbox for uninstalling the module.
12  *   - checkbox_id: A unique identifier for interacting with the checkbox
13  *     element.
14  *   - name: The human-readable name of the module.
15  *   - description: The description of the module.
16  *   - disabled_reasons: (optional) A list of reasons why this module cannot be
17  *     uninstalled.
18  *
19  * @see template_preprocess_system_modules_uninstall()
20  */
21 #}
22 {{ form.filters }}
23
24 <table class="responsive-enabled" data-striping="1">
25   <thead>
26     <tr>
27       <th>{{ 'Uninstall'|t }}</th>
28       <th>{{ 'Name'|t }}</th>
29       <th>{{ 'Description'|t }}</th>
30     </tr>
31   </thead>
32   <tbody>
33     {% for module in modules %}
34       {% set zebra = cycle(['odd', 'even'], loop.index0) -%}
35       <tr{{ module.attributes.addClass(zebra) }}>
36         <td align="center">
37           {{- module.checkbox -}}
38         </td>
39         <td>
40           <label for="{{ module.checkbox_id }}" class="module-name table-filter-text-source">{{ module.name }}</label>
41         </td>
42         <td class="description">
43           <span class="text module-description">{{ module.description }}</span>
44           {% if module.reasons_count > 0 %}
45             <div class="admin-requirements">
46               {%- trans -%}
47                 The following reason prevents {{ module.module_name }} from being uninstalled:
48               {%- plural module.reasons_count -%}
49                 The following reasons prevent {{ module.module_name }} from being uninstalled:
50               {%- endtrans %}
51               <div class="item-list">
52                 <ul>
53                   {%- for reason in module.validation_reasons -%}
54                     <li>{{ reason }}</li>
55                   {%- endfor -%}
56                   {%- if module.required_by -%}
57                     <li>{{ 'Required by: @module-list'|t({'@module-list': module.required_by|safe_join(', ') }) }}</li>
58                   {%- endif -%}
59                 </ul>
60               </div>
61             </div>
62           {% endif %}
63         </td>
64       </tr>
65     {% else %}
66       <tr class="odd">
67         <td colspan="3" class="empty message">{{ 'No modules are available to uninstall.'|t }}</td>
68       </tr>
69     {% endfor %}
70   </tbody>
71 </table>
72
73 {{ form|without('filters', 'modules', 'uninstall') }}