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

Commit e79cd6ea authored by Evan Prodromou's avatar Evan Prodromou

show remote groups correctly in groupsnav

parent e8785927
......@@ -71,8 +71,9 @@ class GroupsNav extends MoreMenu
$items = array();
while ($this->groups->fetch()) {
$items[] = array('showgroup',
array('nickname' => $this->groups->nickname),
$items[] = array('placeholder',
array('nickname' => $this->groups->nickname,
'mainpage' => $this->groups->homeUrl()),
$this->groups->getBestName(),
$this->groups->getBestName()
);
......@@ -90,4 +91,23 @@ class GroupsNav extends MoreMenu
_('See all groups you belong to.'));
}
function item($actionName, $args, $label, $description, $id=null, $cls=null)
{
if ($actionName != 'placeholder') {
return parent::item($actionName, $args, $label, $description, $id, $cls);
}
if (empty($id)) {
$id = $this->menuItemID('showgroup', array('nickname' => $args['nickname']));
}
$url = $args['mainpage'];
$this->out->menuItem($url,
$label,
$description,
$this->isCurrent($actionName, $args),
$id,
$cls);
}
}
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