function theme_views_maintenance_view_status in Views Maintenance 7
Same name and namespace in other branches
- 6 theme/theme.inc \theme_views_maintenance_view_status()
Returns HTML for view status.
Parameters
array $vars:
Return value
string
1 theme call to theme_views_maintenance_view_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 310 - Preprocessing and theming functions for Views Maintenance.
Code
function theme_views_maintenance_view_status($vars) {
$attributes = array();
switch ($vars['status']) {
case 'broken':
$attributes['class'] = 'error broken';
$attributes['title'] = t("View is broken! Immediate attention is required.");
$value = t('Broken!');
break;
case 'ok':
$attributes['class'] = 'ok';
$attributes['title'] = t("All displays are used.");
$value = t('OK');
break;
case 'has-maybe':
$attributes['class'] = 'warning';
$attributes['title'] = t("Some displays usage can't be detected.");
$value = t('Probably unused displays');
break;
case 'has-unused':
$attributes['class'] = 'error';
$attributes['title'] = t("Some displays are unused and need your attention.");
$value = t('Unused displays');
break;
default:
// unused
$attributes['class'] = 'error';
$attributes['title'] = t("Looks like view isn't used anywhere and can be removed.");
$value = t('Unused');
break;
}
return '<span' . drupal_attributes($attributes) . '>' . $value . '</span>';
}