"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/modules/system/templates/system-modules-uninstall.html.twig" (26 Nov 2020, 2568 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {#
    2 /**
    3  * @file
    4  * Default theme implementation 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  * @ingroup themeable
   22  */
   23 #}
   24 {{ form.filters }}
   25 
   26 <table class="responsive-enabled">
   27   <thead>
   28     <tr>
   29       <th>{{ 'Uninstall'|t }}</th>
   30       <th>{{ 'Name'|t }}</th>
   31       <th>{{ 'Description'|t }}</th>
   32     </tr>
   33   </thead>
   34   <tbody>
   35     {% for module in modules %}
   36       {% set zebra = cycle(['odd', 'even'], loop.index0) -%}
   37       <tr{{ module.attributes.addClass(zebra) }}>
   38         <td align="center">
   39           {{- module.checkbox -}}
   40         </td>
   41         <td>
   42           <label for="{{ module.checkbox_id }}" class="module-name table-filter-text-source">{{ module.name }}</label>
   43         </td>
   44         <td class="description">
   45           <span class="text module-description">{{ module.description }}</span>
   46           {% if module.reasons_count > 0 %}
   47             <div class="admin-requirements">
   48               {%- trans -%}
   49                 The following reason prevents {{ module.module_name }} from being uninstalled:
   50               {%- plural module.reasons_count -%}
   51                 The following reasons prevent {{ module.module_name }} from being uninstalled:
   52               {%- endtrans %}
   53               <div class="item-list">
   54                 <ul>
   55                   {%- for reason in module.validation_reasons -%}
   56                     <li>{{ reason }}</li>
   57                   {%- endfor -%}
   58                   {%- if module.required_by -%}
   59                     <li>{{ 'Required by: @module-list'|t({'@module-list': module.required_by|safe_join(', ') }) }}</li>
   60                   {%- endif -%}
   61                 </ul>
   62               </div>
   63             </div>
   64           {% endif %}
   65         </td>
   66       </tr>
   67     {% else %}
   68       <tr class="odd">
   69         <td colspan="3" class="empty message">{{ 'No modules are available to uninstall.'|t }}</td>
   70       </tr>
   71     {% endfor %}
   72   </tbody>
   73 </table>
   74 
   75 {{ form|without('filters', 'modules', 'uninstall') }}