You are here

function theme_system_modules_uninstall in Drupal 5

Same name and namespace in other branches
  1. 6 modules/system/system.admin.inc \theme_system_modules_uninstall()
  2. 7 modules/system/system.admin.inc \theme_system_modules_uninstall()

Themes a table of currently disabled modules.

Parameters

$form The form array representing the currently disabled modules.:

Return value

An HTML string representing the table.

File

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

Code

function theme_system_modules_uninstall($form) {

  // No theming for the confirm form.
  if (isset($form['confirm'])) {
    return drupal_render($form);
  }

  // Table headers.
  $header = array(
    t('Uninstall'),
    t('Name'),
    t('Description'),
  );

  // Display table.
  $rows = array();
  foreach (element_children($form['modules']) as $module) {
    $rows[] = array(
      array(
        'data' => drupal_render($form['uninstall'][$module]),
        'align' => 'center',
      ),
      '<strong>' . drupal_render($form['modules'][$module]['name']) . '</strong>',
      array(
        'data' => drupal_render($form['modules'][$module]['description']),
        'class' => 'description',
      ),
    );
  }

  // Only display table if there are modules that can be uninstalled.
  if (!count($rows)) {
    $rows[] = array(
      array(
        'data' => t('No modules are available to uninstall.'),
        'colspan' => '3',
        'align' => 'center',
        'class' => 'message',
      ),
    );
  }
  $output = theme('table', $header, $rows);
  $output .= drupal_render($form);
  return $output;
}