Page MenuHomePhabricator

D18527.id44491.diff
No OneTemporary

D18527.id44491.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -9,7 +9,7 @@
'names' => array(
'conpherence.pkg.css' => 'e68cf1fa',
'conpherence.pkg.js' => 'b5b51108',
- 'core.pkg.css' => '32d72074',
+ 'core.pkg.css' => 'f93acfa7',
'core.pkg.js' => '6c085267',
'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '45951e9e',
@@ -177,7 +177,7 @@
'rsrc/css/phui/phui-status.css' => 'd5263e49',
'rsrc/css/phui/phui-tag-view.css' => 'b4719c50',
'rsrc/css/phui/phui-timeline-view.css' => 'f21db7ca',
- 'rsrc/css/phui/phui-two-column-view.css' => 'bf86c483',
+ 'rsrc/css/phui/phui-two-column-view.css' => '1ade9c5f',
'rsrc/css/phui/workboards/phui-workboard-color.css' => '783cdff5',
'rsrc/css/phui/workboards/phui-workboard.css' => '3bc85455',
'rsrc/css/phui/workboards/phui-workcard.css' => 'cca5fa92',
@@ -872,7 +872,7 @@
'phui-tag-view-css' => 'b4719c50',
'phui-theme-css' => '9f261c6b',
'phui-timeline-view-css' => 'f21db7ca',
- 'phui-two-column-view-css' => 'bf86c483',
+ 'phui-two-column-view-css' => '1ade9c5f',
'phui-workboard-color-css' => '783cdff5',
'phui-workboard-view-css' => '3bc85455',
'phui-workcard-view-css' => 'cca5fa92',
diff --git a/src/applications/settings/editor/PhabricatorSettingsEditEngine.php b/src/applications/settings/editor/PhabricatorSettingsEditEngine.php
--- a/src/applications/settings/editor/PhabricatorSettingsEditEngine.php
+++ b/src/applications/settings/editor/PhabricatorSettingsEditEngine.php
@@ -63,12 +63,13 @@
}
protected function getObjectEditTitleText($object) {
- $user = $object->getUser();
- if ($user) {
- return pht('Edit Settings (%s)', $user->getUserName());
- } else {
- return pht('Edit Global Settings');
+ $page = $this->getSelectedPage();
+
+ if ($page) {
+ return $page->getLabel();
}
+
+ return pht('Settings');
}
protected function getObjectEditShortText($object) {
@@ -97,6 +98,20 @@
return pht('Settings');
}
+ protected function getPageHeader($object) {
+ $user = $object->getUser();
+ if ($user) {
+ $text = pht('Edit Settings (%s)', $user->getUserName());
+ } else {
+ $text = pht('Edit Global Settings');
+ }
+
+ $header = id(new PHUIHeaderView())
+ ->setHeader($text);
+
+ return $header;
+ }
+
protected function getEditorURI() {
throw new PhutilMethodNotImplementedException();
}
diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php
--- a/src/applications/transactions/editengine/PhabricatorEditEngine.php
+++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php
@@ -29,6 +29,7 @@
private $page;
private $pages;
private $navigation;
+ private $header;
final public function setViewer(PhabricatorUser $viewer) {
$this->viewer = $viewer;
@@ -313,6 +314,15 @@
/**
+ * @task text
+ */
+ protected function getPageHeader($object) {
+ return null;
+ }
+
+
+
+ /**
* Return a human-readable header describing what this engine is used to do,
* like "Configure Maniphest Task Forms".
*
@@ -1169,6 +1179,9 @@
$form = $this->buildEditForm($object, $fields);
+ $crumbs = $this->buildCrumbs($object, $final = true);
+ $crumbs->setBorder(true);
+
if ($request->isAjax()) {
return $this->getController()
->newDialog()
@@ -1180,21 +1193,18 @@
->addSubmitButton($submit_button);
}
- $crumbs = $this->buildCrumbs($object, $final = true);
-
- $header = id(new PHUIHeaderView())
+ $box_header = id(new PHUIHeaderView())
->setHeader($header_text);
- $crumbs->setBorder(true);
if ($action_button) {
- $header->addActionLink($action_button);
+ $box_header->addActionLink($action_button);
}
$box = id(new PHUIObjectBoxView())
->setUser($viewer)
- ->setHeaderText($this->getObjectName())
+ ->setHeader($box_header)
->setValidationException($validation_exception)
- ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
+ ->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
->appendChild($form);
// This is fairly questionable, but in use by Settings.
@@ -1209,8 +1219,9 @@
$view = new PHUITwoColumnView();
- if ($header) {
- $view->setHeader($header);
+ $page_header = $this->getPageHeader($object);
+ if ($page_header) {
+ $view->setHeader($page_header);
}
$page = $controller->newPage()
diff --git a/src/view/phui/PHUITwoColumnView.php b/src/view/phui/PHUITwoColumnView.php
--- a/src/view/phui/PHUITwoColumnView.php
+++ b/src/view/phui/PHUITwoColumnView.php
@@ -106,6 +106,10 @@
$classes[] = 'with-subheader';
}
+ if (!$this->header) {
+ $classes[] = 'without-header';
+ }
+
return array(
'class' => implode(' ', $classes),
);
diff --git a/webroot/rsrc/css/phui/phui-two-column-view.css b/webroot/rsrc/css/phui/phui-two-column-view.css
--- a/webroot/rsrc/css/phui/phui-two-column-view.css
+++ b/webroot/rsrc/css/phui/phui-two-column-view.css
@@ -13,6 +13,10 @@
margin-bottom: 24px;
}
+.phui-two-column-view.without-header {
+ margin-top: 24px;
+}
+
.device .phui-two-column-view .phui-two-column-header {
margin-bottom: 12px;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 10, 2:14 AM (2 w, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7738562
Default Alt Text
D18527.id44491.diff (5 KB)

Event Timeline