Allow menu items to render their own content; make Dashboard items render on-page

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
This commit is contained in:
epriestley
2017-01-26 12:14:02 -08:00
parent 3b8e2739fc
commit 5960b1c8a3
10 changed files with 113 additions and 27 deletions

View File

@@ -25,9 +25,10 @@ final class PhabricatorProjectViewController
$controller_object = new PhabricatorProjectBoardViewController();
break;
case PhabricatorProject::ITEM_PROFILE:
default:
$controller_object = new PhabricatorProjectProfileController();
break;
default:
return $engine->buildResponse();
}
return $this->delegateToController($controller_object);