You are here

function theme_content_admin_display_overview_form in Content Construction Kit (CCK) 5

Same name and namespace in other branches
  1. 6 includes/content.admin.inc \theme_content_admin_display_overview_form()

File

./content_admin.inc, line 374
Administrative interface for content type creation.

Code

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