move edit choice to group profile block

This commit is contained in:
Evan Prodromou 2011-08-27 15:10:47 -04:00
parent ebaf5a972e
commit 6ae214afb6
2 changed files with 12 additions and 9 deletions

View File

@ -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.

View File

@ -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');