Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
1b46d7fc
Commit
1b46d7fc
authored
Jun 19, 2004
by
Dries
Browse files
- Patch
#8614
by JonBob: better way to display menus.
parent
d2ff1ca5
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/menu.inc
View file @
1b46d7fc
...
...
@@ -421,17 +421,17 @@ function theme_menu_item($mid) {
*/
function
theme_menu_local_tasks
()
{
$active
=
true
;
if
(
$mid
=
menu_get_active_nontask_item
())
{
$menu
=
menu_get_menu
();
$active_mid
=
$mid
;
if
(
$children
=
$menu
[
'items'
][
$mid
][
'children'
])
{
foreach
(
$menu
[
'items'
][
$mid
][
'children'
]
as
$cid
)
{
if
((
$menu
[
'items'
][
$cid
][
'type'
]
&
MENU_IS_LOCAL_TASK
)
&&
_menu_item_is_accessible
(
$cid
))
{
if
(
menu_in_active_trail
(
$cid
))
{
$tabs
[]
=
theme
(
'menu_local_task'
,
$cid
,
TRUE
);
$active
=
false
;
$active
_mid
=
$cid
;
}
else
{
$tabs
[]
=
theme
(
'menu_local_task'
,
$cid
,
FALSE
);
...
...
@@ -442,13 +442,14 @@ function theme_menu_local_tasks() {
if
(
$tabs
)
{
// We add a default view-tab for the parent:
$output
=
"<ul class=
\"
tabs primary
\"
>
\n
"
;
$output
.
=
theme
(
'menu_local_task'
,
$mid
,
$active
);
$output
.
=
theme
(
'menu_local_task'
,
$mid
,
$active
_mid
==
$mid
);
$output
.
=
implode
(
$tabs
);
$output
.
=
"</ul>
\n
"
;
$output
.
=
theme
(
'menu_local_subtasks'
,
$mid
);
$output
.
=
theme
(
'menu_local_subtasks'
,
$
active_
mid
);
}
}
}
return
$output
;
}
...
...
@@ -462,7 +463,7 @@ function theme_menu_local_tasks() {
*/
function
theme_menu_local_task
(
$mid
,
$active
)
{
if
(
$active
)
{
return
'<li class="active">'
.
theme
(
'menu_item'
,
$mid
)
.
"</li>
\n
"
;
return
'<li class="active">'
.
theme
(
'menu_item'
,
$mid
)
.
"</li>
\n
"
;
}
else
{
return
'<li>'
.
theme
(
'menu_item'
,
$mid
)
.
"</li>
\n
"
;
...
...
Write
Preview
Markdown
is supported
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