diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-08-10 05:44:17 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-08-10 05:44:17 +0000 |
commit | f99830a4985f4a69ef6ffe96a9f2aca734b450af (patch) | |
tree | ce7637e89ee3fd12adab2927949173c0314a9713 /includes | |
parent | 119f41fb31c5644c403bb58e79e3b6720a8c657c (diff) | |
download | brdo-f99830a4985f4a69ef6ffe96a9f2aca734b450af.tar.gz brdo-f99830a4985f4a69ef6ffe96a9f2aca734b450af.tar.bz2 |
- Patch by Al: improved the admin/help pages (first step).
Diffstat (limited to 'includes')
-rw-r--r-- | includes/menu.inc | 14 | ||||
-rw-r--r-- | includes/theme.inc | 4 |
2 files changed, 14 insertions, 4 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index d1aa3372c..53f1d2085 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -420,10 +420,16 @@ function menu_get_active_help() { return; } - $return = module_invoke_all('help', $path); - foreach ($return as $item) { - if (!empty($item)) { - $output .= $item ."\n"; + foreach (module_list() as $name) { + if (module_hook($name, 'help')) { + if ($temp = module_invoke($name, 'help', $path)) { + $output .= $temp . "\n"; + } + if (substr($path, 0, 6) == "admin/") { + if (module_invoke($name, 'help', 'admin/help#' . substr($path, 6))) { + $output .= theme("more_help_link", url('admin/help/' . substr($path, 6))); + } + } } } return $output; diff --git a/includes/theme.inc b/includes/theme.inc index 36181fac0..f74700c5a 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -516,6 +516,10 @@ function theme_error($message) { return '<div class="error">'. $message .'</div>'; } +function theme_more_help_link($url) { + return '<div class="more-help-link">' . t('[<a href="%link">more help...</a>]', array('%link' => $url)) . '</div><hr />'; +} + /** * Return code that emits an XML icon. */ |