You are here

function theme_locale_admin_manage_screen in Drupal 5

Same name and namespace in other branches
  1. 4 includes/locale.inc \theme_locale_admin_manage_screen()

Theme the locale admin manager form.

File

includes/locale.inc, line 88
Admin-related functions for locale.module.

Code

function theme_locale_admin_manage_screen($form) {
  foreach ($form['name'] as $key => $element) {

    // Do not take form control structures.
    if (is_array($element) && element_child($key)) {
      $rows[] = array(
        check_plain($key),
        drupal_render($form['name'][$key]),
        drupal_render($form['enabled'][$key]),
        drupal_render($form['site_default'][$key]),
        $key != 'en' ? drupal_render($form['translation'][$key]) : t('n/a'),
        $key != 'en' ? l(t('delete'), 'admin/settings/locale/language/delete/' . $key) : '',
      );
    }
  }
  $header = array(
    array(
      'data' => t('Code'),
    ),
    array(
      'data' => t('English name'),
    ),
    array(
      'data' => t('Enabled'),
    ),
    array(
      'data' => t('Default'),
    ),
    array(
      'data' => t('Translated'),
    ),
    array(
      'data' => t('Operations'),
    ),
  );
  $output = theme('table', $header, $rows);
  $output .= drupal_render($form);
  return $output;
}