You are here

function theme_system_admin_by_module in Drupal 5

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

Theme output of the dashboard page.

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

File

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

Code

function theme_system_admin_by_module($menu_items) {
  $stripe = 0;
  $output = '';
  $container = array();

  // 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 (!$block['position']) {

          // Perform automatic striping.
          $block['position'] = ++$stripe % 2 ? 'left' : 'right';
        }
        $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;
}