You are here

function theme_system_themes in Drupal 4

Same name and namespace in other branches
  1. 5 modules/system/system.module \theme_system_themes()

File

modules/system.module, line 841
Configuration system that lets administrators modify the workings of the site.

Code

function theme_system_themes($form) {
  foreach (element_children($form) as $key) {
    $row = array();
    if (is_array($form[$key]['description'])) {
      $row[] = form_render($form[$key]['screenshot']);
      $row[] = form_render($form[$key]['description']);
      $row[] = array(
        'data' => form_render($form['status'][$key]),
        'align' => 'center',
      );
      if ($form['theme_default']) {
        $row[] = array(
          'data' => form_render($form['theme_default'][$key]),
          'align' => 'center',
        );
        $row[] = array(
          'data' => form_render($form[$key]['operations']),
          'align' => 'center',
        );
      }
    }
    $rows[] = $row;
  }
  $header = array(
    t('Screenshot'),
    t('Name'),
    t('Enabled'),
    t('Default'),
    t('Operations'),
  );
  $output = theme('table', $header, $rows);
  $output .= form_render($form);
  return $output;
}