Index: system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.30 diff -u -r1.30 system.admin.inc --- system.admin.inc 27 Nov 2007 21:06:28 -0000 1.30 +++ system.admin.inc 1 Dec 2007 22:58:30 -0000 @@ -585,6 +585,19 @@ // Create storage for disabled modules as browser will disable checkboxes. $form['disabled_modules'] = array('#type' => 'value', '#value' => array()); + + // Create links for module dashboard + $forms['module_menu'] = array('#type' => 'value', '#value' => array()); + + // Retrieve help links that 'help' knows about + $help_menu = module_invoke('help', 'menu'); + $help_links = array(); + if (is_array($help_menu)) { + foreach ($help_menu as $path => $info) { + if (!isset($info['title'])) continue; + $help_links[$info['title']] = $path; + } + } // Traverse the files, checking for compatibility $incompatible_core = array(); @@ -621,6 +634,19 @@ if ($file->throttle) { $throttle[] = $file->name; } + $menu = module_invoke($filename, 'menu'); + if (isset($help_links[$filename])) { + $form['module_menu']['#value'][$filename][$help_links[$filename]] = t('Help'); + } + if (is_array($menu) && $filename !== 'help') { + foreach ($menu as $path => $info) { + // ignore non-admin paths + if (strpos($path, 'admin/') !== 0) continue; + if (!isset($info['title'])) continue; + if (strpos($path, '%') !== false) continue; // % is found in + $form['module_menu']['#value'][$filename][$path] = $info['title']; + } + } $dependencies = array(); // Check for missing dependencies. @@ -716,7 +742,6 @@ '#value' => t('Save configuration'), ); $form['#action'] = url('admin/build/modules/list/confirm'); - return $form; } @@ -1931,6 +1956,14 @@ foreach ($modules as $key => $module) { $row = array(); $description = drupal_render($form['description'][$key]); + if (isset($form['module_menu']['#value'][$key])) { + // add module links + $temp = array(); + foreach ($form['module_menu']['#value'][$key] as $url => $name) { + $temp[] = '' . t($name) . ''; + } + $description .= '
'; + } if (isset($form['status']['#incompatible_modules_core'][$key])) { unset($form['status'][$key]); $status = theme('image', 'misc/watchdog-error.png', t('incompatible'), t('Incompatible with this version of Drupal core')); @@ -1963,7 +1996,11 @@ $row[] = drupal_render($form['version'][$key]); $row[] = array('data' => $description, 'class' => 'description'); - $rows[] = $row; + + $extended_row = array('data' => $row); + if ($form['status'][$key]['#value']) $extended_row['class'] = 'enabled'; + + $rows[] = $extended_row; } $fieldset = array( '#title' => t($package), Index: system.css =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.css,v retrieving revision 1.41 diff -u -r1.41 system.css --- system.css 20 Nov 2007 10:18:43 -0000 1.41 +++ system.css 1 Dec 2007 22:54:17 -0000 @@ -495,6 +495,16 @@ font-weight: bold; } +#system-modules div.menu { + color: #444; + font-size: 0.9em; +} + +#system-modules tr.enabled { + background:#B6EFA4; + border-color:#80CF67; +} + /* ** Styles for the system themes page (admin/build/themes) */