#906738 by mgifford, markabur, Jeff Burnz: Fixed status report needs identifying icons (WCAG 2.0)
parent
ee99093ebb
commit
97c6a237d4
|
@ -32,12 +32,12 @@ div.admin .expert-link {
|
|||
/**
|
||||
* Status report.
|
||||
*/
|
||||
table.system-status-report th,
|
||||
table.system-status-report tr.merge-up td {
|
||||
padding-right: 30px;
|
||||
table.system-status-report td.status-icon {
|
||||
padding-left: 0;
|
||||
padding-right: 6px;
|
||||
}
|
||||
table.system-status-report th {
|
||||
background-position: 95% 50%;
|
||||
table.system-status-report tr.merge-up td {
|
||||
padding: 0 28px 8px 6px;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -87,36 +87,34 @@ a.module-link-configure {
|
|||
/**
|
||||
* Status report.
|
||||
*/
|
||||
table.system-status-report th {
|
||||
border-bottom: 1px solid #ccc;
|
||||
table.system-status-report td {
|
||||
padding: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
table.system-status-report th,
|
||||
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-position: 5px 50%; /* LTR */
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
table.system-status-report tr.error th {
|
||||
background-image: url(../../misc/watchdog-error.png);
|
||||
table.system-status-report tr.error td.status-icon div {
|
||||
background-image: url(../../misc/message-16-error.png);
|
||||
}
|
||||
table.system-status-report tr.warning th {
|
||||
background-image: url(../../misc/watchdog-warning.png);
|
||||
}
|
||||
table.system-status-report tr.ok th {
|
||||
background-image: url(../../misc/watchdog-ok.png);
|
||||
table.system-status-report tr.warning td.status-icon div {
|
||||
background-image: url(../../misc/message-16-warning.png);
|
||||
}
|
||||
tr.merge-down,
|
||||
tr.merge-down td,
|
||||
tr.merge-down th {
|
||||
tr.merge-down td {
|
||||
border-bottom-width: 0 !important;
|
||||
}
|
||||
tr.merge-up,
|
||||
tr.merge-up td,
|
||||
tr.merge-up th {
|
||||
tr.merge-up td {
|
||||
border-top-width: 0 !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -2492,28 +2492,38 @@ function theme_system_admin_index($variables) {
|
|||
*/
|
||||
function theme_status_report($variables) {
|
||||
$requirements = $variables['requirements'];
|
||||
|
||||
$i = 0;
|
||||
$severities = array(
|
||||
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">';
|
||||
|
||||
foreach ($requirements as $requirement) {
|
||||
if (empty($requirement['#type'])) {
|
||||
$class = ++$i % 2 == 0 ? 'even' : 'odd';
|
||||
|
||||
$classes = array(
|
||||
REQUIREMENT_INFO => 'info',
|
||||
REQUIREMENT_OK => 'ok',
|
||||
REQUIREMENT_WARNING => 'warning',
|
||||
REQUIREMENT_ERROR => 'error',
|
||||
);
|
||||
$class = $classes[isset($requirement['severity']) ? (int) $requirement['severity'] : 0] . ' ' . $class;
|
||||
$severity = $severities[isset($requirement['severity']) ? (int) $requirement['severity'] : 0];
|
||||
$severity['icon'] = '<div title="' . $severity['title'] . '"><span class="element-invisible">' . $severity['title'] . '</span></div>';
|
||||
|
||||
// Output table row(s)
|
||||
if (!empty($requirement['description'])) {
|
||||
$output .= '<tr class="' . $class . ' merge-down"><td>' . $requirement['title'] . '</td><td>' . $requirement['value'] . '</td></tr>';
|
||||
$output .= '<tr class="' . $class . ' merge-up"><td colspan="2">' . $requirement['description'] . '</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="' . $severity['class'] . ' merge-up"><td colspan="3" class="status-description">' . $requirement['description'] . '</td></tr>';
|
||||
}
|
||||
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>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue