function theme_views_maintenance_display_status in Views Maintenance 6
Same name and namespace in other branches
- 7 theme/theme.inc \theme_views_maintenance_display_status()
Returns HTML for display status.
Parameters
string $status:
Return value
string
1 theme call to theme_views_maintenance_display_status()
- template_preprocess_views_maintenance_views_table in theme/
theme.inc - Prepares views info for output and includes required CSS/JS.
File
- theme/
theme.inc, line 266 - Preprocessing and theming functions for Views Maintenance.
Code
function theme_views_maintenance_display_status($status = 'unused') {
$attributes = array();
switch ($status) {
case 'broken':
$attributes['class'] = 'error broken';
$attributes['title'] = t("Display is broken! Immediate attention is required.");
$value = t('Broken!');
break;
case 'ok':
$attributes['class'] = 'ok';
$attributes['title'] = t("Display is in use and shouldn't be removed.");
$value = t('OK');
break;
case 'maybe':
$attributes['class'] = 'warning';
$attributes['title'] = t("Display is probably used somewhere, but we can't be sure.");
$value = t('Probably unused');
break;
default:
// unused
$attributes['class'] = 'error';
$attributes['title'] = t("Looks like display isn't used.");
$value = t('Unused');
break;
}
return '<span' . drupal_attributes($attributes) . '>' . $value . '</span>';
}