diff --git a/src/applications/releeph/controller/ReleephController.php b/src/applications/releeph/controller/ReleephController.php index 83c94debe9..f48d2858e8 100644 --- a/src/applications/releeph/controller/ReleephController.php +++ b/src/applications/releeph/controller/ReleephController.php @@ -2,19 +2,6 @@ abstract class ReleephController extends PhabricatorController { - public function buildStandardPageResponse($view, array $data) { - $page = $this->buildStandardPageView(); - - $page->setApplicationName(pht('Releeph')); - $page->setBaseURI('/releeph/'); - $page->setTitle(idx($data, 'title')); - $page->setGlyph("\xD3\x82"); - $page->appendChild($view); - - $response = new AphrontWebpageResponse(); - return $response->setContent($page->render()); - } - public function buildSideNavView($for_app = false) { $user = $this->getRequest()->getUser(); diff --git a/src/applications/releeph/controller/branch/ReleephBranchCreateController.php b/src/applications/releeph/controller/branch/ReleephBranchCreateController.php index d13383cc3b..e03e432d1f 100644 --- a/src/applications/releeph/controller/branch/ReleephBranchCreateController.php +++ b/src/applications/releeph/controller/branch/ReleephBranchCreateController.php @@ -105,20 +105,29 @@ final class ReleephBranchCreateController extends ReleephProductController { ->addCancelButton($product_uri)); $box = id(new PHUIObjectBoxView()) - ->setHeaderText(pht('New Branch')) + ->setHeaderText(pht('Branch')) ->setFormErrors($errors) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->appendChild($form); - $crumbs = $this->buildApplicationCrumbs(); - $crumbs->addTextCrumb(pht('New Branch')); + $title = pht('New Branch'); + + $crumbs = $this->buildApplicationCrumbs(); + $crumbs->addTextCrumb($title); + $crumbs->setBorder(true); + + $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, - $box, - ), - array( - 'title' => pht('New Branch'), - )); } } diff --git a/src/applications/releeph/controller/branch/ReleephBranchEditController.php b/src/applications/releeph/controller/branch/ReleephBranchEditController.php index 6d66f5d9d5..9d34e78668 100644 --- a/src/applications/releeph/controller/branch/ReleephBranchEditController.php +++ b/src/applications/releeph/controller/branch/ReleephBranchEditController.php @@ -86,23 +86,29 @@ final class ReleephBranchEditController extends ReleephBranchController { ->setValue(pht('Save Branch'))); $title = pht( - 'Edit Branch %s', + 'Edit Branch: %s', $branch->getDisplayNameWithDetail()); + $box = id(new PHUIObjectBoxView()) + ->setHeaderText(pht('Branch')) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) + ->appendChild($form); + $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb(pht('Edit')); + $crumbs->setBorder(true); - $box = id(new PHUIObjectBoxView()) - ->setHeaderText($title) - ->appendChild($form); + $header = id(new PHUIHeaderView()) + ->setHeader(pht('Edit Branch')) + ->setHeaderIcon('fa-pencil'); - return $this->buildApplicationPage( - array( - $crumbs, - $box, - ), - array( - 'title' => $title, - )); + $view = id(new PHUITwoColumnView()) + ->setHeader($header) + ->setFooter($box); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild($view); } } diff --git a/src/applications/releeph/controller/branch/ReleephBranchHistoryController.php b/src/applications/releeph/controller/branch/ReleephBranchHistoryController.php index a77cdf8fb3..5a07a5c879 100644 --- a/src/applications/releeph/controller/branch/ReleephBranchHistoryController.php +++ b/src/applications/releeph/controller/branch/ReleephBranchHistoryController.php @@ -27,15 +27,15 @@ final class ReleephBranchHistoryController extends ReleephBranchController { $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb(pht('History')); + $crumbs->setBorder(true); + + $title = pht('Branch History'); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild($timeline); - return $this->buildApplicationPage( - array( - $crumbs, - $timeline, - ), - array( - 'title' => pht('Branch History'), - )); } } diff --git a/src/applications/releeph/controller/product/ReleephProductCreateController.php b/src/applications/releeph/controller/product/ReleephProductCreateController.php index 2aedf8cdf1..12da2ea3f4 100644 --- a/src/applications/releeph/controller/product/ReleephProductCreateController.php +++ b/src/applications/releeph/controller/product/ReleephProductCreateController.php @@ -91,22 +91,30 @@ final class ReleephProductCreateController extends ReleephProductController { ->addCancelButton('/releeph/project/') ->setValue(pht('Create Release Product'))); - $form_box = id(new PHUIObjectBoxView()) - ->setHeaderText(pht('Create New Product')) + $box = id(new PHUIObjectBoxView()) + ->setHeaderText(pht('Product')) ->setFormErrors($errors) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->setForm($form); + $title = pht('Create New Product'); + $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb(pht('New Product')); + $crumbs->setBorder(true); - return $this->buildApplicationPage( - array( - $crumbs, - $form_box, - ), - array( - 'title' => pht('Create New Product'), - )); + $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); } private function getRepositorySelectOptions() { diff --git a/src/applications/releeph/controller/product/ReleephProductEditController.php b/src/applications/releeph/controller/product/ReleephProductEditController.php index 6a58a39bd9..7938f0d930 100644 --- a/src/applications/releeph/controller/product/ReleephProductEditController.php +++ b/src/applications/releeph/controller/product/ReleephProductEditController.php @@ -195,22 +195,30 @@ final class ReleephProductEditController extends ReleephProductController { ->setValue(pht('Save'))); $box = id(new PHUIObjectBoxView()) - ->setHeaderText(pht('Edit Releeph Product')) + ->setHeaderText(pht('Product')) ->setFormErrors($errors) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->appendChild($form); + $title = pht('Edit Product'); + $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb(pht('Edit Product')); + $crumbs->setBorder(true); + + $header = id(new PHUIHeaderView()) + ->setHeader($title) + ->setHeaderIcon('fa-pencil'); + + $view = id(new PHUITwoColumnView()) + ->setHeader($header) + ->setFooter($box); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild($view); - return $this->buildStandardPageResponse( - array( - $crumbs, - $box, - ), - array( - 'title' => pht('Edit Releeph Product'), - 'device' => true, - )); } private function getBranchHelpText() { diff --git a/src/applications/releeph/controller/product/ReleephProductHistoryController.php b/src/applications/releeph/controller/product/ReleephProductHistoryController.php index ebe9f15725..12d0d0b5c1 100644 --- a/src/applications/releeph/controller/product/ReleephProductHistoryController.php +++ b/src/applications/releeph/controller/product/ReleephProductHistoryController.php @@ -28,14 +28,12 @@ final class ReleephProductHistoryController extends ReleephProductController { $crumbs->addTextCrumb(pht('History')); $crumbs->setBorder(true); - return $this->buildApplicationPage( - array( - $crumbs, - $timeline, - ), - array( - 'title' => pht('Product History'), - )); + $title = pht('Product History'); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild($timeline); } } diff --git a/src/applications/releeph/controller/request/ReleephRequestEditController.php b/src/applications/releeph/controller/request/ReleephRequestEditController.php index d5f5187349..af7adc2c83 100644 --- a/src/applications/releeph/controller/request/ReleephRequestEditController.php +++ b/src/applications/releeph/controller/request/ReleephRequestEditController.php @@ -275,12 +275,14 @@ final class ReleephRequestEditController extends ReleephBranchController { if ($is_edit) { $title = pht('Edit Pull Request'); $submit_name = pht('Save'); + $header_icon = 'fa-pencil'; $crumbs->addTextCrumb($pull->getMonogram(), '/'.$pull->getMonogram()); $crumbs->addTextCrumb(pht('Edit')); } else { $title = pht('Create Pull Request'); $submit_name = pht('Create Pull Request'); + $header_icon = 'fa-plus-square'; $crumbs->addTextCrumb(pht('New Pull Request')); } @@ -291,18 +293,28 @@ final class ReleephRequestEditController extends ReleephBranchController { ->setValue($submit_name)); $box = id(new PHUIObjectBoxView()) - ->setHeaderText($title) + ->setHeaderText(pht('Request')) ->setFormErrors($errors) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->appendChild($form); - return $this->buildApplicationPage( - array( - $crumbs, + $crumbs->setBorder(true); + + $header = id(new PHUIHeaderView()) + ->setHeader($title) + ->setHeaderIcon($header_icon); + + $view = id(new PHUITwoColumnView()) + ->setHeader($header) + ->setFooter(array( $notice_view, $box, - ), - array( - 'title' => $title, )); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild($view); + } } diff --git a/src/applications/releeph/controller/request/ReleephRequestViewController.php b/src/applications/releeph/controller/request/ReleephRequestViewController.php index 694505cd20..c404e31579 100644 --- a/src/applications/releeph/controller/request/ReleephRequestViewController.php +++ b/src/applications/releeph/controller/request/ReleephRequestViewController.php @@ -76,17 +76,25 @@ final class ReleephRequestViewController $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb($pull->getMonogram(), '/'.$pull->getMonogram()); + $crumbs->setBorder(true); - return $this->buildStandardPageResponse( - array( - $crumbs, + $header = id(new PHUIHeaderView()) + ->setHeader($title) + ->setHeaderIcon('fa-flag-checkered'); + + $view = id(new PHUITwoColumnView()) + ->setHeader($header) + ->setFooter(array( $pull_box, $timeline, $add_comment_form, - ), - array( - 'title' => $title, )); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild($view); + }