function theme_views_maintenance_view_status in Views Maintenance 6
Same name and namespace in other branches
- 7 theme/theme.inc \theme_views_maintenance_view_status()
 
Returns HTML for view status.
Parameters
string $status:
Return value
string
1 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 303  - Preprocessing and theming functions for Views Maintenance.
 
Code
function theme_views_maintenance_view_status($status = 'unused') {
  $attributes = array();
  switch ($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>';
}