You are here

function theme_features_module_status in Features 7

Same name and namespace in other branches
  1. 6 theme/theme.inc \theme_features_module_status()
  2. 7.2 theme/theme.inc \theme_features_module_status()

Themes a module status display.

2 theme calls to theme_features_module_status()
features_admin_form in ./features.admin.inc
Form constructor for the features configuration form.
template_preprocess_features_admin_components in theme/theme.inc
Display feature component info

File

theme/theme.inc, line 89

Code

function theme_features_module_status($vars) {
  switch ($vars['status']) {
    case FEATURES_MODULE_ENABLED:
      $text_status = t('Enabled');
      $class = 'admin-enabled';
      break;
    case FEATURES_MODULE_DISABLED:
      $text_status = t('Disabled');
      $class = 'admin-disabled';
      break;
    case FEATURES_MODULE_MISSING:
      $text_status = t('Missing');
      $class = 'admin-missing';
      break;
    case FEATURES_MODULE_CONFLICT:
      $text_status = t('Enabled');
      $class = 'admin-conflict';
      break;
  }
  $text = !empty($vars['module']) ? $vars['module'] . ' (' . $text_status . ')' : $text_status;
  return "<span class=\"{$class}\">{$text}</span>";
}