You are here

function theme_ajax_ui_admin in Ajax 6

Theme for admin screen

File

ajax_ui/ajax_ui.module, line 232

Code

function theme_ajax_ui_admin($form) {
  $header = array();
  $rows = array();
  $header[] = t('Form Name');
  foreach ($form['#admin_options'] as $admin_option) {
    $header[] = $admin_option['#value'];
  }
  foreach (element_children($form['types']) as $type) {
    $row = array();
    if (is_array($form['types'][$type])) {
      $row[] = array(
        'data' => drupal_render($form['types'][$type]),
      );
      foreach (element_children($form['checkboxes'][$type]) as $option) {
        $row[] = array(
          'data' => drupal_render($form['checkboxes'][$type][$option]),
        );
      }
      $rows[] = $row;
    }
  }
  $output = theme('table', $header, $rows);
  $output .= drupal_render($form);
  return $output;
}