Page MenuHomePhabricator

D11920.diff
No OneTemporary

D11920.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- 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 @@
'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 @@
'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 @@
'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 @@
'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 @@
'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
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -102,7 +102,6 @@
'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 @@
'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
--- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php
+++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
@@ -88,38 +88,30 @@
$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 <strong>%s</strong>',
$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 @@
->setHeader($header)
->addPropertyList($properties);
+ if ($info_view) {
+ $object_box->setErrorView($info_view);
+ }
+
if ($description) {
$object_box->addPropertyList($description);
}
@@ -362,7 +358,6 @@
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
--- a/src/view/layout/AphrontContextBarView.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-final class AphrontContextBarView extends AphrontView {
-
- protected $buttons = array();
-
- public function addButton($button) {
- $this->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
--- 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
rename from webroot/rsrc/css/phui/phui-error-view.css
rename to webroot/rsrc/css/phui/phui-info-view.css
--- 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;
}

File Metadata

Mime Type
text/plain
Expires
Wed, May 22, 12:35 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6277396
Default Alt Text
D11920.diff (8 KB)

Event Timeline