diff --git a/src/applications/diffusion/controller/DiffusionBranchTableController.php b/src/applications/diffusion/controller/DiffusionBranchTableController.php index 388eb9d568..4f0c494110 100644 --- a/src/applications/diffusion/controller/DiffusionBranchTableController.php +++ b/src/applications/diffusion/controller/DiffusionBranchTableController.php @@ -45,10 +45,9 @@ final class DiffusionBranchTableController extends DiffusionController { ->setCommits($commits) ->setDiffusionRequest($drequest); - $panel = id(new AphrontPanelView()) - ->setNoBackground(true) - ->appendChild($view) - ->appendChild($pager); + $panel = id(new PHUIObjectBoxView()) + ->setHeaderText(pht('Branches')) + ->appendChild($view); $content = $panel; } @@ -62,6 +61,7 @@ final class DiffusionBranchTableController extends DiffusionController { array( $crumbs, $content, + $pager, ), array( 'title' => array( diff --git a/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php b/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php index 2be77a134e..833e108648 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php @@ -57,9 +57,9 @@ final class DiffusionBrowseDirectoryController $browse_table->setPaths($results->getPaths()); $browse_table->setUser($request->getUser()); - $browse_panel = new AphrontPanelView(); + $browse_panel = new PHUIObjectBoxView(); + $browse_panel->setHeaderText($drequest->getPath(), '/'); $browse_panel->appendChild($browse_table); - $browse_panel->setNoBackground(); $content[] = $browse_panel; } diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php index 01a96a6456..d55fdfbdf4 100644 --- a/src/applications/diffusion/controller/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/DiffusionCommitController.php @@ -899,9 +899,11 @@ final class DiffusionCommitController extends DiffusionController { $caption = null; if (count($merges) > $limit) { $merges = array_slice($merges, 0, $limit); - $caption = - "This commit merges more than {$limit} changes. Only the first ". - "{$limit} are shown."; + $caption = new PHUIInfoView(); + $caption->setSeverity(PHUIInfoView::SEVERITY_NOTICE); + $caption->appendChild( + pht('This commit merges more than %d changes. Only the first '. + '%d are shown.', $limit)); } $history_table = new DiffusionHistoryTableView(); @@ -914,11 +916,12 @@ final class DiffusionCommitController extends DiffusionController { $handles = $this->loadViewerHandles($phids); $history_table->setHandles($handles); - $panel = new AphrontPanelView(); - $panel->setHeader(pht('Merged Changes')); - $panel->setCaption($caption); + $panel = new PHUIObjectBoxView(); + $panel->setHeaderText(pht('Merged Changes')); $panel->appendChild($history_table); - $panel->setNoBackground(); + if ($caption) { + $panel->setErrorView($caption); + } return $panel; } diff --git a/src/applications/diffusion/controller/DiffusionExternalController.php b/src/applications/diffusion/controller/DiffusionExternalController.php index fdffd91da4..228cc53e3e 100644 --- a/src/applications/diffusion/controller/DiffusionExternalController.php +++ b/src/applications/diffusion/controller/DiffusionExternalController.php @@ -124,10 +124,14 @@ final class DiffusionExternalController extends DiffusionController { 'wide', )); - $content = new AphrontPanelView(); - $content->setHeader(pht('Multiple Matching Commits')); - $content->setCaption( - pht('This external reference matches multiple known commits.')); + $caption = id(new PHUIInfoView()) + ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) + ->appendChild( + pht('This external reference matches multiple known commits.')); + + $content = new PHUIObjectBoxView(); + $content->setHeaderText(pht('Multiple Matching Commits')); + $content->setErrorView($caption); $content->appendChild($table); } diff --git a/src/applications/diffusion/controller/DiffusionHistoryController.php b/src/applications/diffusion/controller/DiffusionHistoryController.php index 2ac87542f5..36667c5dfe 100644 --- a/src/applications/diffusion/controller/DiffusionHistoryController.php +++ b/src/applications/diffusion/controller/DiffusionHistoryController.php @@ -57,10 +57,9 @@ final class DiffusionHistoryController extends DiffusionController { $history_table->setIsHead($offset == 0); } - $history_panel = new AphrontPanelView(); + $history_panel = new PHUIObjectBoxView(); + $history_panel->setHeaderText(pht('History')); $history_panel->appendChild($history_table); - $history_panel->appendChild($pager); - $history_panel->setNoBackground(); $content[] = $history_panel; @@ -88,6 +87,7 @@ final class DiffusionHistoryController extends DiffusionController { $crumbs, $object_box, $content, + $pager, ), array( 'title' => array( diff --git a/src/applications/diffusion/controller/DiffusionLintController.php b/src/applications/diffusion/controller/DiffusionLintController.php index 8e00727729..5f51d31fe7 100644 --- a/src/applications/diffusion/controller/DiffusionLintController.php +++ b/src/applications/diffusion/controller/DiffusionLintController.php @@ -104,7 +104,6 @@ final class DiffusionLintController extends DiffusionController { $content = array(); - $link = null; if (!$this->diffusionRequest) { $form = id(new AphrontFormView()) ->setUser($user) @@ -122,9 +121,8 @@ final class DiffusionLintController extends DiffusionController { $content[] = id(new AphrontListFilterView())->appendChild($form); } - $content[] = id(new AphrontPanelView()) - ->setNoBackground(true) - ->setCaption($link) + $content[] = id(new PHUIObjectBoxView()) + ->setHeaderText(pht('Lint')) ->appendChild($table); $title = array('Lint'); diff --git a/src/applications/diffusion/controller/DiffusionLintDetailsController.php b/src/applications/diffusion/controller/DiffusionLintDetailsController.php index 255b9e55cd..ba1a1dcbaf 100644 --- a/src/applications/diffusion/controller/DiffusionLintDetailsController.php +++ b/src/applications/diffusion/controller/DiffusionLintDetailsController.php @@ -72,10 +72,9 @@ final class DiffusionLintDetailsController extends DiffusionController { ->setHasMorePages(count($messages) >= $limit) ->setURI($request->getRequestURI(), 'offset'); - $content[] = id(new AphrontPanelView()) - ->setNoBackground(true) - ->appendChild($table) - ->appendChild($pager); + $content[] = id(new PHUIObjectBoxView()) + ->setHeaderText(pht('Lint Details')) + ->appendChild($table); $crumbs = $this->buildCrumbs( array( @@ -88,6 +87,7 @@ final class DiffusionLintDetailsController extends DiffusionController { array( $crumbs, $content, + $pager, ), array( 'title' => diff --git a/src/applications/diffusion/controller/DiffusionSymbolController.php b/src/applications/diffusion/controller/DiffusionSymbolController.php index 104b9fc515..34a291a8cd 100644 --- a/src/applications/diffusion/controller/DiffusionSymbolController.php +++ b/src/applications/diffusion/controller/DiffusionSymbolController.php @@ -137,14 +137,12 @@ final class DiffusionSymbolController extends DiffusionController { $table->setNoDataString( pht('No matching symbol could be found in any indexed project.')); - $panel = new AphrontPanelView(); - $panel->setHeader(pht('Similar Symbols')); + $panel = new PHUIObjectBoxView(); + $panel->setHeaderText(pht('Similar Symbols')); $panel->appendChild($table); return $this->buildApplicationPage( - array( - $panel, - ), + $panel, array( 'title' => pht('Find Symbol'), )); diff --git a/src/applications/diffusion/controller/DiffusionTagListController.php b/src/applications/diffusion/controller/DiffusionTagListController.php index bf2c2f84ce..349df62520 100644 --- a/src/applications/diffusion/controller/DiffusionTagListController.php +++ b/src/applications/diffusion/controller/DiffusionTagListController.php @@ -66,10 +66,9 @@ final class DiffusionTagListController extends DiffusionController { $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); - $panel = id(new AphrontPanelView()) - ->setNoBackground(true) - ->appendChild($view) - ->appendChild($pager); + $panel = id(new PHUIObjectBoxView()) + ->setHeaderText(pht('Tags')) + ->appendChild($view); $content = $panel; } @@ -84,6 +83,7 @@ final class DiffusionTagListController extends DiffusionController { array( $crumbs, $content, + $pager, ), array( 'title' => array(