#906738 by mgifford, markabur, Jeff Burnz: Fixed status report needs identifying icons (WCAG 2.0)

merge-requests/26/head
Angie Byron 2010-10-09 05:18:53 +00:00
parent ee99093ebb
commit 97c6a237d4
3 changed files with 46 additions and 38 deletions

View File

@ -32,12 +32,12 @@ div.admin .expert-link {
/** /**
* Status report. * Status report.
*/ */
table.system-status-report th, table.system-status-report td.status-icon {
table.system-status-report tr.merge-up td { padding-left: 0;
padding-right: 30px; padding-right: 6px;
} }
table.system-status-report th { table.system-status-report tr.merge-up td {
background-position: 95% 50%; padding: 0 28px 8px 6px;
} }
/** /**

View File

@ -87,36 +87,34 @@ a.module-link-configure {
/** /**
* Status report. * Status report.
*/ */
table.system-status-report th { table.system-status-report td {
border-bottom: 1px solid #ccc; padding: 6px;
vertical-align: middle;
} }
table.system-status-report th,
table.system-status-report tr.merge-up td { table.system-status-report tr.merge-up td {
padding-left: 30px; /* LTR */ padding: 0 6px 8px 28px; /* LTR */
} }
table.system-status-report th { table.system-status-report td.status-icon {
width: 16px;
padding-right: 0; /* LTR */
}
table.system-status-report td.status-icon div {
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 5px 50%; /* LTR */ height: 16px;
padding-top: 6px; width: 16px;
padding-bottom: 6px;
} }
table.system-status-report tr.error th { table.system-status-report tr.error td.status-icon div {
background-image: url(../../misc/watchdog-error.png); background-image: url(../../misc/message-16-error.png);
} }
table.system-status-report tr.warning th { table.system-status-report tr.warning td.status-icon div {
background-image: url(../../misc/watchdog-warning.png); background-image: url(../../misc/message-16-warning.png);
}
table.system-status-report tr.ok th {
background-image: url(../../misc/watchdog-ok.png);
} }
tr.merge-down, tr.merge-down,
tr.merge-down td, tr.merge-down td {
tr.merge-down th {
border-bottom-width: 0 !important; border-bottom-width: 0 !important;
} }
tr.merge-up, tr.merge-up,
tr.merge-up td, tr.merge-up td {
tr.merge-up th {
border-top-width: 0 !important; border-top-width: 0 !important;
} }

View File

@ -2492,28 +2492,38 @@ function theme_system_admin_index($variables) {
*/ */
function theme_status_report($variables) { function theme_status_report($variables) {
$requirements = $variables['requirements']; $requirements = $variables['requirements'];
$severities = array(
$i = 0; REQUIREMENT_INFO => array(
'title' => t('Info'),
'class' => 'info',
),
REQUIREMENT_OK => array(
'title' => t('OK'),
'class' => 'ok',
),
REQUIREMENT_WARNING => array(
'title' => t('Warning'),
'class' => 'warning',
),
REQUIREMENT_ERROR => array(
'title' => t('Error'),
'class' => 'error',
),
);
$output = '<table class="system-status-report">'; $output = '<table class="system-status-report">';
foreach ($requirements as $requirement) { foreach ($requirements as $requirement) {
if (empty($requirement['#type'])) { if (empty($requirement['#type'])) {
$class = ++$i % 2 == 0 ? 'even' : 'odd'; $severity = $severities[isset($requirement['severity']) ? (int) $requirement['severity'] : 0];
$severity['icon'] = '<div title="' . $severity['title'] . '"><span class="element-invisible">' . $severity['title'] . '</span></div>';
$classes = array(
REQUIREMENT_INFO => 'info',
REQUIREMENT_OK => 'ok',
REQUIREMENT_WARNING => 'warning',
REQUIREMENT_ERROR => 'error',
);
$class = $classes[isset($requirement['severity']) ? (int) $requirement['severity'] : 0] . ' ' . $class;
// Output table row(s) // Output table row(s)
if (!empty($requirement['description'])) { if (!empty($requirement['description'])) {
$output .= '<tr class="' . $class . ' merge-down"><td>' . $requirement['title'] . '</td><td>' . $requirement['value'] . '</td></tr>'; $output .= '<tr class="' . $severity['class'] . ' merge-down"><td class="status-icon">' . $severity['icon'] . '</td><td class="status-title">' . $requirement['title'] . '</td><td class="status-value">' . $requirement['value'] . '</td></tr>';
$output .= '<tr class="' . $class . ' merge-up"><td colspan="2">' . $requirement['description'] . '</td></tr>'; $output .= '<tr class="' . $severity['class'] . ' merge-up"><td colspan="3" class="status-description">' . $requirement['description'] . '</td></tr>';
} }
else { else {
$output .= '<tr class="' . $class . '"><td>' . $requirement['title'] . '</td><td>' . $requirement['value'] . '</td></tr>'; $output .= '<tr class="' . $severity['class'] . '"><td class="status-icon">' . $severity['icon'] . '</td><td class="status-title">' . $requirement['title'] . '</td><td class="status-value">' . $requirement['value'] . '</td></tr>';
} }
} }
} }