mirror of https://github.com/BOINC/boinc.git
Inconsistent account sub menu
Added context to the profile edit pages to ensure the proper menu tree is active and the sub menu renders properly. Also added URL aliases for account/info pages.
This commit is contained in:
parent
847db2a643
commit
a81b037c74
|
@ -5,7 +5,10 @@
|
|||
*/
|
||||
function user_profiles_ctools_plugin_api() {
|
||||
list($module, $api) = func_get_args();
|
||||
if ($module == "panels_mini" && $api == "panels_default") {
|
||||
if ($module == "context" && $api == "context") {
|
||||
return array("version" => 3);
|
||||
}
|
||||
elseif ($module == "panels_mini" && $api == "panels_default") {
|
||||
return array("version" => 1);
|
||||
}
|
||||
elseif ($module == "strongarm" && $api == "strongarm") {
|
||||
|
|
|
@ -3,6 +3,7 @@ description = "Profiles information for user accounts"
|
|||
core = "6.x"
|
||||
package = "Features"
|
||||
dependencies[] = "content_profile"
|
||||
dependencies[] = "context"
|
||||
dependencies[] = "ctools"
|
||||
dependencies[] = "features"
|
||||
dependencies[] = "filefield"
|
||||
|
@ -20,6 +21,8 @@ features[content][] = "profile-field_opinions"
|
|||
features[content][] = "profile-field_profile_image"
|
||||
features[content][] = "profile-field_url"
|
||||
features[content][] = "profile-field_zip"
|
||||
features[context][] = "account--profile--form"
|
||||
features[ctools][] = "context:context:3"
|
||||
features[ctools][] = "panels_mini:panels_default:1"
|
||||
features[ctools][] = "strongarm:strongarm:1"
|
||||
features[menu_links][] = "primary-links:account/profile"
|
||||
|
|
|
@ -7,6 +7,11 @@
|
|||
function boincuser_install() {
|
||||
// Use schema API to create database table
|
||||
drupal_install_schema('boincuser');
|
||||
// Add aliases for account pages
|
||||
path_set_alias('dashboard', 'account');
|
||||
path_set_alias('dashboard', 'account/dashboard');
|
||||
path_set_alias('user/me/edit', 'account/info/edit');
|
||||
path_set_alias('user/me/edit/profile', 'account/info/edit/profile');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,6 +22,11 @@ function boincuser_uninstall() {
|
|||
drupal_uninstall_schema('boincuser');
|
||||
// Delete our module's variable from the variables table.
|
||||
variable_del('boincuser_integration');
|
||||
// Remove relevant aliases
|
||||
path_set_alias(NULL, 'account');
|
||||
path_set_alias(NULL, 'account/dashboard');
|
||||
path_set_alias(NULL, 'account/info/edit');
|
||||
path_set_alias(NULL, 'account/info/edit/profile');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue