You are here

function theme_system_admin_index in Drupal 7

Returns HTML for the output of the dashboard page.

Parameters

$variables: An associative array containing:

  • menu_items: An array of modules to be displayed.

Related topics

1 theme call to theme_system_admin_index()
system_admin_index in modules/system/system.admin.inc
Menu callback; prints a listing of admin tasks, organized by module.

File

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

Code

function theme_system_admin_index($variables) {
  $menu_items = $variables['menu_items'];
  $stripe = 0;
  $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('admin_block_content', array(
        'content' => $items,
      ));
      $block['description'] = t($description);
      $block['show'] = TRUE;
      if ($block_output = theme('admin_block', array(
        'block' => $block,
      ))) {
        if (!isset($block['position'])) {

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