From e6421b6ab311966b0e6bbccb53b26df3771df1bb Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 5 Apr 2016 13:32:06 -0700 Subject: [PATCH] Update Home for newPage Summary: Converts /home/ to `newPage` Test Plan: Pull up Quick Create page, home, mobile home. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15626 --- .../PhabricatorHomeMainController.php | 9 +++--- .../PhabricatorHomeQuickCreateController.php | 28 +++++++++++++------ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/applications/home/controller/PhabricatorHomeMainController.php b/src/applications/home/controller/PhabricatorHomeMainController.php index e53c4fac8d..950944188b 100644 --- a/src/applications/home/controller/PhabricatorHomeMainController.php +++ b/src/applications/home/controller/PhabricatorHomeMainController.php @@ -51,11 +51,10 @@ final class PhabricatorHomeMainController extends PhabricatorHomeController { $content = $nav; } - return $this->buildApplicationPage( - $content, - array( - 'title' => 'Phabricator', - )); + return $this->newPage() + ->setTitle('Phabricator') + ->appendChild($content); + } private function buildMainResponse(array $projects) { diff --git a/src/applications/home/controller/PhabricatorHomeQuickCreateController.php b/src/applications/home/controller/PhabricatorHomeQuickCreateController.php index 40f9afeb8c..6429443ed2 100644 --- a/src/applications/home/controller/PhabricatorHomeQuickCreateController.php +++ b/src/applications/home/controller/PhabricatorHomeQuickCreateController.php @@ -19,17 +19,29 @@ final class PhabricatorHomeQuickCreateController ->setHref($item->getHref())); } + $title = pht('Quick Create'); + $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb(pht('Quick Create')); + $crumbs->setBorder(true); + + $box = id(new PHUIObjectBoxView()) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) + ->setObjectList($list); + + $header = id(new PHUIHeaderView()) + ->setHeader($title) + ->setHeaderIcon('fa-plus-square'); + + $view = id(new PHUITwoColumnView()) + ->setHeader($header) + ->setFooter($box); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild($view); - return $this->buildApplicationPage( - array( - $crumbs, - $list, - ), - array( - 'title' => pht('Quick Create'), - )); } }