From 51d8570b347205349f0eb049aaf6f6db0ca51d5d Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 13 Jan 2014 12:17:37 -0800 Subject: [PATCH] Clean up diff view page Summary: Cleans up some older layouts to new stuffs. Test Plan: Test with and without a diff ID. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7949 --- resources/celerity/map.php | 6 +++--- .../DifferentialDiffViewController.php | 17 ++++++++++------- webroot/rsrc/css/aphront/error-view.css | 4 ++++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 6e39c1bdb8..b7bfe2b62a 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -7,7 +7,7 @@ return array( 'names' => array( - 'core.pkg.css' => '52fe21de', + 'core.pkg.css' => '6d59624c', 'core.pkg.js' => 'c907bd96', 'darkconsole.pkg.js' => 'ca8671ce', 'differential.pkg.css' => '827749c1', @@ -23,7 +23,7 @@ return array( 'rsrc/css/aphront/context-bar.css' => '1c3b0529', 'rsrc/css/aphront/dark-console.css' => '6378ef3d', 'rsrc/css/aphront/dialog-view.css' => 'dd9db96c', - 'rsrc/css/aphront/error-view.css' => 'ca515eae', + 'rsrc/css/aphront/error-view.css' => '16cd9949', 'rsrc/css/aphront/lightbox-attachment.css' => '686f8885', 'rsrc/css/aphront/list-filter-view.css' => '9f0c29ac', 'rsrc/css/aphront/multi-column.css' => '05bbd016', @@ -475,7 +475,7 @@ return array( 'aphront-contextbar-view-css' => '1c3b0529', 'aphront-dark-console-css' => '6378ef3d', 'aphront-dialog-view-css' => 'dd9db96c', - 'aphront-error-view-css' => 'ca515eae', + 'aphront-error-view-css' => '16cd9949', 'aphront-list-filter-view-css' => '9f0c29ac', 'aphront-multi-column-view-css' => '05bbd016', 'aphront-notes' => '6acadd3f', diff --git a/src/applications/differential/controller/DifferentialDiffViewController.php b/src/applications/differential/controller/DifferentialDiffViewController.php index 1063b5338f..b20c6cd8d0 100644 --- a/src/applications/differential/controller/DifferentialDiffViewController.php +++ b/src/applications/differential/controller/DifferentialDiffViewController.php @@ -20,10 +20,10 @@ final class DifferentialDiffViewController extends DifferentialController { return new Aphront404Response(); } + $error_view = id(new AphrontErrorView()) + ->setSeverity(AphrontErrorView::SEVERITY_NOTICE); if ($diff->getRevisionID()) { - $top_part = id(new AphrontErrorView()) - ->setSeverity(AphrontErrorView::SEVERITY_NOTICE) - ->appendChild( + $error_view->appendChild( pht( 'This diff belongs to revision %s.', phutil_tag( @@ -85,7 +85,7 @@ final class DifferentialDiffViewController extends DifferentialController { id(new AphrontFormSubmitControl()) ->setValue(pht('Continue'))); - $top_part = $form; + $error_view->appendChild($form); } $props = id(new DifferentialDiffProperty())->loadAllWhere( @@ -148,12 +148,15 @@ final class DifferentialDiffViewController extends DifferentialController { $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb(pht('Diff %d', $diff->getID())); + $prop_box = id(new PHUIObjectBoxView()) + ->setHeader($property_head) + ->addPropertyList($property_view) + ->setErrorView($error_view); + return $this->buildApplicationPage( array( $crumbs, - $top_part, - $property_head, - $property_view, + $prop_box, $table_of_contents, $details, ), diff --git a/webroot/rsrc/css/aphront/error-view.css b/webroot/rsrc/css/aphront/error-view.css index 0bb9a52cc3..f6568c75d5 100644 --- a/webroot/rsrc/css/aphront/error-view.css +++ b/webroot/rsrc/css/aphront/error-view.css @@ -23,6 +23,10 @@ form.aphront-dialog-view .aphront-error-view { margin: 8px; } +.aphront-error-view .phui-form-view { + padding: 0; +} + .aphront-error-view-body { padding: 12px; }