diff -u b/core/modules/system/templates/status-report.html.twig b/core/modules/system/templates/status-report.html.twig --- b/core/modules/system/templates/status-report.html.twig +++ b/core/modules/system/templates/status-report.html.twig @@ -11,53 +11,15 @@ * - description: (optional) The requirement's description. * - severity_title: The title of the severity. * - severity_status: Indicates the severity status. - * - error: number of errors found if any - * - warning: number of warnings found if any - * - info: number of items which are neither errors nor warnings + * - error: The number of errors found. + * - warning: The number of warnings found. + * - info: The number of items which are neither errors nor warnings. * * @see template_preprocess_status_report() * * @ingroup themeable */ #} -{% if error != 0 and warning != 0 and info != 0 %} - - - - {{ error }} {{'error'|t }} - - - - - - {{ warning }} {{ 'warning'|t }} - - - - - - {{ info }} {{ 'checked'|t }} - - -{% elseif error != 0 and checked != 0 %} - - {{ error }} {{'error'|t }} - - - {{ info }} {{ 'checked'|t }} - -{% elseif warning != 0 and checked != 0 %} - - {{ warning }} {{ 'warning'|t }} - - - {{ info }} {{ 'checked'|t }} - -{% else %} - - {{ info }} {{ 'checked'|t }} - -{% endif %} {% for requirement in requirements %} diff -u b/core/themes/stable/css/system/system.admin.css b/core/themes/stable/css/system/system.admin.css --- b/core/themes/stable/css/system/system.admin.css +++ b/core/themes/stable/css/system/system.admin.css @@ -357,102 +356,0 @@ - -/** - * Status report. - */ -.system-status-report__status-title { - position: relative; - vertical-align: top; - width: 25%; - padding: 10px 6px; - box-sizing: border-box; - font-weight: normal; -} -.system-status-report__status-icon:before { - content: ""; - background-repeat: no-repeat; - height: 16px; - width: 16px; - display: block; - float: left; /* LTR */ -} -[dir="rtl"] .system-status-report__status-icon:before { - float: right; -} -.system-status-report .system-status-report__status-icon:before { - margin-right: 10px; /* LTR */ -} -[dir="rtl"] .system-status-report .system-status-report__status-icon:before { - margin-left: 10px; -} -.system-status-report__status-icon--error:before { - background-image: url(../../images/core/icons/e32700/error.svg); -} -.system-status-report__status-icon--warning:before { - background-image: url(../../images/core/icons/e29700/warning.svg); -} -.system-status-report__status-icon--checked:before { - background-image: url(../../images/core/icons/73b355/check.svg); -} -.system-status-report-counter { - border: 1px solid #e6e4df; - margin: 10px 15px 20px 0; /* LTR */ - border-radius: 5px; - height: 85px; - vertical-align: middle; - line-height: 85px; - font-size: 20px; - font-weight: bold; -} -[dir="rtl"].system-status-report-counter { - margin: 10px 0 20px 15px; -} -[dir="ltr"] .system-status-report-counter:nth-child(3) { - margin-right: 0; -} -[dir="rtl"] .system-status-report-counter:nth-child(1) { - margin-right: 0; -} -span.all-exits.system-status-report-counter { - width: 32.1%; - display: inline-block; -} -.system-status-report-counter .system-status-report__status-icon:before { - background-size: 35px; - background-position: 50% center; - width: 100%; - height: 100%; - left: 0; - top: 0; -} -.system-status-report-counter .system-status-report__status-icon { - display: inline-block; - height: 85px; - border-right: 1px solid #e6e4df; /* LTR */ - border-left: 0; /* LTR */ -} -[dir="rtl"] .system-status-report-counter .system-status-report__status-icon { - border-right: 0; - border-left: 1px solid #e6e4df; -} -.er-wr-detail { - display: inline-block; - padding: 0 5px; - height: 85px; -} -/** - * Status report for mobile. - */ -@media screen and (max-width: 48em) { - [dir="rtl"] .system-status-report__status-icon:before { - right: 0; - } - span.all-exits.system-status-report-counter { - width: 100%; - } - .system-status-report-counter { - margin: 10px 0; - } - .system-status-report { - table-layout: fixed; - word-wrap: break-word; - } -} diff -u b/core/themes/stable/templates/admin/status-report.html.twig b/core/themes/stable/templates/admin/status-report.html.twig --- b/core/themes/stable/templates/admin/status-report.html.twig +++ b/core/themes/stable/templates/admin/status-report.html.twig @@ -11,51 +11,13 @@ * - description: (optional) The requirement's description. * - severity_title: The title of the severity. * - severity_status: Indicates the severity status. - * - error: number of errors found if any - * - warning: number of warnings found if any - * - info: number of items which are neither errors nor warnings + * - error: The number of errors found. + * - warning: The number of warnings found. + * - info: The number of items which are neither errors nor warnings. * * @see template_preprocess_status_report() */ #} -{% if error != 0 and warning != 0 and info != 0 %} - - - - {{ error }} {{'error'|t }} - - - - - - {{ warning }} {{ 'warning'|t }} - - - - - - {{ info }} {{ 'checked'|t }} - - - {% elseif error != 0 and checked != 0 %} - - {{ error }} {{'error'|t }} - - - {{ info }} {{ 'checked'|t }} - - {% elseif warning != 0 and checked != 0 %} - - {{ warning }} {{ 'warning'|t }} - - - {{ info }} {{ 'checked'|t }} - - {% else %} - - {{ info }} {{ 'checked'|t }} - -{% endif %}
{% for requirement in requirements %} only in patch2: unchanged: --- /dev/null +++ b/core/themes/seven/css/components/counter.css @@ -0,0 +1,70 @@ +/** + * @file + * Styles for counter component. + */ + +.counter { + border: 1px solid #e6e4df; + border-radius: 5px; + height: 85px; + vertical-align: middle; + line-height: 85px; + font-size: 20px; + font-weight: bold; + display: inline-block; + width: 100%; +} + +.counter__status-title { + position: relative; + vertical-align: top; + width: 25%; + padding: 10px 6px; + box-sizing: border-box; + font-weight: normal; +} + +.counter__status-icon { + display: inline-block; + height: 85px; + border-right: 1px solid #e6e4df; /* LTR */ + border-left: 0; /* LTR */ +} +[dir="rtl"] .counter__status-icon { + border-right: 0; + border-left: 1px solid #e6e4df; +} +.counter__status-icon:before { + content: ""; + background-size: 35px; + background-position: 50% center; + background-repeat: no-repeat; + width: 100%; + height: 100%; + display: block; + float: left; /* LTR */ +} +[dir="rtl"] .counter__status-icon:before { + float: right; +} +.counter__status-icon:before { + margin-right: 10px; /* LTR */ +} +[dir="rtl"] .counter__status-icon:before { + margin-left: 10px; +} +.counter__status-icon--error:before { + background-image: url(../../../stable/images/core/icons/e32700/error.svg); +} +.counter__status-icon--warning:before { + background-image: url(../../../stable/images/core/icons/e29700/warning.svg); +} +.counter__status-icon--checked:before { + background-image: url(../../../stable/images/core/icons/73b355/check.svg); +} + +.counter__details { + display: inline-block; + padding: 0 5px; + height: 85px; +} only in patch2: unchanged: --- /dev/null +++ b/core/themes/seven/css/components/system-status-report-counters.css @@ -0,0 +1,31 @@ +/** + * @file + * Styles for the system status report counters. + */ + +.system-status-report-counters { + display: flex; + justify-content: space-between; +} + +.system-status-report-counters__item { + margin: 10px 0 20px 0; + width: 100%; +} +.system-status-report-counters__item--half-width { + width: 49%; +} +.system-status-report-counters__item--third-width { + width: 32%; +} + +@media screen and (max-width: 48em) { + .system-status-report-counters { + display: block; + } + .system-status-report-counters__item { + margin: 10px 0; + width: 100%; + } +} + only in patch2: unchanged: --- a/core/themes/seven/css/components/system-status-report.css +++ b/core/themes/seven/css/components/system-status-report.css @@ -13,3 +13,10 @@ .system-status-report__entry:last-child { border-bottom: 1px solid #bebfb9; } + +@media screen and (max-width: 48em) { + .system-status-report { + table-layout: fixed; + word-wrap: break-word; + } +} only in patch2: unchanged: --- a/core/themes/seven/seven.libraries.yml +++ b/core/themes/seven/seven.libraries.yml @@ -11,6 +11,7 @@ global-styling: css/components/breadcrumb.css: {} css/components/buttons.css: {} css/components/colors.css: {} + css/components/counter.css: {} css/components/messages.css: {} css/components/dropbutton.component.css: {} css/components/entity-meta.css: {} @@ -28,6 +29,7 @@ global-styling: css/components/search-admin-settings.css: {} css/components/tablesort-indicator.css: {} css/components/system-status-report.css: {} + css/components/system-status-report-counters.css: {} css/components/tabs.css: {} css/components/views-ui.css: {} layout: only in patch2: unchanged: --- /dev/null +++ b/core/themes/seven/templates/status-report.html.twig @@ -0,0 +1,77 @@ +{# +/** + * @file + * Theme override 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. + * - error: The number of errors found. + * - warning: The number of warnings found. + * - info: The number of items which are neither errors nor warnings. + * + * @see template_preprocess_status_report() + */ +#} +{% if error != 0 and warning != 0 and info != 0 %} + {% set element_width_class = ' system-status-report-counters__item--third-width' %} +{% elseif error != 0 or warning != 0 %} + {% set element_width_class = ' system-status-report-counters__item--half-width' %} +{% endif %} +
+ {% if error %} +
+ + + + {{ error }} {{'error'|t }} + + +
+ {% endif %} + {% if warning %} +
+ + + + {{ warning }} {{ 'warning'|t }} + + +
+ {% endif %} +
+ + + + {{ info }} {{ 'checked'|t }} + + +
+
+
+ + {% for requirement in requirements %} + + {% if requirement.severity_status in ['warning', 'error'] %} + + + + {% endfor %} + +
+ {{ requirement.severity_title }} + {% else %} + + {% endif %} + {{ requirement.title }} + + {{ requirement.value }} + {% if requirement.description %} +
{{ requirement.description }}
+ {% endif %} +