Commit a2b44542 authored by Richard Mansfield's avatar Richard Mansfield Committed by Gerrit Code Review
Browse files

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

parents b986ffc6 12bc059b
......@@ -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);
$smarty->display('form.tpl');
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());
$smarty->assign('SELECTEDSUBNAV', $SELECTEDSUBNAV);
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.
$smarty->assign('SUBPAGENAV', $SELECTEDSUBNAV);
}
else {
$smarty->assign('SELECTEDSUBNAV', $SELECTEDSUBNAV);
}
}
else {
$smarty->assign('languageform', language_select_form());
......@@ -2212,7 +2221,7 @@ function right_nav() {
'settings/account' => array(
'path' => 'settings/account',
'url' => 'account/',
'title' => get_string('account'),
'title' => get_config('dropdownmenu') ? get_string('general') : get_string('account'),
'weight' => 10,
),
'settings/notifications' => array(
......
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