You are here

function theme_fieldgroup_display_overview_form in Content Construction Kit (CCK) 5

File

./fieldgroup.module, line 510
Create field groups for CCK fields.

Code

function theme_fieldgroup_display_overview_form($form) {
  $header = array(
    t('Group'),
    t('Label'),
  );
  foreach (_content_admin_display_contexts() as $key => $title) {
    $header[] = $title;
  }
  $rows = array();
  foreach (element_children($form) as $group) {
    $row = array();
    foreach (element_children($form[$group]) as $key) {
      $row[] = drupal_render($form[$group][$key]);
    }
    $rows[] = $row;
  }
  $output = '';
  if (!empty($rows)) {
    $output = theme('table', $header, $rows, array(
      'class' => 'content-group-display-overview',
    ));
  }
  $output .= drupal_render($form);
  return $output;
}