function admin_menu_theme_settings in Administration menu 5.2
Same name and namespace in other branches
- 5.3 admin_menu.inc \admin_menu_theme_settings()
- 6.3 admin_menu.inc \admin_menu_theme_settings()
- 6 admin_menu.inc \admin_menu_theme_settings()
- 7.3 admin_menu.inc \admin_menu_theme_settings()
Form builder function for module settings.
1 string reference to 'admin_menu_theme_settings'
- admin_menu_menu in ./
admin_menu.module - Implementation of hook_menu().
File
- ./
admin_menu.module, line 106 - Renders a menu tree for administrative purposes as dropdown menu at the top of the window.
Code
function admin_menu_theme_settings() {
$form['admin_menu_margin_top'] = array(
'#type' => 'checkbox',
'#title' => t('Apply margin-top to page body'),
'#default_value' => variable_get('admin_menu_margin_top', 1),
'#description' => t('If enabled, the output of this site will be shifted for approx. 20 pixels from the top of the viewport to make room for the Administration Menu. If this setting is disabled, some absolute or fixed positioned page elements at the top of the viewport may be covered by Administration Menu.'),
);
$form['admin_menu_position_fixed'] = array(
'#type' => 'checkbox',
'#title' => t('Use fixed instead of absolute positioning'),
'#default_value' => variable_get('admin_menu_position_fixed', 0),
'#description' => t('If enabled, the administration menu will always stay at the top of the browser viewport, even if you scroll down the page.') . '<br />' . t('<strong>Note:</strong> In some browsers this setting might cause malformed page contents, a disappearing cursor and not editable select lists in forms. If such effects occur, this setting should be disabled.'),
);
$form['tweaks'] = array(
'#type' => 'fieldset',
'#title' => t('Drupal Administration Tweaks'),
);
$form['tweaks']['admin_menu_tweak_menu'] = array(
'#type' => 'checkbox',
'#title' => t('Collapse menus in menu administration'),
'#default_value' => variable_get('admin_menu_tweak_menu', 0),
'#description' => t('If enabled, menu containers on the <a href="!menu-url">Site building » Menus</a> page will be collapsed like fieldsets.', array(
'!menu-url' => url('admin/build/menu'),
)),
);
$form['tweaks']['admin_menu_tweak_modules'] = array(
'#type' => 'checkbox',
'#title' => t('Collapse fieldsets on modules page'),
'#default_value' => variable_get('admin_menu_tweak_modules', 0),
'#description' => t('If enabled, fieldsets on the <a href="!modules-url">Site building » Modules</a> page will be initially collapsed.', array(
'!modules-url' => url('admin/build/modules'),
)),
);
if (module_exists('util')) {
$form['tweaks']['admin_menu_tweak_modules']['#description'] .= '<br /><strong>' . t('If you installed Utility module for this purpose, you can safely uninstall it now!') . '</strong>';
}
$form['tweaks']['admin_menu_tweak_tabs'] = array(
'#type' => 'checkbox',
'#title' => t('Move page tabs into administration menu'),
'#default_value' => variable_get('admin_menu_tweak_tabs', 0),
'#description' => t('If enabled, tabs of the current page (usually displayed next or below the page title) will be moved into the administration menu. This feature requires that the theme is using the CSS classes <code>tabs primary</code> and <code>tabs secondary</code> for tabs (like Garland).'),
);
return system_settings_form($form);
}