We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 2a0a0287 authored by buttle's avatar buttle

Added EVENT to homestubnav

Changed menu->submenu(). if (! $menu->getItems()) then do nothing
parent a45cdae0
......@@ -49,13 +49,17 @@ class HomeStubNav extends Menu
{
function getItems()
{
return array(array('top',
array(),
// TRANS: Menu item in personal group navigation menu.
_m('MENU','Home'),
// TRANS: Menu item title in personal group navigation menu.
// TRANS: %s is a username.
_('Back to top'),
'nav_return_top'));
if (Event::handle('StartHomeStubNav', array(&$this->action))) {
return array(array('top',
array(),
// TRANS: Menu item in personal group navigation menu.
_m('MENU','Home'),
// TRANS: Menu item title in personal group navigation menu.
// TRANS: %s is a username.
_('Back to top'),
'nav_return_top'));
Event::handle('EndHomeStubNav', array(&$this->action));
}
return Null;
}
}
......@@ -150,6 +150,8 @@ class Menu extends Widget
function submenu($label, $menu)
{
if(!$menu->getItems())
return;
$this->action->elementStart('li');
$this->action->element('h3', null, $label);
$menu->show();
......
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