Commit 6ae214af authored by Evan Prodromou's avatar Evan Prodromou

move edit choice to group profile block

parent ebaf5a97
......@@ -119,15 +119,6 @@ class GroupNav extends Menu
sprintf(_m('TOOLTIP','%s blocked users'), $nickname),
$action_name == 'blockedfromgroup',
'nav_group_blocked');
$this->out->menuItem(common_local_url('editgroup', array('nickname' =>
$nickname)),
// TRANS: Menu item in the group navigation page. Only shown for group administrators.
_m('MENU','Admin'),
// TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators.
// TRANS: %s is the nickname of the group.
sprintf(_m('TOOLTIP','Edit %s group properties'), $nickname),
$action_name == 'editgroup',
'nav_group_admin');
$this->out->menuItem(common_local_url('grouplogo', array('nickname' =>
$nickname)),
// TRANS: Menu item in the group navigation page. Only shown for group administrators.
......
......@@ -112,12 +112,24 @@ class GroupProfileBlock extends ProfileBlock
Event::handle('EndGroupSubscribe', array($this, $this->group));
}
$this->out->elementEnd('li');
if ($cur && $cur->isAdmin($this->group)) {
$this->out->elementStart('li', 'entity_edit');
$this->out->element('a', array('href' => common_local_url('editgroup',
array('nickname' => $this->group->nickname)),
// TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators.
// TRANS: %s is the nickname of the group.
'title' => sprintf(_m('TOOLTIP','Edit %s group properties'), $nickname)),
// TRANS: Link text for link on user profile.
_m('BUTTON','Edit'));
$this->out->elementEnd('li');
}
if ($cur && $cur->hasRight(Right::DELETEGROUP)) {
$this->out->elementStart('li', 'entity_delete');
$df = new DeleteGroupForm($this->out, $this->group);
$df->show();
$this->out->elementEnd('li');
}
Event::handle('EndGroupActionsList', array($this, $this->group));
}
$this->out->elementEnd('ul');
......
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