Move member/watch actions to "Members/Watchers" page

Summary:
Ref T10054. This tries to make the members page a bit more consistent and provide hints to users about subproject/milestone membership rules. In particular:

  - You now join, leave, watch, unwatch, add and remove members, and lock and unlock membership from the members screen.
  - We now explain the membership rule for the project on this screen. There are currently four rules:
    - Normal Project: Join/leave normally.
    - Parent Project: Uses subprojects to determine members.
    - Milestone: Uses parent project to determine members.
    - Locked: Membership is locked.
    - (Future) Imported from LDAP/other external sources: Membership is determined by something else.

Test Plan: {F1064878}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15059
This commit is contained in:
epriestley
2016-01-19 16:27:36 -08:00
parent 26500f0545
commit 6b1b21c999
15 changed files with 501 additions and 286 deletions

View File

@@ -18,9 +18,9 @@ final class PhabricatorProjectWatchController
return new Aphront404Response();
}
$project_uri = $this->getApplicationURI('profile/'.$project->getID().'/');
$done_uri = "/project/members/{$id}/";
// You must be a member of a project to
// You must be a member of a project to watch it.
if (!$project->isUserMember($viewer->getPHID())) {
return new Aphront400Response();
}
@@ -56,7 +56,7 @@ final class PhabricatorProjectWatchController
->setContinueOnMissingFields(true)
->applyTransactions($project, $xactions);
return id(new AphrontRedirectResponse())->setURI($project_uri);
return id(new AphrontRedirectResponse())->setURI($done_uri);
}
$dialog = null;
@@ -83,7 +83,7 @@ final class PhabricatorProjectWatchController
return $this->newDialog()
->setTitle($title)
->appendParagraph($body)
->addCancelButton($project_uri)
->addCancelButton($done_uri)
->addSubmitButton($submit);
}