X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fgroupmembers.php;h=0f47c268dd30eda6bd4094bc7acbca56c3259031;hb=54d2ed8b057025dee2ea8f531c6371e1008f4b89;hp=d132cdf9670512d5f5083a713726af77b014d90b;hpb=b761cfd4094c778b533cf77570b655d25cfced6b;p=quix0rs-gnu-social.git diff --git a/actions/groupmembers.php b/actions/groupmembers.php index d132cdf967..0f47c268dd 100644 --- a/actions/groupmembers.php +++ b/actions/groupmembers.php @@ -1,6 +1,6 @@ . * * @category Group - * @package Laconica - * @author Evan Prodromou - * @copyright 2008-2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2008-2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -38,10 +38,10 @@ require_once INSTALLDIR.'/lib/publicgroupnav.php'; * List of group members * * @category Group - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ class GroupmembersAction extends GroupDesignAction @@ -73,14 +73,14 @@ class GroupmembersAction extends GroupDesignAction } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } $this->group = User_group::staticGet('nickname', $nickname); if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } @@ -93,7 +93,7 @@ class GroupmembersAction extends GroupDesignAction return sprintf(_('%s group members'), $this->group->nickname); } else { - return sprintf(_('%s group members, page %d'), + return sprintf(_('%1$s group members, page %2$d'), $this->group->nickname, $this->page); } @@ -167,12 +167,24 @@ class GroupMemberListItem extends ProfileListItem $this->group = $group; } + function showFullName() + { + parent::showFullName(); + if ($this->profile->isAdmin($this->group)) { + $this->out->text(' '); + $this->out->element('span', 'role', _('Admin')); + } + } + function showActions() { $this->startActions(); - $this->showSubscribeButton(); - $this->showMakeAdminForm(); - $this->showGroupBlockForm(); + if (Event::handle('StartProfileListItemActionElements', array($this))) { + $this->showSubscribeButton(); + $this->showMakeAdminForm(); + $this->showGroupBlockForm(); + Event::handle('EndProfileListItemActionElements', array($this)); + } $this->endActions(); } @@ -211,11 +223,11 @@ class GroupMemberListItem extends ProfileListItem * Form for blocking a user from a group * * @category Form - * @package Laconica - * @author Evan Prodromou - * @author Sarven Capadisli + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * * @see BlockForm */ @@ -339,11 +351,11 @@ class GroupBlockForm extends Form * Form for making a user an admin for a group * * @category Form - * @package Laconica - * @author Evan Prodromou - * @author Sarven Capadisli + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ class MakeAdminForm extends Form