diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 1616f18..4db7e31 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -2141,7 +2141,7 @@ function install_display_requirements($install_state, $requirements) { // and indicating a desire to continue anyway. See drupal_requirements_url(). if ($severity == REQUIREMENT_ERROR || ($severity == REQUIREMENT_WARNING && empty($install_state['parameters']['continue']))) { if ($install_state['interactive']) { - $build['report']['#theme'] = 'status_report'; + $build['report']['#type'] = 'status_report'; $build['report']['#requirements'] = $requirements; if ($severity == REQUIREMENT_WARNING) { $build['#title'] = t('Requirements review'); diff --git a/core/lib/Drupal/Core/Render/Element/StatusReport.php b/core/lib/Drupal/Core/Render/Element/StatusReport.php new file mode 100644 index 0000000..5aa50ab --- /dev/null +++ b/core/lib/Drupal/Core/Render/Element/StatusReport.php @@ -0,0 +1,91 @@ + 'status_report', + '#priorities' => [ + 'error', + 'warning', + 'checked', + 'ok', + ], + '#pre_render' => [ + [$class, 'preRenderGroupRequirements'], + ], + ]; + } + + /** + * #pre_render callback to group requirements. + */ + public static function preRenderGroupRequirements($element) { + $severities = static::getSeverities(); + $grouped_requirements = []; + + foreach ($element['#requirements'] as $key => $requirement) { + $severity = $severities[REQUIREMENT_INFO]; + if (isset($requirement['severity'])) { + $severity = $severities[(int) $requirement['severity']]; + } + elseif (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install') { + $severity = $severities[REQUIREMENT_OK]; + } + + $grouped_requirements[$severity['status']]['title'] = $severity['title']; + $grouped_requirements[$severity['status']]['type'] = $severity['status']; + $grouped_requirements[$severity['status']]['items'][$key] = $requirement; + } + + // Order the grouped requirements by a set order. + $order = array_flip($element['#priorities']); + uksort($grouped_requirements, function ($a, $b) use ($order) { + return $order[$a] > $order[$b]; + }); + + $element['#grouped_requirements'] = $grouped_requirements; + + return $element; + } + + /** + * Gets the severities. + * + * @return array + */ + public static function getSeverities() { + return [ + REQUIREMENT_INFO => [ + 'title' => t('Checked'), + 'status' => 'checked', + ], + REQUIREMENT_OK => [ + 'title' => t('OK'), + 'status' => 'ok', + ], + REQUIREMENT_WARNING => [ + 'title' => t('Warnings found'), + 'status' => 'warning', + ], + REQUIREMENT_ERROR => [ + 'title' => t('Errors found'), + 'status' => 'error', + ], + ]; + } + +} diff --git a/core/modules/system/css/components/system-status-report-counters.css b/core/modules/system/css/components/system-status-report-counters.css new file mode 100644 index 0000000..1a4e240 --- /dev/null +++ b/core/modules/system/css/components/system-status-report-counters.css @@ -0,0 +1,27 @@ +/** + * @file + * Styles for the system status report counters. + */ + +.system-status-report-counters__item { + width: 100%; + padding: .5em 0; + text-align: center; + white-space: nowrap; + background-color: rgba(0, 0, 0, 0.063); + margin-bottom: .5em; +} + +@media screen and (min-width: 60em) { + .system-status-report-counters { + flex-wrap: wrap; + display: flex; + justify-content: space-between; + } + .system-status-report-counters__item--half-width { + width: 49%; + } + .system-status-report-counters__item--third-width { + width: 33%; + } +} diff --git a/core/modules/system/css/components/system-status-report-general-info.css b/core/modules/system/css/components/system-status-report-general-info.css new file mode 100644 index 0000000..8334d4d --- /dev/null +++ b/core/modules/system/css/components/system-status-report-general-info.css @@ -0,0 +1,14 @@ +/** + * @file + * Default styles for the System Status general info. + */ + +.system-status-general-info__item { + border: 1px solid #ccc; + margin-top: 1em; + padding: 0 1em 1em; +} + +.system-status-general-info__item-title { + border-bottom: 1px solid #ccc; +} diff --git a/core/modules/system/src/Controller/DbUpdateController.php b/core/modules/system/src/Controller/DbUpdateController.php index f378631..fdedcc6 100644 --- a/core/modules/system/src/Controller/DbUpdateController.php +++ b/core/modules/system/src/Controller/DbUpdateController.php @@ -522,7 +522,7 @@ public function requirements($severity, array $requirements, Request $request) { $try_again_url = Url::fromUri($request->getUriForPath(''))->setOptions(['query' => $options])->toString(TRUE)->getGeneratedUrl(); $build['status_report'] = array( - '#theme' => 'status_report', + '#type' => 'status_report', '#requirements' => $requirements, '#suffix' => $this->t('Check the messages and try again.', array(':url' => $try_again_url)) ); diff --git a/core/modules/system/src/Controller/SystemInfoController.php b/core/modules/system/src/Controller/SystemInfoController.php index aa9f140..829d1fe 100644 --- a/core/modules/system/src/Controller/SystemInfoController.php +++ b/core/modules/system/src/Controller/SystemInfoController.php @@ -47,7 +47,7 @@ public function __construct(SystemManager $systemManager) { */ public function status() { $requirements = $this->systemManager->listRequirements(); - return array('#theme' => 'status_report', '#requirements' => $requirements); + return ['#type' => 'status_report_page', '#requirements' => $requirements]; } /** diff --git a/core/modules/system/src/Element/StatusReportPage.php b/core/modules/system/src/Element/StatusReportPage.php new file mode 100644 index 0000000..5d2f985 --- /dev/null +++ b/core/modules/system/src/Element/StatusReportPage.php @@ -0,0 +1,139 @@ + 'status_report_page', + '#pre_render' => [ + [$class, 'preRenderCounters'], + [$class, 'preRenderGeneralInfo'], + [$class, 'preRenderRequirements'], + ], + ]; + } + + /** + * #pre_render callback to get general info out of requirements. + */ + public static function preRenderGeneralInfo($element) { + $element['#general_info'] = [ + '#theme' => 'status_report_general_info', + ]; + // Loop through requirements and pull out items. + foreach ($element['#requirements'] as $key => $requirement) { + switch ($key) { + case 'cron': + foreach ($requirement['description'] as &$description_elements) { + foreach ($description_elements as &$description_element) { + if (isset($description_element['#url']) && $description_element['#url']->getRouteName() == 'system.run_cron') { + $description_element['#attributes']['class'][] = 'button'; + $description_element['#attributes']['class'][] = 'button--small'; + $description_element['#attributes']['class'][] = 'button--primary'; + $description_element['#attributes']['class'][] = 'system-status-general-info__run-cron'; + } + } + } + $element['#general_info']['#' . $key] = $requirement; + unset($element['#requirements'][$key]); + break; + + case 'drupal': + case 'webserver': + case 'database_system': + case 'database_system_version': + case 'php': + case 'php_memory_limit': + $element['#general_info']['#' . $key] = $requirement; + unset($element['#requirements'][$key]); + break; + } + } + + return $element; + } + + /** + * #pre_render callback to create counter elements. + */ + public static function preRenderCounters($element) { + // Count number of items with different severity for summary. + $counters = [ + 'error' => [ + 'amount' => 0, + 'text' => t('Error'), + 'text_plural' => t('Errors'), + ], + 'warning' => [ + 'amount' => 0, + 'text' => t('Warning'), + 'text_plural' => t('Warnings'), + ], + 'checked' => [ + 'amount' => 0, + 'text' => t('Checked'), + 'text_plural' => t('Checked'), + ], + ]; + + $severities = StatusReport::getSeverities(); + foreach ($element['#requirements'] as $key => &$requirement) { + $severity = $severities[REQUIREMENT_INFO]; + if (isset($requirement['severity'])) { + $severity = $severities[(int) $requirement['severity']]; + } + elseif (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install') { + $severity = $severities[REQUIREMENT_OK]; + } + + if (isset($counters[$severity['status']])) { + $counters[$severity['status']]['amount']++; + } + } + + foreach ($counters as $key => $counter) { + if ($counter['amount'] === 0) { + continue; + } + + $text = new PluralTranslatableMarkup($counter['amount'], $counter['text'], $counter['text_plural']); + + $element['#counters'][$key] = [ + '#theme' => 'status_report_counter', + '#amount' => $counter['amount'], + '#text' => $text, + '#severity' => $key, + ]; + } + + return $element; + } + + /** + * #pre_render callback to create status report requirements. + */ + public static function preRenderRequirements($element) { + $element['#requirements'] = [ + '#type' => 'status_report', + '#requirements' => $element['#requirements'], + ]; + + return $element; + } + +} diff --git a/core/modules/system/src/SystemManager.php b/core/modules/system/src/SystemManager.php index e5d3a18..b9fcebb 100644 --- a/core/modules/system/src/SystemManager.php +++ b/core/modules/system/src/SystemManager.php @@ -110,7 +110,7 @@ public function listRequirements() { // Check run-time requirements and status information. $requirements = $this->moduleHandler->invokeAll('requirements', array('runtime')); - usort($requirements, function($a, $b) { + uasort($requirements, function($a, $b) { if (!isset($a['weight'])) { if (!isset($b['weight'])) { return strcasecmp($a['title'], $b['title']); diff --git a/core/modules/system/src/Tests/System/CronRunTest.php b/core/modules/system/src/Tests/System/CronRunTest.php index ec35b72..26a56a3 100644 --- a/core/modules/system/src/Tests/System/CronRunTest.php +++ b/core/modules/system/src/Tests/System/CronRunTest.php @@ -121,7 +121,7 @@ public function testManualCron() { $this->assertResponse(403); $this->drupalGet('admin/reports/status'); - $this->clickLink(t('run cron manually')); + $this->clickLink(t('Run cron')); $this->assertResponse(200); $this->assertText(t('Cron ran successfully.')); } diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index f9c49c7..94f6302 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -106,66 +106,6 @@ function template_preprocess_system_admin_index(&$variables) { } /** - * Prepares variables for status report template. - * - * Default template: status-report.html.twig. - * - * This theme function is dependent on install.inc being loaded, because - * that's where the constants are defined. - * - * @param $variables - * An associative array containing: - * - requirements: An array of requirements/status items. Each requirement - * is an associative array containing the following elements: - * - title: The name of the requirement. - * - value: (optional) The current value (version, time, level, etc). - * - description: (optional) The description of the requirement. - * - severity: (optional) The requirement's result/severity level, one of: - * - REQUIREMENT_INFO: Status information. - * - REQUIREMENT_OK: The requirement is satisfied. - * - REQUIREMENT_WARNING: The requirement failed with a warning. - * - REQUIREMENT_ERROR: The requirement failed with an error. - */ -function template_preprocess_status_report(&$variables) { - $severities = array( - REQUIREMENT_INFO => array( - 'title' => t('Info'), - 'status' => 'info', - ), - REQUIREMENT_OK => array( - 'title' => t('OK'), - 'status' => 'ok', - ), - REQUIREMENT_WARNING => array( - 'title' => t('Warning'), - 'status' => 'warning', - ), - REQUIREMENT_ERROR => array( - 'title' => t('Error'), - 'status' => 'error', - ), - ); - - foreach ($variables['requirements'] as $i => $requirement) { - // Always use the explicit requirement severity, if defined. Otherwise, - // default to REQUIREMENT_OK in the installer to visually confirm that - // installation requirements are met. And default to REQUIREMENT_INFO to - // denote neutral information without special visualization. - if (isset($requirement['severity'])) { - $severity = $severities[(int) $requirement['severity']]; - } - elseif (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install') { - $severity = $severities[REQUIREMENT_OK]; - } - else { - $severity = $severities[REQUIREMENT_INFO]; - } - $variables['requirements'][$i]['severity_title'] = $severity['title']; - $variables['requirements'][$i]['severity_status'] = $severity['status']; - } -} - -/** * Prepares variables for the module details templates. * * Default template: system-modules-details.html.twig. diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 6dc2663..8186338 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -535,14 +535,19 @@ function system_requirements($phase) { ], ]; } - $cron_url = \Drupal::url('system.cron', ['key' => \Drupal::state()->get('system.cron_key'), ['absolute' => TRUE]]); $requirements['cron']['description'][] = [ [ - '#markup' => t('You can run cron manually.', [':cron' => \Drupal::url('system.run_cron')]), + '#type' => 'link', + '#prefix' => '(', + '#title' => t('more information'), + '#suffix' => ')', + '#url' => Url::fromRoute('system.cron_settings'), ], [ - '#prefix' => '
', - '#markup' => t('To run cron from outside the site, go to @cron', [':url' => $cron_url, '@cron' => $cron_url]), + '#prefix' => '
', + '#type' => 'link', + '#title' => t('Run cron'), + '#url' => Url::fromRoute('system.run_cron'), ], ]; } diff --git a/core/modules/system/system.libraries.yml b/core/modules/system/system.libraries.yml index 206ae4f..a5f36e8 100644 --- a/core/modules/system/system.libraries.yml +++ b/core/modules/system/system.libraries.yml @@ -19,6 +19,8 @@ base: css/components/reset-appearance.module.css: { weight: -10 } css/components/resize.module.css: { weight: -10 } css/components/sticky-header.module.css: { weight: -10 } + css/components/system-status-report-counters.css: { weight: -10 } + css/components/system-status-report-general-info.css: { weight: -10 } css/components/tabledrag.module.css: { weight: -10 } css/components/tablesort.module.css: { weight: -10 } css/components/tree-child.module.css: { weight: -10 } diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 3c858f9..641a216 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -197,9 +197,32 @@ function system_theme() { 'render element' => 'form', 'file' => 'system.admin.inc', ), + 'status_report_page' => array( + 'variables' => array( + 'counters' => array(), + 'general_info' => array(), + 'requirements' => NULL, + ), + ), 'status_report' => array( - 'variables' => array('requirements' => NULL), - 'file' => 'system.admin.inc', + 'variables' => array( + 'grouped_requirements' => NULL, + 'requirements' => NULL, + ), + ), + 'status_report_counter' => array( + 'variables' => array('amount' => NULL, 'text' => NULL, 'severity' => NULL), + ), + 'status_report_general_info' => array( + 'variables' => array( + 'drupal' => array(), + 'cron' => array(), + 'database_system' => array(), + 'database_system_version' => array(), + 'php' => array(), + 'php_memory_limit' => array(), + 'webserver' => array(), + ), ), 'admin_page' => array( 'variables' => array('blocks' => NULL), diff --git a/core/modules/system/templates/status-report-counter.html.twig b/core/modules/system/templates/status-report-counter.html.twig new file mode 100644 index 0000000..585211a --- /dev/null +++ b/core/modules/system/templates/status-report-counter.html.twig @@ -0,0 +1,16 @@ +{# +/** + * @file + * Default theme implementation for the status report counter. + * + * Available variables: + * - amount: The number shown on counter. + * - text: The text shown on counter. + * - severity: The severity of the counter. + * + * @ingroup themable + */ +#} +{{ amount }} {{ text }} +
+{{ text }} Details diff --git a/core/modules/system/templates/status-report-general-info.html.twig b/core/modules/system/templates/status-report-general-info.html.twig new file mode 100644 index 0000000..c27caca --- /dev/null +++ b/core/modules/system/templates/status-report-general-info.html.twig @@ -0,0 +1,81 @@ +{# +/** + * @file + * Default theme implementation for the status report general info. + * + * Available variables: + * - drupal: The status of Drupal installation: + * - value: The current status of Drupal installation. + * - description: The description for current status of Drupal installation. + * - cron: The status of cron: + * - value: The current status of cron. + * - description: The description for current status of cron. + * - cron.run_cron: An array to render a button for running cron. + * - database_system: The status of database system: + * - value: The current status of database sytem. + * - description: The description for current status of cron. + * - database_system_version: The info about current database version: + * - value: The current version of database. + * - description: The description for current version of database. + * - php: The current version of PHP: + * - value: The status of currently installed PHP version. + * - description: The description for current installed PHP version. + * - php_memory_limit: The info about current PHP memory limit: + * - value: The status of currently set PHP memory limit. + * - description: The description for currently set PHP memory limit. + * - webserver: The info about currently installed web server: + * - value: The status of currently installed web server. + * - description: The description for the status of currently installed web + * server. + */ +#} + +

{{ 'General System Information'|t }}

+
+

{{ 'Drupal Version'|t }}

+ {{ drupal.value }} + {% if drupal.description %} + {{ drupal.description }} + {% endif %} +
+
+

{{ 'Last Cron Run'|t }}

+ {{ cron.value }} + {% if cron.run_cron %} + {{ cron.run_cron }} + {% endif %} + {% if cron.description %} + {{ cron.description }} + {% endif %} +
+
+

{{ 'Web Server'|t }}

+ {{ webserver.value }} + {% if webserver.description %} + {{ webserver.description }} + {% endif %} +
+
+

{{ 'PHP'|t }}

+ {{ 'Version'|t }}
{{ php.value }} + {% if php.description %} + {{ php.description }} + {% endif %} +
+ {{ 'Memory limit'|t }}
{{ php_memory_limit.value }} + {% if php_memory_limit.description %} + {{ php_memory_limit.description }} + {% endif %} +
+
+

{{ 'Database'|t }}

+ {{ 'Version'|t }}
{{ database_system_version.value }} + {% if database_system_version.description %} + {{ database_system_version.description }} + {% endif %} +
+ {{ 'System'|t }}
{{ database_system.value }} + {% if database_system.description %} + {{ database_system.description }} + {% endif %} +
diff --git a/core/modules/system/templates/status-report-page.html.twig b/core/modules/system/templates/status-report-page.html.twig new file mode 100644 index 0000000..ed6d1ea --- /dev/null +++ b/core/modules/system/templates/status-report-page.html.twig @@ -0,0 +1,28 @@ +{# +/** + * @file + * Default theme implementation for the status report page. + * + * Available variables: + * - counters: The list of counter elements. + * - general_info: A render array to create general info element. + * - requirements: A render array to create requirements table. + * + * @see template_preprocess_status_report() + */ +#} +{% if counters|length == 3 %} + {% set element_width_class = ' system-status-report-counters__item--third-width' %} +{% elseif counters|length == 2 %} + {% set element_width_class = ' system-status-report-counters__item--half-width' %} +{% endif %} +
+ {% for counter in counters %} +
+ {{ counter }} +
+ {% endfor %} +
+ +{{ general_info }} +{{ requirements }} diff --git a/core/modules/system/templates/status-report.html.twig b/core/modules/system/templates/status-report.html.twig index b6ad739..ca9cf2b 100644 --- a/core/modules/system/templates/status-report.html.twig +++ b/core/modules/system/templates/status-report.html.twig @@ -2,40 +2,38 @@ /** * @file * Default theme implementation for the status report. - * - * Available variables: - * - requirements: Contains multiple requirement instances. - * Each requirement contains: - * - title: The title of the requirement. - * - value: (optional) The requirement's status. - * - description: (optional) The requirement's description. - * - severity_title: The title of the severity. - * - severity_status: Indicates the severity status. - * - * @see template_preprocess_status_report() - * - * @ingroup themeable - */ -#} - - - {% for requirement in requirements %} - - {% if requirement.severity_status in ['warning', 'error'] %} - - - + {{ requirement.title }} + + {{ requirement.value }} + {% if requirement.description %} +
{{ requirement.description }}
+ {% endif %} + {% endfor %} - -
+ * + * Available variables: + * - grouped_requirements: Contains grouped requirements. + * Each group contains: + * - title: The title of the group. + * - type: The severity of the group. + * - items: The requirement instances. + * Each requirement item contains: + * - title: The title of the requirement. + * - value: (optional) The requirement's status. + * - description: (optional) The requirement's description. + * - severity_title: The title of the severity. + * - severity_status: Indicates the severity status. + * - requirements: Ungrouped requirements + * + * @ingroup themeable + */ + #} +{% for group in grouped_requirements %} +

{{ group.title }}

+ {% for requirement in group.items %} +
+ + {% if requirement.severity_title %} {{ requirement.severity_title }} - {% else %} -
- {% endif %} - {{ requirement.title }} - - {{ requirement.value }} - {% if requirement.description %} -
{{ requirement.description }}
{% endif %} -
+{% endfor %} diff --git a/core/themes/seven/css/components/colors.css b/core/themes/seven/css/components/colors.css index 54358d8..a602adc 100644 --- a/core/themes/seven/css/components/colors.css +++ b/core/themes/seven/css/components/colors.css @@ -3,14 +3,11 @@ */ .color-success { color: #325e1c; - background-color: #f3faef; } .color-warning { color: #734c00; - background-color: #fdf8ed; } .color-error { color: #a51b00; - background-color: #fcf4f2; } diff --git a/core/themes/seven/css/components/system-status-counter.css b/core/themes/seven/css/components/system-status-counter.css new file mode 100644 index 0000000..2caa950 --- /dev/null +++ b/core/themes/seven/css/components/system-status-counter.css @@ -0,0 +1,79 @@ +/** + * @file + * Styles for the system status counter component. + */ + +.system-status-counter { + border: 1px solid #e6e4df; + border-radius: 3px; + display: inline-block; + width: 100%; + white-space: nowrap; + background: #FCFCFA; +} +.system-status-counter__status-icon { + display: inline-block; + height: 45px; + width: 45px; + vertical-align: middle; + border-right: 1px solid #e6e4df; /* LTR */ + border-left: 0; /* LTR */ + background-color: #faf9f5; + box-shadow: 0 1px 1px rgba(0, 0, 0, .1) inset; +} +[dir="rtl"] .system-status-counter__status-icon { + border-right: 0; + border-left: 1px solid #e6e4df; + box-shadow: 0 1px 1px rgba(0, 0, 0, .1) inset; +} +.system-status-counter__status-icon:before { + content: ""; + background-size: 25px; + background-position: 50% center; + background-repeat: no-repeat; + width: 100%; + height: 100%; + display: block; +} + +.system-status-counter__status-icon--error:before { + background-image: url(../../../stable/images/core/icons/e32700/error.svg); +} +.system-status-counter__status-icon--warning:before { + background-image: url(../../../stable/images/core/icons/e29700/warning.svg); +} +.system-status-counter__status-icon--checked:before { + background-image: url(../../../stable/images/core/icons/73b355/check.svg); +} + +.system-status-counter__status-title { + display: inline-block; + vertical-align: middle; + text-transform: uppercase; + padding: 0 6px; + font-size: 1rem; + line-height: 1em; + font-weight: bold; +} +.system-status-counter__details { + font-size: 12px; + font-weight: normal; + text-transform: none; +} + +@media screen and (min-width: 61em) { + .system-status-counter__status-icon, + .system-status-counter { + height: 65px; + } + .system-status-counter__status-icon { + width: 65px; + } + .system-status-counter__status-title { + font-size: 16px; + padding: 10px 3%; + } + .system-status-counter__status-icon:before { + background-size: 35px; + } +} diff --git a/core/themes/seven/css/components/system-status-report-counters.css b/core/themes/seven/css/components/system-status-report-counters.css new file mode 100644 index 0000000..a8e6db3 --- /dev/null +++ b/core/themes/seven/css/components/system-status-report-counters.css @@ -0,0 +1,26 @@ +/** + * @file + * Styles for the system status report counters. + */ + +.system-status-report-counters__item { + margin: 10px 0; + width: 100%; +} + +@media screen and (min-width: 60em) { + .system-status-report-counters__item { + margin-bottom: 20px; + } + .system-status-report-counters { + flex-wrap: wrap; + display: flex; + justify-content: space-between; + } + .system-status-report-counters__item--half-width { + width: 49%; + } + .system-status-report-counters__item--third-width { + width: 32%; + } +} diff --git a/core/themes/seven/css/components/system-status-report-general-info.css b/core/themes/seven/css/components/system-status-report-general-info.css new file mode 100644 index 0000000..e4ca960 --- /dev/null +++ b/core/themes/seven/css/components/system-status-report-general-info.css @@ -0,0 +1,149 @@ +/** + * @file + * Seven styles for the System Status general info. + */ + +.system-status-general-info { + border: 1px solid #ccc; + border-radius: 3px; +} + +.system-status-general-info__header { + background-color: #f5f5f2; + padding: 10px; + margin: 0; + overflow: hidden; + border-top-left-radius: 3px; + border-top-right-radius: 3px; + font-size: 14px; + text-transform: uppercase; +} + +.system-status-general-info__item { + background: #fcfcfa; + border-top: 1px solid #ccc; + padding: 10px 10px 20px; + box-sizing: border-box; + overflow-x: auto; +} + +.system-status-general-info__item-icon { + display: inline-block; + height: 45px; + width: 45px; + vertical-align: top; +} +.system-status-general-info__item-icon:before { + content: ""; + background-size: 35px; + background-position: 50% center; + background-repeat: no-repeat; + width: 100%; + height: 100%; + display: block; +} +.system-status-general-info__item-icon--d8:before { + background-image: url(../../images/icons/cccccc/d8-logo.svg); +} +.system-status-general-info__item-icon--clock:before { + background-image: url(../../images/icons/cccccc/clock.svg); +} +.system-status-general-info__item-icon--server:before { + background-image: url(../../images/icons/cccccc/server.svg); +} +.system-status-general-info__item-icon--php:before { + background-image: url(../../images/icons/cccccc/php-logo.svg); + background-size: 45px; +} +.system-status-general-info__item-icon--database:before { + background-image: url(../../images/icons/cccccc/database.svg); + background-size: 30px; +} + +.system-status-general-info__item-details { + box-sizing: border-box; + display: inline-block; + width: calc(100% - 60px); + padding-left: 10px; /* LTR */ + position: relative; +} +[dir="rtl"] .system-status-general-info__item-details { + padding-right: 10px; + padding-left: 0; +} + +.system-status-general-info__item-title { + margin-bottom: 0; +} + +.system-status-general-info__run-cron { + margin: 1em 0 0; +} + +@media screen and (min-width: 48em) { + .system-status-general-info__items { + display: flex; + flex-wrap: wrap; + } + + .system-status-general-info__item { + flex: 1; + flex-basis: 33%; + width: 33%; + } + .system-status-general-info__item:nth-child(2) { + flex: 2; + flex-basis: 66%; + } + .system-status-general-info__item:nth-child(2), + .system-status-general-info__item:nth-child(4), + .system-status-general-info__item:nth-child(5) { + border-left: 1px solid #ccc; /* LTR */ + } + [dir="rtl"] .system-status-general-info__item:nth-child(1), + [dir="rtl"] .system-status-general-info__item:nth-child(3) { + border-left: 1px solid #ccc; + } + [dir="rtl"] .system-status-general-info__item:nth-child(2), + [dir="rtl"] .system-status-general-info__item:nth-child(5) { + border-left: 0; + } + + .system-status-general-info__run-cron { + margin: 15px 0 5px; + } +} + +@media screen and (min-width: 60em) { + .system-status-general-info__item-icon { + width: 55px; + height: 55px; + } + .system-status-general-info__item-icon:before { + background-size: 35px; + } + .system-status-general-info__item-icon--php:before { + background-size: 55px; + } + + .system-status-general-info__run-cron { + position: absolute; + top: 1em; + right: 1em; /* LTR */ + margin-top: 0; + } + [dir="rtl"] .system-status-general-info__run-cron { + left: 1em; + right: auto; + } +} + +@media screen and (max-width: 48em) { + .system-status-general-info__header { + display: none; + } + .system-status-general-info { + border-top: 0; + margin-top: 25px; + } +} diff --git a/core/themes/seven/css/components/system-status-report.css b/core/themes/seven/css/components/system-status-report.css index aeac1d3..54edd60 100644 --- a/core/themes/seven/css/components/system-status-report.css +++ b/core/themes/seven/css/components/system-status-report.css @@ -3,13 +3,138 @@ * Seven styles for the System Status Report. */ +.system-status-report__requirements-group { + padding-top: 20px; +} .system-status-report__entry { + border: 0; border-top: 1px solid #ccc; - border-bottom: inherit; -} -.system-status-report__entry:first-child { - border-top: 1px solid #bebfb9; + margin: 0; + width: 100%; + overflow: auto; } -.system-status-report__entry:last-child { +.system-status-report__entry:last-of-type { border-bottom: 1px solid #bebfb9; } +/* Account for native and poly-filled details element */ +.system-status-report__status-title { + position: relative; + padding: 1em 1em 1em 3em; /* LTR */ + box-sizing: border-box; + width: 100%; + font-weight: bold; +} +.system-status-report__status-title .details-title { + color: inherit; + text-transform: none; +} +html:not(.details) .system-status-report__status-title { + padding-left: 0; +} +.system-status-report__status-title .details-title { + padding-left: 3em; /* LTR */ +} +[dir="rtl"] .system-status-report__status-title .details-title { + padding-right: 3em; + padding-left: 0; +} +[dir="rtl"].details .system-status-report__status-title { + padding: 1em 3em 1em 1em; +} +.collapse-processed > .system-status-report__status-title:before { + float: right; /* LTR */ +} +.system-status-report__status-title::-webkit-details-marker { + float: right; /* LTR */ +} +[dir="rtl"] .collapse-processed > .system-status-report__status-title:before { + float: left; +} +[dir="rtl"] .system-status-report__status-title::-webkit-details-marker { + float: left; +} + +/* Make poly-filled details and summary elements behave correctly. */ +.system-status-report summary:first-child ~ * { + display: none; +} +.system-status-report details[open] > *, +.system-status-report details > summary:first-child { + display: block; +} + +.system-status-report__status-title .details-title:before, +.details .system-status-report__status-icon:before { + content: ""; + background-repeat: no-repeat; + background-size: contain; + background-position: top center; + height: 16px; + width: 16px; + position: absolute; + left: 10px; /* LTR */ + top: 1em; + display: inline-block; + vertical-align: top; + margin-right: 10px; /* LTR */ +} +[dir="rtl"] .system-status-report__status-title .details-title:before, +[dir="rtl"].details .system-status-report__status-title:before { + left: auto; + right: 10px; + margin-right: 0; +} +.system-status-report__status-icon--error .details-title:before, +.details .system-status-report__status-icon--error:before { + background-image: url(../../../stable/images/core/icons/e32700/error.svg); +} +.system-status-report__status-icon--warning .details-title:before, +.details .system-status-report__status-icon--warning:before { + background-image: url(../../../stable/images/core/icons/e29700/warning.svg); +} + +.system-status-report__entry__value { + box-sizing: border-box; + padding: 0 1em 1em 3em; /* LTR */ +} +[dir="rtl"] .system-status-report__entry__value { + padding-right: 3em; + padding-left: 1em; +} + +@media screen and (max-width: 48em) { + .system-status-report { + word-wrap: break-word; + } +} + +@media screen and (min-width: 48em) { + .system-status-report__entry::after { + display: table; + content: ''; + clear: both; + } + .system-status-report__status-title { + width: 18rem; + float: left; /* LTR */ + } + [dir="rtl"] .system-status-report__status-title { + float: right; + } + .collapse-processed > .system-status-report__status-title:before, + .system-status-report__status-title::-webkit-details-marker { + position: relative; + top: 3px; + } + .system-status-report__entry__value { + width: calc(100% - 23em); + float: right; + display: block; + padding-left: 0; /* LTR */ + padding-top: 1em; + } + [dir="rtl"] .system-status-report__entry__value { + padding-left: 0; + padding-right: 3em; + } +} diff --git a/core/themes/seven/css/components/tables.css b/core/themes/seven/css/components/tables.css index 913e21a..4fbafba 100644 --- a/core/themes/seven/css/components/tables.css +++ b/core/themes/seven/css/components/tables.css @@ -39,15 +39,6 @@ tbody tr:focus { background: #f7fcff; } -/* See colors.css */ -tbody tr.color-warning:hover, -tbody tr.color-warning:focus { - background: #fdf8ed; -} -tbody tr.color-error:hover, -tbody tr.color-error:focus { - background: #fcf4f2; -} td, th { vertical-align: middle; diff --git a/core/themes/seven/css/theme/maintenance-page.css b/core/themes/seven/css/theme/maintenance-page.css index 3725ac6..bb29a22 100644 --- a/core/themes/seven/css/theme/maintenance-page.css +++ b/core/themes/seven/css/theme/maintenance-page.css @@ -2,6 +2,7 @@ * @file * Maintenance theming. */ + .maintenance-page { background-color: #e0e0d8; background-image: -webkit-radial-gradient(hsl(203, 2%, 90%), hsl(203, 2%, 95%)); @@ -51,7 +52,6 @@ .task-list { margin-left: 0; /* LTR */ list-style-type: none; - list-style-image: none; padding-left: 0; /* LTR */ padding-bottom: 1em; } @@ -142,7 +142,7 @@ } .layout-container { margin: 0 auto; - max-width: 770px; + min-height: 75%; width: 75%; border-radius: 5px; box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); @@ -181,3 +181,21 @@ margin: 0.75em 1.9em; } } + +/** + * Status report customization for install and update page. + */ +.system-status-report__status-title { + float: none; + width: 100%; +} +.system-status-report__entry__value { + float: none; + width: 100%; + padding-left: 3em; /* LTR */ + padding-top: 0; +} +[dir="rtl"] .system-status-report__entry__value { + padding-left: 1em; + padding-right: 3em; +} diff --git a/core/themes/seven/images/icons/cccccc/clock.svg b/core/themes/seven/images/icons/cccccc/clock.svg new file mode 100644 index 0000000..e51d3e0 --- /dev/null +++ b/core/themes/seven/images/icons/cccccc/clock.svg @@ -0,0 +1,3 @@ + + + diff --git a/core/themes/seven/images/icons/cccccc/d8-logo.svg b/core/themes/seven/images/icons/cccccc/d8-logo.svg new file mode 100644 index 0000000..035119b --- /dev/null +++ b/core/themes/seven/images/icons/cccccc/d8-logo.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/core/themes/seven/images/icons/cccccc/database.svg b/core/themes/seven/images/icons/cccccc/database.svg new file mode 100644 index 0000000..3351212 --- /dev/null +++ b/core/themes/seven/images/icons/cccccc/database.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/core/themes/seven/images/icons/cccccc/php-logo.svg b/core/themes/seven/images/icons/cccccc/php-logo.svg new file mode 100644 index 0000000..b039d24 --- /dev/null +++ b/core/themes/seven/images/icons/cccccc/php-logo.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/core/themes/seven/images/icons/cccccc/server.svg b/core/themes/seven/images/icons/cccccc/server.svg new file mode 100644 index 0000000..1576b39 --- /dev/null +++ b/core/themes/seven/images/icons/cccccc/server.svg @@ -0,0 +1,3 @@ + + + diff --git a/core/themes/seven/js/responsive-details.js b/core/themes/seven/js/responsive-details.js new file mode 100644 index 0000000..587d124 --- /dev/null +++ b/core/themes/seven/js/responsive-details.js @@ -0,0 +1,49 @@ +/** + * @file + * Provides responsive behaviors to HTML details elements. + */ + +(function ($, Drupal) { + + 'use strict'; + + /** + * Initializes the responsive behaviors for details elements. + * + * @type {Drupal~behavior} + * + * @prop {Drupal~behaviorAttach} attach + * Attaches the responsive behavior to status report specific details elements. + */ + Drupal.behaviors.responsiveDetails = { + attach: function (context) { + $(context).find('details').once('responsive-details').each(init); + } + }; + + function init(i, detailElement) { + var mql = window.matchMedia('(min-width:48em)'); + mql.addListener(function() { + handleResize(mql, detailElement); + }); + handleResize(mql, detailElement); + + function handleResize(mql, detail) { + var $detail = $(detail); + if (mql.matches) { + $detail + .attr('open', true) + .children('summary') + .attr('aria-expanded', true); + } + else { + // If user explicitly opened one, leave it alone. + $detail.find('summary[aria-pressed!=true]') + .attr('aria-expanded', false) + .parent('details') + .attr('open', false); + } + } + } + +})(jQuery, Drupal); diff --git a/core/themes/seven/seven.info.yml b/core/themes/seven/seven.info.yml index 369515e..efbf3aa 100644 --- a/core/themes/seven/seven.info.yml +++ b/core/themes/seven/seven.info.yml @@ -22,6 +22,11 @@ core: 8.x libraries: - seven/global-styling libraries-override: + system/base: + css: + component: + /core/themes/stable/css/system/components/system-status-report-counters.css: css/components/system-status-report-counters.css + /core/themes/stable/css/system/components/system-status-report-general-info.css: css/components/system-status-report-general-info.css core/drupal.vertical-tabs: css: component: diff --git a/core/themes/seven/seven.libraries.yml b/core/themes/seven/seven.libraries.yml index e68b75a..424e7f5 100644 --- a/core/themes/seven/seven.libraries.yml +++ b/core/themes/seven/seven.libraries.yml @@ -27,7 +27,10 @@ global-styling: css/components/tables.css: {} css/components/search-admin-settings.css: {} css/components/tablesort-indicator.css: {} + css/components/system-status-report-general-info.css: {} css/components/system-status-report.css: {} + css/components/system-status-report-counters.css: {} + css/components/system-status-counter.css: {} css/components/tabs.css: {} css/components/views-ui.css: {} layout: @@ -74,6 +77,18 @@ drupal.nav-tabs: - core/drupal - core/jquery.once - core/drupal.debounce + - core/collapse + +drupal.responsive-detail: + version: VERSION + js: + js/responsive-details.js: {} + dependencies: + - core/matchmedia + - core/matchmedia.addListener + - core/jquery + - core/jquery.once + - core/collapse vertical-tabs: version: VERSION diff --git a/core/themes/seven/templates/status-report-counter.html.twig b/core/themes/seven/templates/status-report-counter.html.twig new file mode 100644 index 0000000..5c408b8 --- /dev/null +++ b/core/themes/seven/templates/status-report-counter.html.twig @@ -0,0 +1,27 @@ +{# +/** + * @file + * Theme override for status report counter. + * + * Available variables: + * - amount: The number shown on counter. + * - text: The text shown on counter. + * - severity: The severity of the counter. + * + * @ingroup themable + */ +#} +{% + set classes = [ + 'system-status-counter', + 'system-status-counter--' ~ severity, + ] +%} + + + + {{ amount }} {{ text }} +
+ {{ text }} Details +
+ diff --git a/core/themes/seven/templates/status-report-general-info.html.twig b/core/themes/seven/templates/status-report-general-info.html.twig new file mode 100644 index 0000000..e070449 --- /dev/null +++ b/core/themes/seven/templates/status-report-general-info.html.twig @@ -0,0 +1,99 @@ +{# +/** + * @file + * Theme override for status report general info. + * + * Available variables: + * - drupal: The status of Drupal installation: + * - value: The current status of Drupal installation. + * - description: The description for current status of Drupal installation. + * - cron: The status of cron: + * - value: The current status of cron. + * - description: The description for current status of cron. + * - cron.run_cron: An array to render a button for running cron. + * - database_system: The status of database system: + * - value: The current status of database sytem. + * - description: The description for current status of cron. + * - database_system_version: The info about current database version: + * - value: The current version of database. + * - description: The description for current version of database. + * - php: The current version of PHP: + * - value: The status of currently installed PHP version. + * - description: The description for current installed PHP version. + * - php_memory_limit: The info about current PHP memory limit: + * - value: The status of currently set PHP memory limit. + * - description: The description for currently set PHP memory limit. + * - webserver: The info about currently installed web server: + * - value: The status of currently installed web server. + * - description: The description for the status of currently installed web + * server. + */ +#} +
+

{{ 'General System Information'|t }}

+
+
+ +
+

{{ 'Drupal Version'|t }}

+ {{ drupal.value }} + {% if drupal.description %} +
{{ drupal.description }}
+ {% endif %} +
+
+
+ +
+

{{ 'Last Cron Run'|t }}

+ {{ cron.value }} + {% if cron.run_cron %} +
{{ cron.run_cron }}
+ {% endif %} + {% if cron.description %} +
{{ cron.description }}
+ {% endif %} +
+
+
+ +
+

{{ 'Web Server'|t }}

+ {{ webserver.value }} + {% if webserver.description %} +
{{ webserver.description }}
+ {% endif %} +
+
+
+ +
+

{{ 'PHP'|t }}

+ {{ 'Version'|t }}
{{ php.value }} + {% if php.description %} +
{{ php.description }}
+ {% endif %} +
+ {{ 'Memory limit'|t }}
{{ php_memory_limit.value }} + {% if php_memory_limit.description %} +
{{ php_memory_limit.description }}
+ {% endif %} +
+
+
+ +
+

{{ 'Database'|t }}

+ {{ 'Version'|t }}
{{ database_system_version.value }} + {% if database_system_version.description %} +
{{ database_system_version.description }}
+ {% endif %} +
+ {{ 'System'|t }}
{{ database_system.value }} + {% if database_system.description %} +
{{ database_system.description }}
+ {% endif %} +
+
+
+
diff --git a/core/themes/seven/templates/status-report-page.html.twig b/core/themes/seven/templates/status-report-page.html.twig new file mode 100644 index 0000000..27e0d15 --- /dev/null +++ b/core/themes/seven/templates/status-report-page.html.twig @@ -0,0 +1,28 @@ +{# +/** + * @file + * Theme override for the status report page. + * + * Available variables: + * - counters: The list of counter elements. + * - general_info: A render array to create general info element. + * - requirements: A render array to create requirements table. + * + * @see template_preprocess_status_report() + */ +#} +{% if counters|length == 3 %} + {% set element_width_class = ' system-status-report-counters__item--third-width' %} +{% elseif counters|length == 2 %} + {% set element_width_class = ' system-status-report-counters__item--half-width' %} +{% endif %} +
+ {% for counter in counters %} +
+ {{ counter }} +
+ {% endfor %} +
+ +{{ general_info }} +{{ requirements }} diff --git a/core/themes/seven/templates/status-report.html.twig b/core/themes/seven/templates/status-report.html.twig new file mode 100644 index 0000000..c5d6303 --- /dev/null +++ b/core/themes/seven/templates/status-report.html.twig @@ -0,0 +1,50 @@ +{# +/** + * @file + * Theme override to display status report. + * + * - grouped_requirements: Contains grouped requirements. + * Each group contains: + * - title: The title of the group. + * - type: The severity of the group. + * - items: The requirement instances. + * Each requirement item contains: + * - title: The title of the requirement. + * - value: (optional) The requirement's status. + * - description: (optional) The requirement's description. + * - severity_title: The title of the severity. + * - severity_status: Indicates the severity status. + */ +#} +{{ attach_library('core/drupal.collapse') }} +{{ attach_library('seven/drupal.responsive-detail') }} + +
+ {% for group in grouped_requirements %} +
+

{{ group.title }}

+ {% for requirement in group.items %} +
+ {% + set summary_classes = [ + 'system-status-report__status-title', + group.type in ['warning', 'error'] ? 'system-status-report__status-icon system-status-report__status-icon--' ~ group.type + ] + %} + + {% if requirement.severity_title %} + {{ requirement.severity_title }} + {% endif %} + {{ requirement.title }} + +
+ {{ requirement.value }} + {% if requirement.description %} +
{{ requirement.description }}
+ {% endif %} +
+
+ {% endfor %} +
+ {% endfor %} +
diff --git a/core/themes/stable/css/system/components/system-status-report-counters.css b/core/themes/stable/css/system/components/system-status-report-counters.css new file mode 100644 index 0000000..1a4e240 --- /dev/null +++ b/core/themes/stable/css/system/components/system-status-report-counters.css @@ -0,0 +1,27 @@ +/** + * @file + * Styles for the system status report counters. + */ + +.system-status-report-counters__item { + width: 100%; + padding: .5em 0; + text-align: center; + white-space: nowrap; + background-color: rgba(0, 0, 0, 0.063); + margin-bottom: .5em; +} + +@media screen and (min-width: 60em) { + .system-status-report-counters { + flex-wrap: wrap; + display: flex; + justify-content: space-between; + } + .system-status-report-counters__item--half-width { + width: 49%; + } + .system-status-report-counters__item--third-width { + width: 33%; + } +} diff --git a/core/themes/stable/css/system/components/system-status-report-general-info.css b/core/themes/stable/css/system/components/system-status-report-general-info.css new file mode 100644 index 0000000..8334d4d --- /dev/null +++ b/core/themes/stable/css/system/components/system-status-report-general-info.css @@ -0,0 +1,14 @@ +/** + * @file + * Default styles for the System Status general info. + */ + +.system-status-general-info__item { + border: 1px solid #ccc; + margin-top: 1em; + padding: 0 1em 1em; +} + +.system-status-general-info__item-title { + border-bottom: 1px solid #ccc; +} diff --git a/core/themes/stable/stable.info.yml b/core/themes/stable/stable.info.yml index 7e585b1..f1b423e 100644 --- a/core/themes/stable/stable.info.yml +++ b/core/themes/stable/stable.info.yml @@ -175,6 +175,8 @@ libraries-override: css/components/reset-appearance.module.css: css/system/components/reset-appearance.module.css css/components/resize.module.css: css/system/components/resize.module.css css/components/sticky-header.module.css: css/system/components/sticky-header.module.css + css/components/system-status-report-counters.css: css/system/components/system-status-report-counters.css + css/components/system-status-report-general-info.css: css/system/components/system-status-report-general-info.css css/components/tabledrag.module.css: css/system/components/tabledrag.module.css css/components/tablesort.module.css: css/system/components/tablesort.module.css css/components/tree-child.module.css: css/system/components/tree-child.module.css diff --git a/core/themes/stable/templates/admin/status-report-counter.html.twig b/core/themes/stable/templates/admin/status-report-counter.html.twig new file mode 100644 index 0000000..df0d59b --- /dev/null +++ b/core/themes/stable/templates/admin/status-report-counter.html.twig @@ -0,0 +1,16 @@ +{# +/** + * @file + * Theme override for the status report counter. + * + * Available variables: + * - amount: The number shown on counter. + * - text: The text shown on counter. + * - severity: The severity of the counter. + * + * @ingroup themable + */ +#} +{{ amount }} {{ text }} +
+{{ text }} Details diff --git a/core/themes/stable/templates/admin/status-report-general-info.html.twig b/core/themes/stable/templates/admin/status-report-general-info.html.twig new file mode 100644 index 0000000..6c0e450 --- /dev/null +++ b/core/themes/stable/templates/admin/status-report-general-info.html.twig @@ -0,0 +1,81 @@ +{# +/** + * @file + * Theme override for the status report general info. + * + * Available variables: + * - drupal: The status of Drupal installation: + * - value: The current status of Drupal installation. + * - description: The description for current status of Drupal installation. + * - cron: The status of cron: + * - value: The current status of cron. + * - description: The description for current status of cron. + * - cron.run_cron: An array to render a button for running cron. + * - database_system: The status of database system: + * - value: The current status of database sytem. + * - description: The description for current status of cron. + * - database_system_version: The info about current database version: + * - value: The current version of database. + * - description: The description for current version of database. + * - php: The current version of PHP: + * - value: The status of currently installed PHP version. + * - description: The description for current installed PHP version. + * - php_memory_limit: The info about current PHP memory limit: + * - value: The status of currently set PHP memory limit. + * - description: The description for currently set PHP memory limit. + * - webserver: The info about currently installed web server: + * - value: The status of currently installed web server. + * - description: The description for the status of currently installed web + * server. + */ +#} + +

{{ 'General System Information'|t }}

+
+

{{ 'Drupal Version'|t }}

+ {{ drupal.value }} + {% if drupal.description %} + {{ drupal.description }} + {% endif %} +
+
+

{{ 'Last Cron Run'|t }}

+ {{ cron.value }} + {% if cron.run_cron %} + {{ cron.run_cron }} + {% endif %} + {% if cron.description %} + {{ cron.description }} + {% endif %} +
+
+

{{ 'Web Server'|t }}

+ {{ webserver.value }} + {% if webserver.description %} + {{ webserver.description }} + {% endif %} +
+
+

{{ 'PHP'|t }}

+ {{ 'Version'|t }}
{{ php.value }} + {% if php.description %} + {{ php.description }} + {% endif %} +
+ {{ 'Memory limit'|t }}
{{ php_memory_limit.value }} + {% if php_memory_limit.description %} + {{ php_memory_limit.description }} + {% endif %} +
+
+

{{ 'Database'|t }}

+ {{ 'Version'|t }}
{{ database_system_version.value }} + {% if database_system_version.description %} + {{ database_system_version.description }} + {% endif %} +
+ {{ 'System'|t }}
{{ database_system.value }} + {% if database_system.description %} + {{ database_system.description }} + {% endif %} +
diff --git a/core/themes/stable/templates/admin/status-report-page.html.twig b/core/themes/stable/templates/admin/status-report-page.html.twig new file mode 100644 index 0000000..27e0d15 --- /dev/null +++ b/core/themes/stable/templates/admin/status-report-page.html.twig @@ -0,0 +1,28 @@ +{# +/** + * @file + * Theme override for the status report page. + * + * Available variables: + * - counters: The list of counter elements. + * - general_info: A render array to create general info element. + * - requirements: A render array to create requirements table. + * + * @see template_preprocess_status_report() + */ +#} +{% if counters|length == 3 %} + {% set element_width_class = ' system-status-report-counters__item--third-width' %} +{% elseif counters|length == 2 %} + {% set element_width_class = ' system-status-report-counters__item--half-width' %} +{% endif %} +
+ {% for counter in counters %} +
+ {{ counter }} +
+ {% endfor %} +
+ +{{ general_info }} +{{ requirements }}