Revamp Projects with new navigation
Summary:
A refresh of Projects including a new navigations UI.
- New Navigation UI.
- Auto switch default page if Workboard has been initialized
- Move Feed to it's own page
- Increase 'tasks' on Project Home to 50 over 10
- Fix various display bugs on Workboards
- Remove 'crumbs' from Project portal (unneeded).
Test Plan:
- clicked a link for a project with no workboard and saw the profile
- clicked a link for a project with a workboard and saw the workboard
- navigated around the various edit pages, inspecting links and making sure things linked back to the new profile uri
{F266460}
{F266461}
{F266462}
{F266463}
{F266464}
Reviewers: epriestley, btrahan
Reviewed By: epriestley, btrahan
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11272
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorProjectViewController
|
||||
extends PhabricatorProjectController {
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
|
||||
$query = id(new PhabricatorProjectQuery())
|
||||
->setViewer($user)
|
||||
->needMembers(true)
|
||||
->needWatchers(true)
|
||||
->needImages(true)
|
||||
->needSlugs(true);
|
||||
$id = $request->getURIData('id');
|
||||
$slug = $request->getURIData('slug');
|
||||
if ($slug) {
|
||||
$query->withSlugs(array($slug));
|
||||
} else {
|
||||
$query->withIDs(array($id));
|
||||
}
|
||||
$project = $query->executeOne();
|
||||
if (!$project) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
|
||||
$columns = id(new PhabricatorProjectColumnQuery())
|
||||
->setViewer($user)
|
||||
->withProjectPHIDs(array($project->getPHID()))
|
||||
->execute();
|
||||
if ($columns) {
|
||||
$controller = 'board';
|
||||
} else {
|
||||
$controller = 'profile';
|
||||
}
|
||||
|
||||
switch ($controller) {
|
||||
case 'board':
|
||||
$controller_object = new PhabricatorProjectBoardViewController();
|
||||
break;
|
||||
case 'profile':
|
||||
default:
|
||||
$controller_object = new PhabricatorProjectProfileController();
|
||||
break;
|
||||
}
|
||||
|
||||
return $this->delegateToController($controller_object);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user