diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-01 15:24:18 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-01 15:24:18 +0000 |
commit | 0223bf1dc25a77671618733ee7e76fba958013d8 (patch) | |
tree | d29511cef00d788181792453651387bd959fb215 /modules/help | |
parent | 337dbc4f8db4144bb2392dbd95017f4733946372 (diff) | |
download | brdo-0223bf1dc25a77671618733ee7e76fba958013d8.tar.gz brdo-0223bf1dc25a77671618733ee7e76fba958013d8.tar.bz2 |
#699858 by David_Rothstein, catch, yoroy, sun, ronald_istos, et al: Fix admin/by-task is confusing because it looks too similar to admin/config. Makes admin/by-task a very minimal view, and makes admin/by-module a more fully fledged index.
Diffstat (limited to 'modules/help')
-rw-r--r-- | modules/help/help.admin.inc | 16 | ||||
-rw-r--r-- | modules/help/help.module | 1 |
2 files changed, 10 insertions, 7 deletions
diff --git a/modules/help/help.admin.inc b/modules/help/help.admin.inc index 568a5ad2f..1dec032f4 100644 --- a/modules/help/help.admin.inc +++ b/modules/help/help.admin.inc @@ -22,12 +22,12 @@ function help_main() { function help_page($name) { $output = ''; if (module_hook($name, 'help')) { - $module = drupal_parse_info_file(drupal_get_path('module', $name) . '/' . $name . '.info'); - drupal_set_title($module['name']); + $info = system_get_info('module'); + drupal_set_title($info[$name]['name']); $temp = module_invoke($name, 'help', "admin/help#$name", drupal_help_arg()); if (empty($temp)) { - $output .= t("No help is available for module %module.", array('%module' => $module['name'])); + $output .= t("No help is available for module %module.", array('%module' => $info[$name]['name'])); } else { $output .= $temp; @@ -35,12 +35,14 @@ function help_page($name) { // Only print list of administration pages if the module in question has // any such pages associated to it. - $admin_tasks = system_get_module_admin_tasks($name); + $admin_tasks = system_get_module_admin_tasks($name, $info[$name]); if (!empty($admin_tasks)) { - ksort($admin_tasks); - $output .= theme('item_list', array('items' => $admin_tasks, 'title' => t('@module administration pages', array('@module' => $module['name'])))); + $links = array(); + foreach ($admin_tasks as $task) { + $links[] = l($task['title'], $task['link_path'], $task['localized_options']); + } + $output .= theme('item_list', array('items' => $links, 'title' => t('@module administration pages', array('@module' => $info[$name]['name'])))); } - } return $output; } diff --git a/modules/help/help.module b/modules/help/help.module index 2c964d7bf..d6b06e888 100644 --- a/modules/help/help.module +++ b/modules/help/help.module @@ -25,6 +25,7 @@ function help_menu() { 'page callback' => 'help_page', 'page arguments' => array(2), 'access arguments' => array('access administration pages'), + 'type' => MENU_VISIBLE_IN_BREADCRUMB, 'file' => 'help.admin.inc', ); } |