{% extends 'card.html.twig' %} {# /** * @file * Theme override for the modules uninstall page. * * Available variables: * - form: The modules uninstall form. * - modules: Contains multiple module instances. Each module contains: * - attributes: Attributes on the row. * - module_name: The name of the module. * - checkbox: A checkbox for uninstalling the module. * - checkbox_id: A unique identifier for interacting with the checkbox * element. * - name: The human-readable name of the module. * - description: The description of the module. * - disabled_reasons: (optional) A list of reasons why this module cannot be * uninstalled. * - disabled: if the checkbox is disabled * * @see template_preprocess_system_modules_uninstall() */ #} {{ attach_library('material_admin/card-sort') }} {% set card = { 'sticky-actions': 'medium' }|merge(card) %}
{{ form.filters }}
{% for module in modules %} {% set title_attr = [ 'card-title', 'module-name', 'table-filter-text-source', 'grey-text', 'text-darken-4', 'activator', 'truncate', ] %}
{%- if module.disabled -%} {{ module.name }}more_vert {%- else -%} {{ module.name }} {%- endif -%}

{{module.description}}

{%- if module.disabled -%}
{%- if module.required_by -%}

link {%- trans -%} Module dependencies {%- endtrans %}

{%- endif -%} {%- if module.validation_reasons > 0 -%}

info {%- trans -%} Uninstall conflicts {%- endtrans %}

{%- endif -%}
{%- endif -%} {%- if module.disabled is empty and module.validation_reason == 0 -%} {{- module.checkbox -}} {%- endif -%}
{{ module.name }}close

{%- trans -%} The following reason prevents {{ module.module_name }} from being uninstalled: {%- plural module.reasons_count -%} The following reasons prevent {{ module.module_name }} from being uninstalled: {%- endtrans %}

{% if module.reasons_count > 0 %}
    {%- for reason in module.validation_reasons -%}
  • {{ reason }}
{%- endfor -%} {%- if module.required_by -%}
  • {{ 'Required by: '|t}} {% for keys in module.required_by %} {{keys}} {% endfor %}
{%- endif -%} {%- endif -%}
{% endfor %}
{{ form|without('filters', 'modules', 'uninstall') }}