From 584f3e886a7c9850d53fedaab2c8f3d0249bda10 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 20 Feb 2008 13:46:43 +0000 Subject: - Patch #30984 by webchick, keith.smith, kkaefer, Crell et al: provide descriptions for permissions on the permission administration page. --- modules/system/system.module | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'modules/system/system.module') diff --git a/modules/system/system.module b/modules/system/system.module index d3f9d6fae..67a32cee6 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -148,6 +148,7 @@ function system_theme() { 'system_powered_by' => array( 'arguments' => array('image_path' => NULL), ), + 'system_compact_link' => array(), )); } @@ -155,7 +156,14 @@ function system_theme() { * Implementation of hook_perm(). */ function system_perm() { - return array('administer site configuration', 'access administration pages', 'administer actions', 'access site reports', 'select different theme', 'administer files'); + return array( + 'administer site configuration' => t('Configure site-wide settings such as module or theme administration settings.'), + 'access administration pages' => t('View the administration panel and browse the help system.'), + 'administer actions' => t('Manage the actions defined for your site.'), + 'access site reports' => t('View reports from system logs and other status information.'), + 'select different theme' => t('Select a theme other than the default theme set by the site administrator.'), + 'administer files' => t('Manage user-uploaded files.'), + ); } /** @@ -1158,6 +1166,18 @@ function system_admin_compact_mode() { return (isset($user->admin_compact_mode)) ? $user->admin_compact_mode : variable_get('admin_compact_mode', FALSE); } +/** + * Menu callback; Sets whether the admin menu is in compact mode or not. + * + * @param $mode + * Valid values are 'on' and 'off'. + */ +function system_admin_compact_page($mode = 'off') { + global $user; + user_save($user, array('admin_compact_mode' => ($mode == 'on'))); + drupal_goto(drupal_get_destination()); +} + /** * Generate a list of tasks offered by a specified module. * @@ -1875,3 +1895,21 @@ function theme_system_powered_by($image_path) { $image = theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system')); return l($image, 'http://drupal.org', array('html' => TRUE, 'absolute' => TRUE, 'external' => TRUE)); } + +/** + * Display the link to show or hide inline help descriptions. + * + * @ingroup themeable + */ +function theme_system_compact_link() { + $output = ''; + + return $output; +} -- cgit v1.2.3