diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 8005c24268..6ef5cdf1ae 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -7,7 +7,7 @@ */ return array( 'names' => array( - 'core.pkg.css' => '2e669d0e', + 'core.pkg.css' => 'cb58febe', 'core.pkg.js' => '23d653bb', 'darkconsole.pkg.js' => '8ab24e01', 'differential.pkg.css' => '4c3242f8', @@ -17,7 +17,6 @@ return array( 'maniphest.pkg.css' => '68d4dd3d', 'maniphest.pkg.js' => 'df4aa49f', 'rsrc/css/aphront/aphront-bars.css' => '231ac33c', - 'rsrc/css/aphront/context-bar.css' => '1c3b0529', 'rsrc/css/aphront/dark-console.css' => '6378ef3d', 'rsrc/css/aphront/dialog-view.css' => 'd2e76b88', 'rsrc/css/aphront/lightbox-attachment.css' => '7acac05d', @@ -128,7 +127,6 @@ return array( 'rsrc/css/phui/phui-button.css' => '21cb97f9', 'rsrc/css/phui/phui-crumbs-view.css' => '594d719e', 'rsrc/css/phui/phui-document.css' => '620b1eec', - 'rsrc/css/phui/phui-error-view.css' => 'ffc48131', 'rsrc/css/phui/phui-feed-story.css' => 'c9f3a0b5', 'rsrc/css/phui/phui-fontkit.css' => '4394f216', 'rsrc/css/phui/phui-form-view.css' => '8b78a986', @@ -137,6 +135,7 @@ return array( 'rsrc/css/phui/phui-icon.css' => 'd35aa857', 'rsrc/css/phui/phui-image-mask.css' => '5a8b09c8', 'rsrc/css/phui/phui-info-panel.css' => '27ea50a1', + 'rsrc/css/phui/phui-info-view.css' => '0c8e5d50', 'rsrc/css/phui/phui-list.css' => '53deb25c', 'rsrc/css/phui/phui-object-box.css' => 'd68ce5dc', 'rsrc/css/phui/phui-object-item-list-view.css' => '9db65899', @@ -500,7 +499,6 @@ return array( 'symbols' => array( 'almanac-css' => 'dbb9b3af', 'aphront-bars' => '231ac33c', - 'aphront-contextbar-view-css' => '1c3b0529', 'aphront-dark-console-css' => '6378ef3d', 'aphront-dialog-view-css' => 'd2e76b88', 'aphront-list-filter-view-css' => '2ae43867', @@ -791,7 +789,7 @@ return array( 'phui-icon-view-css' => 'd35aa857', 'phui-image-mask-css' => '5a8b09c8', 'phui-info-panel-css' => '27ea50a1', - 'phui-info-view-css' => 'ffc48131', + 'phui-info-view-css' => '0c8e5d50', 'phui-list-view-css' => '53deb25c', 'phui-object-box-css' => 'd68ce5dc', 'phui-object-item-list-view-css' => '9db65899', diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 9dea0dcf3a..fdf472b1e9 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -102,7 +102,6 @@ phutil_register_library_map(array( 'AphrontBarView' => 'view/widget/bars/AphrontBarView.php', 'AphrontCSRFException' => 'aphront/exception/AphrontCSRFException.php', 'AphrontCalendarEventView' => 'applications/calendar/view/AphrontCalendarEventView.php', - 'AphrontContextBarView' => 'view/layout/AphrontContextBarView.php', 'AphrontController' => 'aphront/AphrontController.php', 'AphrontCursorPagerView' => 'view/control/AphrontCursorPagerView.php', 'AphrontDefaultApplicationConfiguration' => 'aphront/configuration/AphrontDefaultApplicationConfiguration.php', @@ -3253,7 +3252,6 @@ phutil_register_library_map(array( 'AphrontBarView' => 'AphrontView', 'AphrontCSRFException' => 'AphrontException', 'AphrontCalendarEventView' => 'AphrontView', - 'AphrontContextBarView' => 'AphrontView', 'AphrontController' => 'Phobject', 'AphrontCursorPagerView' => 'AphrontView', 'AphrontDefaultApplicationConfiguration' => 'AphrontApplicationConfiguration', diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php index e24050a1cc..4352e4b714 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php @@ -88,38 +88,30 @@ final class ManiphestTaskDetailController extends ManiphestController { $handles = $this->getLoadedHandles(); - $context_bar = null; - + $info_view = null; if ($parent_task) { - $context_bar = new AphrontContextBarView(); - $context_bar->addButton(phutil_tag( - 'a', - array( - 'href' => '/maniphest/task/create/?parent='.$parent_task->getID(), - 'class' => 'green button', - ), - pht('Create Another Subtask'))); - $context_bar->appendChild(hsprintf( + $info_view = new PHUIInfoView(); + $info_view->setSeverity(PHUIInfoView::SEVERITY_NOTICE); + $info_view->addButton( + id(new PHUIButtonView()) + ->setHref('/maniphest/task/create/?parent='.$parent_task->getID()) + ->setText(pht('Create Another Subtask'))); + + $info_view->appendChild(hsprintf( 'Created a subtask of %s', $this->getHandle($parent_task->getPHID())->renderLink())); } else if ($workflow == 'create') { - $context_bar = new AphrontContextBarView(); - $context_bar->addButton(phutil_tag('label', array(), 'Create Another')); - $context_bar->addButton(phutil_tag( - 'a', - array( - 'href' => '/maniphest/task/create/?template='.$task->getID(), - 'class' => 'green button', - ), - pht('Similar Task'))); - $context_bar->addButton(phutil_tag( - 'a', - array( - 'href' => '/maniphest/task/create/', - 'class' => 'green button', - ), - pht('Empty Task'))); - $context_bar->appendChild(pht('New task created.')); + $info_view = new PHUIInfoView(); + $info_view->setSeverity(PHUIInfoView::SEVERITY_NOTICE); + $info_view->addButton( + id(new PHUIButtonView()) + ->setHref('/maniphest/task/create/?template='.$task->getID()) + ->setText(pht('Similar Task'))); + $info_view->addButton( + id(new PHUIButtonView()) + ->setHref('/maniphest/task/create/') + ->setText(pht('Empty Task'))); + $info_view->appendChild(pht('New task created. Create another?')); } $engine = new PhabricatorMarkupEngine(); @@ -355,6 +347,10 @@ final class ManiphestTaskDetailController extends ManiphestController { ->setHeader($header) ->addPropertyList($properties); + if ($info_view) { + $object_box->setErrorView($info_view); + } + if ($description) { $object_box->addPropertyList($description); } @@ -362,7 +358,6 @@ final class ManiphestTaskDetailController extends ManiphestController { return $this->buildApplicationPage( array( $crumbs, - $context_bar, $object_box, $timeline, $comment_box, diff --git a/src/view/layout/AphrontContextBarView.php b/src/view/layout/AphrontContextBarView.php deleted file mode 100644 index 2d5a6d3637..0000000000 --- a/src/view/layout/AphrontContextBarView.php +++ /dev/null @@ -1,29 +0,0 @@ -buttons[] = $button; - return $this; - } - - public function render() { - $view = new AphrontNullView(); - $view->appendChild($this->buttons); - - require_celerity_resource('aphront-contextbar-view-css'); - - return phutil_tag_div( - 'aphront-contextbar-view', - array( - phutil_tag_div('aphront-contextbar-core', array( - phutil_tag_div('aphront-contextbar-buttons', $view->render()), - phutil_tag_div('aphront-contextbar-content', $this->renderChildren()), - )), - phutil_tag('div', array('style' => 'clear: both;')), - )); - } - -} diff --git a/webroot/rsrc/css/aphront/context-bar.css b/webroot/rsrc/css/aphront/context-bar.css deleted file mode 100644 index b130f3d700..0000000000 --- a/webroot/rsrc/css/aphront/context-bar.css +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @provides aphront-contextbar-view-css - */ - -.aphront-contextbar-view { - background: #fff; - padding: 8px 16px; - border-bottom: 1px solid {$lightblueborder}; -} - -.device-phone .aphront-contextbar-view { - padding: 12px 8px; -} - -.aphront-contextbar-content { - padding-top: 5px; - font-size: 13px; - color: {$bluetext}; -} - -.aphront-contextbar-buttons { - float: right; -} - -.device-phone .aphront-contextbar-buttons { - float: none; -} - -.aphront-contextbar-buttons label { - font-weight: bold; - color: {$bluetext}; -} - -.device-phone .aphront-contextbar-buttons label { - display: block; - margin-bottom: 4px; -} - -.aphront-contextbar-buttons a { - margin: 0 0 0 8px; -} - -.device-phone .aphront-contextbar-buttons a { - margin: 0 8px 0 0; -} diff --git a/webroot/rsrc/css/phui/phui-error-view.css b/webroot/rsrc/css/phui/phui-info-view.css similarity index 97% rename from webroot/rsrc/css/phui/phui-error-view.css rename to webroot/rsrc/css/phui/phui-info-view.css index 15b542f29f..c7099d8531 100644 --- a/webroot/rsrc/css/phui/phui-error-view.css +++ b/webroot/rsrc/css/phui/phui-info-view.css @@ -30,6 +30,10 @@ float: right; } +.phui-info-view-actions .button { + margin-left: 4px; +} + .phui-info-view-head + .phui-info-view-body { padding-top: 4px; }