Merge some of the project editing options into an edit UI
Summary: Ref T4426. This moves "Edit Details", "Edit Picture", and "Archive" to a separate "Edit" interface. "History" becomes part of this UI.
Test Plan:
{F114417}
{F114418}
Reviewers: btrahan, chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T4426
Differential Revision: https://secure.phabricator.com/D8248
This commit is contained in:
@@ -4,7 +4,6 @@ final class PhabricatorProjectProfileController
|
||||
extends PhabricatorProjectController {
|
||||
|
||||
private $id;
|
||||
private $page;
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
@@ -12,7 +11,6 @@ final class PhabricatorProjectProfileController
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->id = idx($data, 'id');
|
||||
$this->page = idx($data, 'page');
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
@@ -200,45 +198,16 @@ final class PhabricatorProjectProfileController
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Edit Project'))
|
||||
->setIcon('edit')
|
||||
->setHref($this->getApplicationURI("edit/{$id}/"))
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(!$can_edit));
|
||||
|
||||
if ($project->isArchived()) {
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Unarchive Project'))
|
||||
->setIcon('enable')
|
||||
->setHref($this->getApplicationURI("archive/{$id}/"))
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(true));
|
||||
} else {
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Archive Project'))
|
||||
->setIcon('disable')
|
||||
->setHref($this->getApplicationURI("archive/{$id}/"))
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(true));
|
||||
}
|
||||
->setHref($this->getApplicationURI("edit/{$id}/")));
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Edit Members'))
|
||||
->setIcon('edit')
|
||||
->setIcon('user')
|
||||
->setHref($this->getApplicationURI("members/{$id}/"))
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(!$can_edit));
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Edit Picture'))
|
||||
->setIcon('image')
|
||||
->setHref($this->getApplicationURI("picture/{$id}/"))
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(!$can_edit));
|
||||
|
||||
|
||||
$action = null;
|
||||
if (!$project->isUserMember($viewer->getPHID())) {
|
||||
$can_join = PhabricatorPolicyFilter::hasCapability(
|
||||
@@ -262,12 +231,6 @@ final class PhabricatorProjectProfileController
|
||||
}
|
||||
$view->addAction($action);
|
||||
|
||||
$view->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('View History'))
|
||||
->setHref($this->getApplicationURI("history/{$id}/"))
|
||||
->setIcon('transcript'));
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
@@ -284,10 +247,6 @@ final class PhabricatorProjectProfileController
|
||||
->setObject($project)
|
||||
->setActionList($actions);
|
||||
|
||||
$view->addProperty(
|
||||
pht('Created'),
|
||||
phabricator_datetime($project->getDateCreated(), $viewer));
|
||||
|
||||
$view->addProperty(
|
||||
pht('Members'),
|
||||
$project->getMemberPHIDs()
|
||||
|
||||
Reference in New Issue
Block a user