diff --git a/core/modules/update/css/update.admin.theme.css b/core/modules/update/css/update.admin.theme.css index abf0a88..391c729 100644 --- a/core/modules/update/css/update.admin.theme.css +++ b/core/modules/update/css/update.admin.theme.css @@ -61,3 +61,7 @@ .project-update__version--recommended-strong .project-update__version-title { font-weight: bold; } + +.project-update__update { + padding: 0.5em; +} diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc index dd2494f..8d1caf8 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -62,8 +62,8 @@ function template_preprocess_update_report(&$variables) { // Build project rows. if (!isset($rows[$project['project_type']])) { $rows[$project['project_type']] = array( - '#type' => 'table', - '#attributes' => array('class' => array('update')), + '#type' => 'container', + '#attributes' => ['class' => ['project-update__update']], ); } $row_key = !empty($project['title']) ? Unicode::strtolower($project['title']) : Unicode::strtolower($project['name']); @@ -72,20 +72,23 @@ function template_preprocess_update_report(&$variables) { $rows[$project['project_type']][$row_key]['status'] = $project_status; // Add project status class attribute to the table row. + //var_dump($project); switch ($project['status']) { case UPDATE_CURRENT: + $rows[$project['project_type']]['#attributes']['class'][] = 'color-success'; + break; case UPDATE_UNKNOWN: case UPDATE_FETCH_PENDING: case UPDATE_NOT_FETCHED: case UPDATE_NOT_SECURE: case UPDATE_REVOKED: case UPDATE_NOT_SUPPORTED: - $rows[$project['project_type']][$row_key]['#attributes'] = array('class' => array('color-error')); + $rows[$project['project_type']]['#attributes']['class'][] = 'color-error'; break; case UPDATE_NOT_CHECKED: case UPDATE_NOT_CURRENT: default: - $rows[$project['project_type']][$row_key]['#attributes'] = array('class' => array('color-warning')); + $rows[$project['project_type']]['#attributes']['class'][] = 'color-warning'; break; } }