Differential D8685 Diff 21558 src/applications/people/controller/PhabricatorPeopleProfileController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/controller/PhabricatorPeopleProfileController.php
| Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | $actions->addAction( | ||||
| id(new PhabricatorActionView()) | id(new PhabricatorActionView()) | ||||
| ->setIcon('image') | ->setIcon('image') | ||||
| ->setName(pht('Edit Profile Picture')) | ->setName(pht('Edit Profile Picture')) | ||||
| ->setHref($this->getApplicationURI('picture/'.$user->getID().'/')) | ->setHref($this->getApplicationURI('picture/'.$user->getID().'/')) | ||||
| ->setDisabled(!$can_edit) | ->setDisabled(!$can_edit) | ||||
| ->setWorkflow(!$can_edit)); | ->setWorkflow(!$can_edit)); | ||||
| if ($viewer->getIsAdmin()) { | if ($viewer->getIsAdmin()) { | ||||
| $dd = phutil_tag('span', array('class' => 'action-view-caret'), ''); | |||||
| $admin_text = pht('Admisistrate User %s', $dd); | |||||
btrahan: Admisistration is the worst | |||||
| $actions->addAction( | $actions->addAction( | ||||
| id(new PhabricatorActionView()) | id(new PhabricatorActionView()) | ||||
| ->setIcon('wrench') | ->setIsContainer(true) | ||||
| ->setIcon('user') | |||||
| ->setGroupKey('user.admin') | |||||
| ->setName($admin_text)); | |||||
| $actions->addAction( | |||||
| id(new PhabricatorActionView()) | |||||
| ->setGroupKey('user.admin') | |||||
| ->setIcon('none') | |||||
chadUnsubmitted Not Done Inline Actions? chad: ? | |||||
chadUnsubmitted Not Done Inline Actions? chad: ? | |||||
chadUnsubmitted Not Done Inline Actions? chad: ? | |||||
chadUnsubmitted Not Done Inline ActionsI was referring to the spacing / alignment issues of the highlight in Differential on the third ? Was that not obvious? chad: I was referring to the spacing / alignment issues of the highlight in Differential on the third… | |||||
| ->setName(pht('Edit Settings')) | ->setName(pht('Edit Settings')) | ||||
| ->setDisabled(!$can_edit) | ->setDisabled(!$can_edit) | ||||
| ->setWorkflow(!$can_edit) | ->setWorkflow(!$can_edit) | ||||
| ->setHref('/settings/'.$user->getID().'/')); | ->setHref('/settings/'.$user->getID().'/')); | ||||
| if ($user->getIsAdmin()) { | if ($user->getIsAdmin()) { | ||||
| $empower_icon = 'lower-priority'; | $empower_icon = 'none'; | ||||
| $empower_name = pht('Remove Administrator'); | $empower_name = pht('Remove Administrator'); | ||||
| } else { | } else { | ||||
| $empower_icon = 'raise-priority'; | $empower_icon = 'none'; | ||||
| $empower_name = pht('Make Administrator'); | $empower_name = pht('Make Administrator'); | ||||
| } | } | ||||
| $actions->addAction( | $actions->addAction( | ||||
| id(new PhabricatorActionView()) | id(new PhabricatorActionView()) | ||||
| ->setGroupKey('user.admin') | |||||
| ->setIcon($empower_icon) | ->setIcon($empower_icon) | ||||
| ->setName($empower_name) | ->setName($empower_name) | ||||
| ->setDisabled(($user->getPHID() == $viewer->getPHID())) | ->setDisabled(($user->getPHID() == $viewer->getPHID())) | ||||
| ->setWorkflow(true) | ->setWorkflow(true) | ||||
| ->setHref($this->getApplicationURI('empower/'.$user->getID().'/'))); | ->setHref($this->getApplicationURI('empower/'.$user->getID().'/'))); | ||||
| $actions->addAction( | $actions->addAction( | ||||
| id(new PhabricatorActionView()) | id(new PhabricatorActionView()) | ||||
| ->setIcon('tag') | ->setGroupKey('user.admin') | ||||
| ->setIcon('none') | |||||
| ->setName(pht('Change Username')) | ->setName(pht('Change Username')) | ||||
| ->setWorkflow(true) | ->setWorkflow(true) | ||||
| ->setHref($this->getApplicationURI('rename/'.$user->getID().'/'))); | ->setHref($this->getApplicationURI('rename/'.$user->getID().'/'))); | ||||
| if ($user->getIsDisabled()) { | if ($user->getIsDisabled()) { | ||||
| $disable_icon = 'enable'; | $disable_icon = 'none'; | ||||
| $disable_name = pht('Enable User'); | $disable_name = pht('Enable User'); | ||||
| } else { | } else { | ||||
| $disable_icon = 'disable'; | $disable_icon = 'none'; | ||||
| $disable_name = pht('Disable User'); | $disable_name = pht('Disable User'); | ||||
| } | } | ||||
| $actions->addAction( | $actions->addAction( | ||||
| id(new PhabricatorActionView()) | id(new PhabricatorActionView()) | ||||
| ->setGroupKey('user.admin') | |||||
| ->setIcon($disable_icon) | ->setIcon($disable_icon) | ||||
| ->setName($disable_name) | ->setName($disable_name) | ||||
| ->setDisabled(($user->getPHID() == $viewer->getPHID())) | ->setDisabled(($user->getPHID() == $viewer->getPHID())) | ||||
| ->setWorkflow(true) | ->setWorkflow(true) | ||||
| ->setHref($this->getApplicationURI('disable/'.$user->getID().'/'))); | ->setHref($this->getApplicationURI('disable/'.$user->getID().'/'))); | ||||
| $actions->addAction( | $actions->addAction( | ||||
| id(new PhabricatorActionView()) | id(new PhabricatorActionView()) | ||||
| ->setIcon('delete') | ->setGroupKey('user.admin') | ||||
| ->setIcon('none') | |||||
| ->setName(pht('Delete User')) | ->setName(pht('Delete User')) | ||||
| ->setDisabled(($user->getPHID() == $viewer->getPHID())) | ->setDisabled(($user->getPHID() == $viewer->getPHID())) | ||||
| ->setWorkflow(true) | ->setWorkflow(true) | ||||
| ->setHref($this->getApplicationURI('delete/'.$user->getID().'/'))); | ->setHref($this->getApplicationURI('delete/'.$user->getID().'/'))); | ||||
| $actions->addAction( | $actions->addAction( | ||||
| id(new PhabricatorActionView()) | id(new PhabricatorActionView()) | ||||
| ->setIcon('message') | ->setGroupKey('user.admin') | ||||
| ->setIcon('none') | |||||
| ->setName(pht('Send Welcome Email')) | ->setName(pht('Send Welcome Email')) | ||||
| ->setWorkflow(true) | ->setWorkflow(true) | ||||
| ->setHref($this->getApplicationURI('welcome/'.$user->getID().'/'))); | ->setHref($this->getApplicationURI('welcome/'.$user->getID().'/'))); | ||||
| } | } | ||||
| $properties = $this->buildPropertyView($user, $actions); | $properties = $this->buildPropertyView($user, $actions); | ||||
| $crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
| $crumbs->addTextCrumb($user->getUsername()); | $crumbs->addTextCrumb($user->getUsername()); | ||||
| $crumbs->setActionList($actions); | |||||
| $feed = $this->renderUserFeed($user); | $feed = $this->renderUserFeed($user); | ||||
| $calendar = $this->renderUserCalendar($user); | $calendar = $this->renderUserCalendar($user); | ||||
| $activity = phutil_tag( | $activity = phutil_tag( | ||||
| 'div', | 'div', | ||||
| array( | array( | ||||
| 'class' => 'profile-activity-view grouped' | 'class' => 'profile-activity-view grouped' | ||||
| ), | ), | ||||
| array( | array( | ||||
| ▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines | |||||
Admisistration is the worst