Move roles and status into properties on profile view
Summary: See discussion in D6403.
Test Plan: {F49488}
Reviewers: chad, btrahan
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D6409
This commit is contained in:
@@ -36,41 +36,6 @@ final class PhabricatorPeopleProfileController
|
||||
->setSubheader($profile->getTitle())
|
||||
->setImage($picture);
|
||||
|
||||
if ($user->getIsDisabled()) {
|
||||
$header->addTag(
|
||||
id(new PhabricatorTagView())
|
||||
->setType(PhabricatorTagView::TYPE_STATE)
|
||||
->setBackgroundColor(PhabricatorTagView::COLOR_GREY)
|
||||
->setName(pht('Disabled')));
|
||||
}
|
||||
|
||||
if ($user->getIsAdmin()) {
|
||||
$header->addTag(
|
||||
id(new PhabricatorTagView())
|
||||
->setType(PhabricatorTagView::TYPE_STATE)
|
||||
->setBackgroundColor(PhabricatorTagView::COLOR_RED)
|
||||
->setName(pht('Administrator')));
|
||||
}
|
||||
|
||||
if ($user->getIsSystemAgent()) {
|
||||
$header->addTag(
|
||||
id(new PhabricatorTagView())
|
||||
->setType(PhabricatorTagView::TYPE_STATE)
|
||||
->setBackgroundColor(PhabricatorTagView::COLOR_BLUE)
|
||||
->setName(pht('Bot')));
|
||||
}
|
||||
|
||||
|
||||
$statuses = id(new PhabricatorUserStatus())
|
||||
->loadCurrentStatuses(array($user->getPHID()));
|
||||
if ($statuses) {
|
||||
$header->addTag(
|
||||
id(new PhabricatorTagView())
|
||||
->setType(PhabricatorTagView::TYPE_STATE)
|
||||
->setBackgroundColor(PhabricatorTagView::COLOR_ORANGE)
|
||||
->setName(head($statuses)->getTerseSummary($viewer)));
|
||||
}
|
||||
|
||||
$actions = id(new PhabricatorActionListView())
|
||||
->setObject($user)
|
||||
->setUser($viewer);
|
||||
|
||||
Reference in New Issue
Block a user