diff -u b/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
--- b/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -170,9 +170,9 @@
}
/**
- * Prepares variables for the modules details template.
+ * Prepares variables for the module details templates.
*
- * Default template: modules-details.html.twig.
+ * Default template: system-module-details.html.twig.
*
* @param $variables
* An associative array containing:
@@ -185,10 +185,10 @@
* - version: (optional) The version of the module.
* - links: (optional) Administration links provided by the module.
* - enable: A checkbox for enabling the module.
- * - #requires: (optional) A list of modules that the project requires
- * - #required_by: (optional) A list of modules that require the project
+ * - #requires: (optional) A list of modules that the project requires.
+ * - #required_by: (optional) A list of modules that require the project.
*/
-function template_preprocess_system_modules_details(&$variables) {
+function template_preprocess_system_module_details(&$variables) {
$form = $variables['form'];
$header = array(
@@ -208,7 +208,7 @@
// Add the checkbox.
unset($module['enable']['#title']);
- $item['checkbox'] = drupal_render($module['enable']);
+ $item['checkbox'] = \Drupal::service('renderer')->render($module['enable']);
// Add the module label and expand/collapse functionality.
$id = Html::getUniqueId('module-' . $key);
@@ -224,14 +224,14 @@
$item['name'] = $label;
$description = '';
- // Begin building out the description content for the module details
+ // Begin building out the description content for the module details.
$renderer = \Drupal::service('renderer');
$machine_name_render = [
'#prefix' => '',
'#plain_text' => $key,
- '#suffix' => ''
+ '#suffix' => '',
];
- $description .= t('Machine name: @machine-name', array('@machine-name' => $renderer->render($machine_name_render)));
+ $description .= t('Machine name: @machine-name', array('@machine-name' => $renderer->render($machine_name_render)));
$version = !empty($module['version']['#markup']);
if ($version) {
diff -u b/core/modules/system/system.module b/core/modules/system/system.module
--- b/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -183,7 +183,7 @@
'confirm_form' => array(
'render element' => 'form',
),
- 'system_modules_details' => array(
+ 'system_module_details' => array(
'render element' => 'form',
'file' => 'system.admin.inc',
),
reverted:
--- b/core/modules/system/templates/system-modules-details.html.twig
+++ /dev/null
@@ -1,54 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for the modules listing page. Displays a list of
- * all packages in a project.
- *
- * Available variables:
- * - header: Table header cells.
- * - content: A localized string for the title of the column.
- * - modules: Contains multiple module instances. Each module contains:
- * - attributes: Attributes on the row
- * - checkbox: A checkbox for enabling the module.
- * - name: The name of the module.
- * - details: Other details about the module
- *
- * @see template_preprocess_system_modules_details()
- *
- * @ingroup themeable
- */
-#}
-
-
-
-
- {{ header.installed }}
- |
-
- {{ header.name }}
- |
-
- {{ header.description }}
- |
-
-
-
- {% for module in modules %}
- {%
- set zebra = cycle(['even', 'odd'], loop.index)
- %}
-
-
- {{ module.checkbox }}
- |
-
- {{- module.name -}}
- |
-
- {{ module.details }}
- |
-
- {% endfor %}
-
-
-
only in patch2:
unchanged:
--- a/core/modules/system/src/Form/ModulesListForm.php
+++ b/core/modules/system/src/Form/ModulesListForm.php
@@ -213,7 +213,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#type' => 'details',
'#title' => $this->t($package),
'#open' => TRUE,
- '#theme' => 'system_modules_details',
+ '#theme' => 'system_module_details',
'#header' => array(
array('data' => $this->t('Installed'), 'class' => array('checkbox', 'visually-hidden')),
array('data' => $this->t('Name'), 'class' => array('name', 'visually-hidden')),
only in patch2:
unchanged:
--- /dev/null
+++ b/core/modules/system/templates/system-module-details.html.twig
@@ -0,0 +1,54 @@
+{#
+/**
+ * @file
+ * Default theme implementation for the modules listing page.
+ *
+ * Displays a list of all packages in a project.
+ *
+ * Available variables:
+ * - header: Table header cells. Contains the following cells:
+ * - installed: A localized string for the title of the Installed column.
+ * - namet: A localized string for the title of the Name column.
+ * - description: A localized string for the title of the Description column.
+ * - modules: Contains multiple module instances. Each module contains:
+ * - attributes: Attributes on the row.
+ * - checkbox: A checkbox for enabling the module.
+ * - name: The name of the module.
+ * - details: Other details about the module.
+ *
+ * @see template_preprocess_system_module_details()
+ *
+ * @ingroup themeable
+ */
+#}
+
+
+
+
+ {{ header.installed }}
+ |
+
+ {{ header.name }}
+ |
+
+ {{ header.description }}
+ |
+
+
+
+ {% for module in modules %}
+ {% set zebra = cycle(['even', 'odd'], loop.index) %}
+
+
+ {{ module.checkbox }}
+ |
+
+ {{- module.name -}}
+ |
+
+ {{ module.details }}
+ |
+
+ {% endfor %}
+
+
\ No newline at end of file