? .project Index: modules/aggregator/aggregator.module =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v retrieving revision 1.428 diff -u -p -r1.428 aggregator.module --- modules/aggregator/aggregator.module 1 Nov 2009 17:50:45 -0000 1.428 +++ modules/aggregator/aggregator.module 7 Nov 2009 19:24:49 -0000 @@ -261,6 +261,16 @@ function aggregator_menu() { } /** + * Implement hook_settings_link(). + */ +function aggregator_settings_link() { + return array( + 'title' => t('Configure the behavior of the feed aggregator, including when to discard feed items and how to present feed items and categories.'), + 'href' => 'admin/config/services/aggregator/settings', + ); +} + +/** * Menu callback. * * @return Index: modules/block/block.module =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.module,v retrieving revision 1.395 diff -u -p -r1.395 block.module --- modules/block/block.module 7 Nov 2009 13:35:20 -0000 1.395 +++ modules/block/block.module 7 Nov 2009 19:24:51 -0000 @@ -145,6 +145,16 @@ function block_menu() { } /** + * Implement hook_settings_link(). + */ +function block_settings_link() { + return array( + 'title' => t('Configure what block content appears in your site\'s sidebars and other regions.'), + 'href' => 'admin/structure/block', + ); +} + +/** * Menu item access callback - only admin or enabled themes can be accessed. */ function _block_themes_access($theme) { Index: modules/book/book.module =================================================================== RCS file: /cvs/drupal/drupal/modules/book/book.module,v retrieving revision 1.523 diff -u -p -r1.523 book.module --- modules/book/book.module 7 Nov 2009 13:35:20 -0000 1.523 +++ modules/book/book.module 7 Nov 2009 19:24:53 -0000 @@ -175,6 +175,16 @@ function book_menu() { } /** + * Implement hook_settings_link(). + */ +function book_settings_link() { + return array( + 'title' => t('Administer book settings.'), + 'href' => 'admin/content/book/settings', + ); +} + +/** * Menu item access callback - determine if the outline tab is accessible. */ function _book_outline_access(stdClass $node) { Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.802 diff -u -p -r1.802 comment.module --- modules/comment/comment.module 7 Nov 2009 13:35:20 -0000 1.802 +++ modules/comment/comment.module 7 Nov 2009 19:24:56 -0000 @@ -222,6 +222,16 @@ function comment_menu() { } /** + * Implement hook_settings_link(). + */ +function comment_settings_link() { + return array( + 'title' => t('List and edit site comments and the comment approval queue.'), + 'href' => 'admin/content/comment', + ); +} + +/** * Returns a menu title which includes the number of unapproved comments. */ function comment_count_unpublished() { Index: modules/contact/contact.module =================================================================== RCS file: /cvs/drupal/drupal/modules/contact/contact.module,v retrieving revision 1.135 diff -u -p -r1.135 contact.module --- modules/contact/contact.module 1 Nov 2009 21:26:44 -0000 1.135 +++ modules/contact/contact.module 7 Nov 2009 19:24:58 -0000 @@ -110,6 +110,16 @@ function contact_menu() { } /** + * Implement hook_settings_link(). + */ +function contact_settings_link() { + return array( + 'title' => t('Create a system contact form and set up categories for the form to use.'), + 'href' => 'admin/structure/contact', + ); +} + +/** * Menu access callback for a user's personal contact form. * * @param $account Index: modules/dashboard/dashboard.module =================================================================== RCS file: /cvs/drupal/drupal/modules/dashboard/dashboard.module,v retrieving revision 1.4 diff -u -p -r1.4 dashboard.module --- modules/dashboard/dashboard.module 23 Oct 2009 22:24:12 -0000 1.4 +++ modules/dashboard/dashboard.module 7 Nov 2009 19:24:59 -0000 @@ -40,6 +40,16 @@ function dashboard_menu() { } /** + * Implement hook_settings_link(). + */ +function dashboard_settings_link() { + return array( + 'title' => t('Customize dashboard contents.'), + 'href' => 'admin/dashboard/customize', + ); +} + +/** * Implement hook_block_info_alter(). * * Skip rendering dashboard blocks when not on the dashboard page itself. This Index: modules/filter/filter.module =================================================================== RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v retrieving revision 1.300 diff -u -p -r1.300 filter.module --- modules/filter/filter.module 23 Oct 2009 22:24:14 -0000 1.300 +++ modules/filter/filter.module 7 Nov 2009 19:25:01 -0000 @@ -134,6 +134,16 @@ function filter_menu() { } /** + * Implement hook_settings_link(). + */ +function filter_settings_link() { + return array( + 'title' => t('Configure how content input by users is filtered, including allowed HTML tags. Also allows enabling of module-provided filters.'), + 'href' => 'admin/config/content/formats', + ); +} + +/** * Access callback for deleting text formats. * * @param $format Index: modules/forum/forum.module =================================================================== RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v retrieving revision 1.529 diff -u -p -r1.529 forum.module --- modules/forum/forum.module 1 Nov 2009 12:11:10 -0000 1.529 +++ modules/forum/forum.module 7 Nov 2009 19:25:03 -0000 @@ -134,6 +134,15 @@ function forum_menu() { return $items; } +/** + * Implement hook_settings_link(). + */ +function forum_settings_link() { + return array( + 'title' => t('Control forums and their hierarchy and change forum settings.'), + 'href' => 'admin/structure/forum', + ); +} /** * Implement hook_init(). Index: modules/image/image.module =================================================================== RCS file: /cvs/drupal/drupal/modules/image/image.module,v retrieving revision 1.26 diff -u -p -r1.26 image.module --- modules/image/image.module 6 Nov 2009 02:38:08 -0000 1.26 +++ modules/image/image.module 7 Nov 2009 19:25:04 -0000 @@ -164,6 +164,16 @@ function image_menu() { } /** + * Implement hook_settings_link(). + */ +function image_settings_link() { + return array( + 'title' => t('Configure styles that can be used for resizing or adjusting images on display.'), + 'href' => 'admin/config/media/image-styles', + ); +} + +/** * Implement hook_theme(). */ function image_theme() { Index: modules/locale/locale.module =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v retrieving revision 1.267 diff -u -p -r1.267 locale.module --- modules/locale/locale.module 24 Oct 2009 05:13:44 -0000 1.267 +++ modules/locale/locale.module 7 Nov 2009 19:25:07 -0000 @@ -260,6 +260,16 @@ function locale_menu() { } /** + * Implement hook_settings_link(). + */ +function locale_settings_link() { + return array( + 'title' => t('Configure languages for content and the user interface.'), + 'href' => 'admin/config/regional/language', + ); +} + +/** * Implements hook_init(). * * Initialize date formats according to the user's current locale. @@ -468,7 +478,7 @@ function locale_theme() { */ function locale_field_attach_view_alter(&$output, $context) { // In locale_field_fallback_view() we might call field_attach_view(). The - // static variable avoids unnecessary recursion. + // static variable avoids unnecessary recursion. static $recursion; // Do not apply fallback rules if disabled or if Locale is not registered as a Index: modules/menu/menu.module =================================================================== RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v retrieving revision 1.216 diff -u -p -r1.216 menu.module --- modules/menu/menu.module 7 Nov 2009 13:35:20 -0000 1.216 +++ modules/menu/menu.module 7 Nov 2009 19:25:08 -0000 @@ -153,6 +153,16 @@ function menu_menu() { } /** + * Implement hook_settings_link(). + */ +function menu_settings_link() { + return array( + 'title' => t('Add new menus to your site, edit existing menus, and rename and reorganize menu links.'), + 'href' => 'admin/structure/menu', + ); +} + +/** * Implement hook_theme(). */ function menu_theme() { Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.1165 diff -u -p -r1.1165 node.module --- modules/node/node.module 7 Nov 2009 13:35:20 -0000 1.1165 +++ modules/node/node.module 7 Nov 2009 19:25:12 -0000 @@ -1920,6 +1920,16 @@ function node_menu() { } /** + * Implement hook_settings_link(). + */ +function node_settings_link() { + return array( + 'title' => t('Manage posts by content type, including default status, front page promotion, comment settings, etc.'), + 'href' => 'admin/structure/types', + ); +} + +/** * Title callback for a node type. */ function node_type_page_title($type) { Index: modules/path/path.module =================================================================== RCS file: /cvs/drupal/drupal/modules/path/path.module,v retrieving revision 1.174 diff -u -p -r1.174 path.module --- modules/path/path.module 1 Nov 2009 12:11:10 -0000 1.174 +++ modules/path/path.module 7 Nov 2009 19:25:13 -0000 @@ -91,6 +91,16 @@ function path_menu() { } /** + * Implement hook_settings_link(). + */ +function path_settings_link() { + return array( + 'title' => t("Change your site's URL paths by aliasing them."), + 'href' => 'admin/config/search/path', + ); +} + +/** * Implement hook_form_alter(). */ function path_form_alter(&$form, $form_state, $form_id) { Index: modules/profile/profile.module =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v retrieving revision 1.281 diff -u -p -r1.281 profile.module --- modules/profile/profile.module 1 Nov 2009 21:26:44 -0000 1.281 +++ modules/profile/profile.module 7 Nov 2009 19:25:14 -0000 @@ -133,6 +133,16 @@ function profile_menu() { } /** + * Implement hook_settings_link(). + */ +function profile_settings_link() { + return array( + 'title' => t('Create customizable fields for your users.'), + 'href' => 'admin/config/people/profile', + ); +} + +/** * Implement hook_block_info(). */ function profile_block_info() { Index: modules/search/search.module =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search.module,v retrieving revision 1.323 diff -u -p -r1.323 search.module --- modules/search/search.module 1 Nov 2009 21:46:16 -0000 1.323 +++ modules/search/search.module 7 Nov 2009 19:25:15 -0000 @@ -233,6 +233,16 @@ function search_menu() { } /** + * Implement hook_settings_link(). + */ +function search_settings_link() { + return array( + 'title' => t('Configure relevance settings for search and other indexing options'), + 'href' => 'admin/config/search/settings', + ); +} + +/** * Get information about all available search hooks. */ function search_get_info() { Index: modules/shortcut/shortcut.module =================================================================== RCS file: /cvs/drupal/drupal/modules/shortcut/shortcut.module,v retrieving revision 1.3 diff -u -p -r1.3 shortcut.module --- modules/shortcut/shortcut.module 1 Nov 2009 23:02:13 -0000 1.3 +++ modules/shortcut/shortcut.module 7 Nov 2009 19:25:16 -0000 @@ -104,6 +104,16 @@ function shortcut_menu() { } /** + * Implement hook_settings_link(). + */ +function shortcut_settings_link() { + return array( + 'title' => t('List the available shortcut sets and switch between them.'), + 'href' => 'admin/config/system/shortcut', + ); +} + +/** * Implement hook_theme(). */ function shortcut_theme() { Index: modules/simpletest/simpletest.module =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.module,v retrieving revision 1.80 diff -u -p -r1.80 simpletest.module --- modules/simpletest/simpletest.module 24 Oct 2009 23:12:11 -0000 1.80 +++ modules/simpletest/simpletest.module 7 Nov 2009 19:25:17 -0000 @@ -58,6 +58,16 @@ function simpletest_menu() { } /** + * Implement hook_settings_link(). + */ +function simpletest_settings_link() { + return array( + 'title' => t('Configure simpletest settings.'), + 'href' => 'admin/config/development/testing/settings', + ); +} + +/** * Implement hook_permission(). */ function simpletest_permission() { Index: modules/statistics/statistics.module =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v retrieving revision 1.323 diff -u -p -r1.323 statistics.module --- modules/statistics/statistics.module 1 Nov 2009 12:11:10 -0000 1.323 +++ modules/statistics/statistics.module 7 Nov 2009 19:25:18 -0000 @@ -195,6 +195,16 @@ function statistics_menu() { } /** + * Implement hook_settings_link(). + */ +function statistics_settings_link() { + return array( + 'title' => t('Control details about what and how your site logs access statistics.'), + 'href' => 'admin/config/system/statistics', + ); +} + +/** * Implement hook_user_cancel(). */ function statistics_user_cancel($edit, $account, $method) { Index: modules/system/system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.219 diff -u -p -r1.219 system.admin.inc --- modules/system/system.admin.inc 3 Nov 2009 05:27:18 -0000 1.219 +++ modules/system/system.admin.inc 7 Nov 2009 19:25:22 -0000 @@ -718,13 +718,24 @@ function system_modules($form, $form_sta } } } + $extra['links'] = array(); // Generate link for module's help page, if there is one. if ($help_arg && $module->status && in_array($filename, module_implements('help'))) { if (module_invoke($filename, 'help', "admin/help#$filename", $help_arg)) { // Module has a help page. - $extra['help'] = theme('more_help_link', array('url' => url("admin/help/$filename"))); + $extra['links']['help'] = l('' . t('More help') . '', "admin/help/$filename", array('attributes' => array('class' => 'module-help-link', 'title' => t('More help')), 'html' => TRUE)); } } + // Generate link for module's permission, if the user has access to it. + if (in_array($filename, module_implements('permission')) && user_access('administer permissions')) { + $extra['links']['permissions'] = l('' . t('Configure permissions') . '', 'admin/config/people/permissions', array('fragment' => 'module-' . $filename, 'attributes' => array('class' => 'module-permissions-link', 'title' => t('Configure permissions')), 'html' => TRUE)); + } + // Generate link to module's settings page, if the module provides on. + if (in_array($filename, module_implements('settings_link'))) { + $settings_link = module_invoke($filename, 'settings_link'); + $extra['links']['settings'] = l('' . $settings_link['title'] . '', $settings_link['href'], array('attributes' => array('class' => 'module-settings-link', 'title' => $settings_link['title']), 'html' => TRUE)); + } + // Mark dependents disabled so the user cannot remove required modules. $dependents = array(); // If this module is required by other modules, list those, and then make it @@ -755,6 +766,7 @@ function system_modules($form, $form_sta t('Name'), t('Version'), t('Description'), + array('data' => t('Operations'), 'colspan' => 3), ), ); } @@ -785,7 +797,7 @@ function _system_modules_build_row($info 'required_by' => array(), 'disabled' => FALSE, 'enabled' => FALSE, - 'help' => '', + 'extra' => array(), ); $form = array( '#tree' => TRUE, @@ -844,11 +856,13 @@ function _system_modules_build_row($info $form['description']['#markup'] .= theme('system_modules_incompatible', array('message' => $status_long)); } - // Show a "more help" link for modules that have them. - if ($extra['help']) { - $form['help'] = array( - '#markup' => $extra['help'], - ); + // Show a set of useful links for modules that have them. + if (count($extra['links'])) { + foreach ($extra['links'] as $key => $link) { + $form['links'][$key] = array( + '#markup' => $link, + ); + } } return $form; } @@ -2306,14 +2320,8 @@ function theme_system_modules_fieldset($ } $row[] = $label . '>' . drupal_render($module['name']) . ''; $row[] = drupal_render($module['version']); - $description = ''; - // If we have help, it becomes the first part - // of the description - with CSS, it is float: right'd. - if (isset($module['help'])) { - $description = '
' . drupal_render($module['help']) . '
'; - } // Add the description, along with any modules it requires. - $description .= drupal_render($module['description']); + $description = drupal_render($module['description']); if ($module['#requires']) { $description .= '
' . t('Requires: !module-list', array('!module-list' => implode(', ', $module['#requires']))) . '
'; } @@ -2321,6 +2329,16 @@ function theme_system_modules_fieldset($ $description .= '
' . t('Required by: !module-list', array('!module-list' => implode(', ', $module['#required_by']))) . '
'; } $row[] = array('data' => $description, 'class' => array('description')); + // Display links (such as help or permissions) in their own columns. + if (isset($module['links'])) { + foreach (array('help', 'permissions', 'settings') as $key) { + $row[] = array('data' => isset($module['links'][$key]) ? drupal_render($module['links'][$key]) : ''); + } + } + else { + // Insert 1 empty cells with a colspan of 3. + $row[] = array('data' => '', 'colspan' => 3); + } $rows[] = $row; } Index: modules/system/system.api.php =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.api.php,v retrieving revision 1.102 diff -u -p -r1.102 system.api.php --- modules/system/system.api.php 6 Nov 2009 03:59:06 -0000 1.102 +++ modules/system/system.api.php 7 Nov 2009 19:25:27 -0000 @@ -1327,6 +1327,22 @@ function hook_modules_uninstalled($modul } /** + * Get the information about a link to the module's settings page. + * + * @return + * A nested array containing informations about a link to the module's + * settings page keyed by the following values: + * - 'title' The title of the link. + * - 'href' The internal url to the settings page. + */ +function hook_settings_link() { + return array( + 'title' => t('Settings for mymodule'), + 'href' => 'admin/config', + ); +} + +/** * Registers PHP stream wrapper implementations associated with a module. * * Provide a facility for managing and querying user-defined stream wrappers Index: modules/system/system.css =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.css,v retrieving revision 1.63 diff -u -p -r1.63 system.css --- modules/system/system.css 21 Sep 2009 08:52:41 -0000 1.63 +++ modules/system/system.css 7 Nov 2009 19:25:27 -0000 @@ -159,10 +159,21 @@ tr.merge-up, tr.merge-up td, tr.merge-up .more-help-link { text-align: right; /* LTR */ } -.more-help-link a { +.more-help-link a, a.module-help-link { padding: 1px 0 1px 20px; /* LTR */ background: url(../../misc/help.png) 0 50% no-repeat; /* LTR */ } +a.module-help-link, a.module-permissions-link, a.module-settings-link { + padding: 1px 0 1px 16px; /* LTR */ + display: block; + height: 16px; +} +a.module-permissions-link { + background: url(../../misc/permissions.png) 0 50% no-repeat; /* LTR */ +} +a.module-settings-link { + background: url(../../misc/settings.png) 0 50% no-repeat; /* LTR */ +} .more-link { text-align: right; /* LTR */ } Index: modules/taxonomy/taxonomy.module =================================================================== RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v retrieving revision 1.534 diff -u -p -r1.534 taxonomy.module --- modules/taxonomy/taxonomy.module 2 Nov 2009 06:34:36 -0000 1.534 +++ modules/taxonomy/taxonomy.module 7 Nov 2009 19:25:30 -0000 @@ -270,6 +270,16 @@ function taxonomy_menu() { } /** + * Implement hook_settings_link(). + */ +function taxonomy_settings_link() { + return array( + 'title' => t('Manage tagging, categorization, and classification of your content.'), + 'href' => 'admin/structure/taxonomy', + ); +} + +/** * Return edit access for a given term. */ function taxonomy_term_edit_access($term) { Index: modules/trigger/trigger.module =================================================================== RCS file: /cvs/drupal/drupal/modules/trigger/trigger.module,v retrieving revision 1.53 diff -u -p -r1.53 trigger.module --- modules/trigger/trigger.module 6 Nov 2009 03:59:06 -0000 1.53 +++ modules/trigger/trigger.module 7 Nov 2009 19:25:32 -0000 @@ -82,6 +82,16 @@ function trigger_menu() { } /** + * Implement hook_settings_link(). + */ +function trigger_settings_link() { + return array( + 'title' => t('Configure when to execute actions.'), + 'href' => 'admin/structure/trigger', + ); +} + +/** * Implement hook_trigger_info(). * * Defines all the triggers that this module implements triggers for. Index: modules/update/update.module =================================================================== RCS file: /cvs/drupal/drupal/modules/update/update.module,v retrieving revision 1.53 diff -u -p -r1.53 update.module --- modules/update/update.module 25 Oct 2009 19:52:47 -0000 1.53 +++ modules/update/update.module 7 Nov 2009 19:25:32 -0000 @@ -225,6 +225,16 @@ function update_menu() { } /** + * Implement hook_settings_link(). + */ +function update_settings_link() { + return array( + 'title' => t('Configure available updates settings.'), + 'href' => 'admin/reports/updates/settings', + ); +} + +/** * Determine if the current user can access the updater menu items. * * This is used as a menu system access callback. It both enforces the Index: modules/upload/upload.module =================================================================== RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v retrieving revision 1.268 diff -u -p -r1.268 upload.module --- modules/upload/upload.module 1 Nov 2009 21:55:31 -0000 1.268 +++ modules/upload/upload.module 7 Nov 2009 19:25:33 -0000 @@ -105,6 +105,16 @@ function upload_menu() { } /** + * Implement hook_settings_link(). + */ +function upload_settings_link() { + return array( + 'title' => t('Control how files may be attached to content.'), + 'href' => 'admin/config/media/uploads', + ); +} + +/** * Determine the limitations on files that a given user may upload. The user * may be in multiple roles so we select the most permissive limitations from * all of their roles. Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.1077 diff -u -p -r1.1077 user.module --- modules/user/user.module 7 Nov 2009 14:27:20 -0000 1.1077 +++ modules/user/user.module 7 Nov 2009 19:25:38 -0000 @@ -1555,6 +1555,16 @@ function user_menu() { } /** + * Implement hook_settings_link(). + */ +function user_settings_link() { + return array( + 'title' => t('Configure user accounts, roles and permissions.'), + 'href' => 'admin/config/people', + ); +} + +/** * Implement hook_init(). */ function user_init() {