mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 09:42:41 +01:00
5960b1c8a3
Summary: Ref T11957. When you click a dashboard item, it now sends you to `/<app>/item/view/123/`, which renders the proper crumbs, navigation, etc., with the dashboard as page content. This works as you'd expect in Projects: {F2508568} It's sliiiightly odd in Favorites since we nuke the nav menu, but seems basically fine? {F2508571} Test Plan: - Created a dashboard panel on a project. - Clicked it, saw it render. - Made it the default panel, viewed project default screen, saw dashboard. - Disabled every panel I could, still saw reasonable behavior (this is silly anyway). Reviewers: chad Reviewed By: chad Maniphest Tasks: T11957 Differential Revision: https://secure.phabricator.com/D17255
37 lines
942 B
PHP
37 lines
942 B
PHP
<?php
|
|
|
|
final class PhabricatorProjectViewController
|
|
extends PhabricatorProjectController {
|
|
|
|
public function shouldAllowPublic() {
|
|
return true;
|
|
}
|
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
$request = $this->getRequest();
|
|
$viewer = $request->getViewer();
|
|
|
|
$response = $this->loadProject();
|
|
if ($response) {
|
|
return $response;
|
|
}
|
|
$project = $this->getProject();
|
|
|
|
$engine = $this->getProfileMenuEngine();
|
|
$default = $engine->getDefaultItem();
|
|
|
|
switch ($default->getBuiltinKey()) {
|
|
case PhabricatorProject::ITEM_WORKBOARD:
|
|
$controller_object = new PhabricatorProjectBoardViewController();
|
|
break;
|
|
case PhabricatorProject::ITEM_PROFILE:
|
|
$controller_object = new PhabricatorProjectProfileController();
|
|
break;
|
|
default:
|
|
return $engine->buildResponse();
|
|
}
|
|
|
|
return $this->delegateToController($controller_object);
|
|
}
|
|
|
|
}
|