diff -u b/core/modules/update/update.report.inc b/core/modules/update/update.report.inc --- b/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -127,6 +127,14 @@ $versions_inner = array(); $security_class = array(); $version_class = array(); + $security_icon = array( + '#theme' => 'image', + '#width' => 18, + '#height' => 18, + '#uri' => 'core/modules/update/images/shield-icon.svg', + '#alt' => t('shield'), + '#title' => t('shield'), + ); if (isset($project['recommended'])) { if ($project['status'] != UPDATE_CURRENT || $project['existing_version'] !== $project['recommended']) { @@ -140,9 +148,6 @@ ) { $security_class[] = 'project-update__version--recommended'; $security_class[] = 'project-update__version---strong'; - if (isset($project['security updates'][0]['security']) && $project['security updates'][0]['security'] == 'covered') { - $security_class[] = 'project-update__version---covered'; - } } else { $version_class[] = 'project-update__version--recommended'; @@ -159,13 +164,11 @@ ) { $version_class[] = 'project-update__version--recommended-strong'; } - if (isset($project['releases'][$project['recommended']]['security']) && $project['releases'][$project['recommended']]['security'] == 'covered') { - $version_class[] = 'project-update__version---covered'; - } $versions_inner[] = array( '#theme' => 'update_version', '#version' => $project['releases'][$project['recommended']], '#title' => t('Recommended version:'), + '#security_icon' => $security_icon, '#attributes' => array('class' => $version_class), ); } @@ -178,6 +181,7 @@ '#theme' => 'update_version', '#version' => $security_update, '#title' => t('Security update:'), + '#security_icon' => $security_icon, '#attributes' => array('class' => $security_class), ); } @@ -189,6 +193,7 @@ '#theme' => 'update_version', '#version' => $project['releases'][$project['latest_version']], '#title' => t('Latest version:'), + '#security_icon' => $security_icon, '#attributes' => array('class' => array('version-latest')), ); } only in patch2: unchanged: --- /dev/null +++ b/core/modules/update/images/shield-icon.svg @@ -0,0 +1,88 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + only in patch2: unchanged: --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -200,7 +200,7 @@ function update_theme() { // We are using template instead of '#type' => 'table' here to keep markup // out of preprocess and allow for easier changes to markup. 'update_version' => array( - 'variables' => array('version' => NULL, 'title' => NULL, 'attributes' => array()), + 'variables' => array('version' => NULL, 'title' => NULL, 'security_icon' => NULL, 'attributes' => array()), 'file' => 'update.report.inc', ), ); only in patch2: unchanged: --- a/core/themes/stable/templates/admin/update-version.html.twig +++ b/core/themes/stable/templates/admin/update-version.html.twig @@ -6,6 +6,7 @@ * Available variables: * - attributes: HTML attributes suitable for a container element. * - title: The title of the project. + * - security_icon: The security coverage icon. * - version: A list of data about the latest released version, containing: * - version: The version number. * - date: The date of the release. @@ -19,6 +20,11 @@
{{ version.version }} ({{ version.date|date('Y-M-d') }}) + {% if version.security == 'covered' %} + + {{ security_icon }} + + {% endif %}