function workspace_settings in Workspace 7
Same name and namespace in other branches
- 6 workspace.module \workspace_settings()
Implements hook_settings().
1 string reference to 'workspace_settings'
- workspace_menu in ./
workspace.module - Implements hook_menu().
File
- ./
workspace.module, line 752 - Presents a user-centric view of content.
Code
function workspace_settings() {
$roles = user_roles();
// The anonymous user does not have a profile.
unset($roles[DRUPAL_ANONYMOUS_RID]);
$form['info'] = array(
'#value' => "Select each role for which you want the link to a user's workspace to show up in their user profile.",
);
foreach ($roles as $rid => $name) {
$identifier = 'workspace_user_profile_' . $rid;
$form[$identifier] = array(
'#type' => 'checkbox',
'#title' => $name,
'#default_value' => variable_get($identifier, 0),
);
}
$form['workspace_user_profile_link'] = array(
'#type' => 'textfield',
'#title' => t("Name of link to user's workspace"),
'#description' => t("This will be used to display the link to a user's workspace on his or her profile page. The %username token will be replaced by the username of the user whose profile is being shown."),
'#default_value' => variable_get('workspace_user_profile_link', t('View recent content created by %username')),
);
$form['workspace_use_icons'] = array(
'#type' => 'checkbox',
'#title' => t('Icons in tables'),
'#return_value' => 1,
'#default_value' => variable_get('workspace_use_icons', 1),
'#description' => t('Setting this option enables icons in tables.'),
);
$form['workspace_dateformat_default'] = array(
'#type' => 'select',
'#title' => t('Set Date Format'),
'#description' => t("Select the Date format to use in tables."),
'#default_value' => variable_get('workspace_dateformat_default', 'medium'),
'#options' => array(
'short' => t('Short'),
'medium' => t('Medium'),
'long' => t('Long'),
),
);
return system_settings_form($form);
}