Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
a2b44542
Commit
a2b44542
authored
Nov 25, 2011
by
Richard Mansfield
Committed by
Gerrit Code Review
Nov 25, 2011
Browse files
Merge "Bring back the settings sub-menu for drop-down navigation (bug #801081)"
parents
b986ffc6
12bc059b
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/account/activity/preferences/index.php
View file @
a2b44542
...
...
@@ -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
)
{
...
...
htdocs/lib/web.php
View file @
a2b44542
...
...
@@ -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
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment