Index: modules/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system.module,v retrieving revision 1.330 diff -u -r1.330 system.module --- modules/system.module 5 Jul 2006 11:45:51 -0000 1.330 +++ modules/system.module 6 Jul 2006 10:59:41 -0000 @@ -103,16 +103,24 @@ $items[] = array('path' => 'admin', 'title' => t('administer'), 'access' => user_access('access administration pages'), - 'callback' => 'watchdog_overview', + 'callback' => 'system_main_admin_page', 'weight' => 9); // Themes: - $items[] = array('path' => 'admin/themes', 'title' => t('themes'), + $items[] = array( + 'path' => 'admin/themes', + 'title' => t('themes'), + 'description' => t('Change which theme your site uses or allows users to set.'), 'callback' => 'system_themes', 'access' => $access); - $items[] = array('path' => 'admin/themes/select', 'title' => t('list'), - 'callback' => 'system_themes', 'access' => $access, - 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -1); + $items[] = array( + 'path' => 'admin/themes/select', + 'title' => t('list'), + 'description' => t('Select the default theme.'), + 'callback' => 'system_themes', + 'access' => $access, + 'type' => MENU_DEFAULT_LOCAL_TASK, + 'weight' => -1); $items[] = array('path' => 'admin/themes/settings', 'title' => t('configure'), 'callback' => 'system_theme_settings', 'access' => $access, @@ -132,15 +140,27 @@ } // Modules: - $items[] = array('path' => 'admin/settings', 'title' => t('settings'), - 'callback' => 'system_site_settings', 'access' => $access); + $items[] = array( + 'path' => 'admin/settings', + 'title' => t('settings'), + 'description' => t('Configure general system settings'), + 'callback' => 'system_site_settings', + 'access' => $access); + foreach (module_list() as $name) { if (module_hook($name, 'settings')) { - $items[] = array('path' => 'admin/settings/'. $name, 'title' => t($name)); + $items[] = array( + 'path' => 'admin/settings/'. $name, + 'title' => t($name), + 'description' => "Configuration settings for $name"); // TODO: fix me, prototype only! } } - $items[] = array('path' => 'admin/modules', 'title' => t('modules'), - 'callback' => 'system_modules', 'access' => $access); + $items[] = array( + 'path' => 'admin/modules', + 'title' => t('modules'), + 'description' => t('Configure system modules'), + 'callback' => 'system_modules', + 'access' => $access); } return $items; @@ -245,6 +265,47 @@ return $zones; } +function _system_main_admin_block($mid) { + $menu = menu_get_item($mid); + + if (is_array($menu['children'])) { + $output = "
| '. implode(' ', array_splice($blocks, 0, $middle)) .' | '. implode($blocks) .' |