Commit 12bc059b authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Bring back the settings sub-menu for drop-down navigation (bug #801081)

The submenu under settings in not usable with drop-down navigation,
because there's no top-level item for it to hang from.  This patch
changes it to group-style tabs within the page when drop-down
navigation is configured.  Just creating a link from the inbox to
the notification prefs is not sufficient because plugins can now
hook into the right menu (see bug #834171).

Change-Id: I7cd6009ed77d5795a9a6880e64d90f8742e47f92
Signed-off-by: default avatarRichard Mansfield <>
parent 20ead13e
......@@ -100,7 +100,7 @@ $prefsform = pieform(array(
$smarty = smarty();
$smarty->assign('pagedescription', get_string('prefsdescr', 'activity'));
$smarty->assign('form', $prefsform);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('PAGEHEADING', get_config('dropdownmenu') ? get_string('settings') : TITLE);
function activityprefs_submit(Pieform $form, $values) {
......@@ -409,8 +409,17 @@ EOF;
if ($USER->is_logged_in()) {
global $SELECTEDSUBNAV; // It's evil, but rightnav & mainnav stuff are now in different templates.
$smarty->assign('MAINNAV', main_nav());
$mainnavsubnav = $SELECTEDSUBNAV;
$smarty->assign('RIGHTNAV', right_nav());
if (!$mainnavsubnav && $dropdownmenu) {
// In drop-down navigation, the submenu is only usable if its parent is one of the top-level menu
// items. But if the submenu comes from something in right_nav (settings), it's unreachable.
// Turning the submenu into SUBPAGENAV group-style tabs makes it usable.
else {
else {
$smarty->assign('languageform', language_select_form());
......@@ -2212,7 +2221,7 @@ function right_nav() {
'path' => 'settings/account',
'url' => 'account/',
'title' => get_string('account'),
'title' => get_config('dropdownmenu') ? get_string('general') : get_string('account'),
'weight' => 10,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment