$status) { $row = array( array('data' => $dependency, 'class' => 'component'), theme('features_module_status', $status), ); $rows[] = $row; } $vars['dependencies'] = theme('table', array(t('Dependency'), t('Status')), $rows); $rows = array(); foreach ($vars['components'] as $type => $items) { $row = array( array('data' => $type, 'header' => TRUE), array('data' => $vars['conflicts'][$type], 'header' => TRUE), ); $rows[] = $row; // Add a threshold check for displaying long component lists if (count($items) <= 10) { foreach ($items as $item) { $row = array( array('data' => $item, 'colspan' => 2, 'class' => 'component'), ); $rows[] = $row; } } else { $row = array( array('data' => implode(', ', $items), 'colspan' => 2, 'class' => 'component'), ); $rows[] = $row; } } $components = theme('table', array(), $rows); $vars['components'] = $components; } /** * Themes a module status display. */ function theme_features_module_status($status, $module = NULL) { switch ($status) { case FEATURES_MODULE_ENABLED: $text = !empty($module) ? $module : t('Enabled'); return "{$text}"; case FEATURES_MODULE_DISABLED: $text = !empty($module) ? $module : t('Disabled'); return "{$text}"; case FEATURES_MODULE_MISSING: $text = !empty($module) ? $module : t('Missing'); return "{$text}"; } } /** * Themes a module status display. */ function theme_features_storage($storage) { switch ($storage) { case FEATURES_OVERRIDDEN: return "". t('Overridden') .""; case FEATURES_DEFAULT: return "". t('Default') .""; } } /** * Theme function for displaying form buttons */ function theme_features_form_buttons($element) { drupal_add_css(drupal_get_path('module', 'features') .'/features.css'); $output = drupal_render($element); return !empty($output) ? "
" : ''; } /** * Theme for features management form. */ function theme_features_form($form) { drupal_add_css(drupal_get_path('module', 'features') .'/features.css'); drupal_add_js(drupal_get_path('module', 'features') .'/features.js'); $output = ''; $header = array('', t('Feature'), t('Signature'), t('State'), t('Actions')); $rows = array(); foreach (element_children($form['status']) as $element) { // Yank title & description fields off the form element for // rendering in their own cells. $name = "