You are here

function theme_system_admin_by_module in Drupal 6

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

Theme output of the dashboard page.

Parameters

$menu_items: An array of modules to be displayed.

Related topics

1 theme call to theme_system_admin_by_module()
system_admin_by_module in modules/system/system.admin.inc
Menu callback; prints a listing of admin tasks for each installed module.

File

modules/system/system.admin.inc, line 1960
Admin page callbacks for the system module.

Code

function theme_system_admin_by_module($menu_items) {
  $stripe = 0;
  $output = '';
  $container = array(
    'left' => '',
    'right' => '',
  );
  $flip = array(
    'left' => 'right',
    'right' => 'left',
  );
  $position = 'left';

  // Iterate over all modules
  foreach ($menu_items as $module => $block) {
    list($description, $items) = $block;

    // Output links
    if (count($items)) {
      $block = array();
      $block['title'] = $module;
      $block['content'] = theme('item_list', $items);
      $block['description'] = t($description);
      if ($block_output = theme('admin_block', $block)) {
        if (!isset($block['position'])) {

          // Perform automatic striping.
          $block['position'] = $position;
          $position = $flip[$position];
        }
        $container[$block['position']] .= $block_output;
      }
    }
  }
  $output = '<div class="admin clear-block">';
  foreach ($container as $id => $data) {
    $output .= '<div class="' . $id . ' clear-block">';
    $output .= $data;
    $output .= '</div>';
  }
  $output .= '</div>';
  return $output;
}