Page MenuHomePhabricator

D15386.diff
No OneTemporary

D15386.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -72,7 +72,7 @@
'rsrc/css/application/flag/flag.css' => '5337623f',
'rsrc/css/application/harbormaster/harbormaster.css' => '834879db',
'rsrc/css/application/herald/herald-test.css' => 'a52e323e',
- 'rsrc/css/application/herald/herald.css' => '826075fa',
+ 'rsrc/css/application/herald/herald.css' => '46596280',
'rsrc/css/application/maniphest/batch-editor.css' => 'b0f0b6d5',
'rsrc/css/application/maniphest/report.css' => '9b9580b7',
'rsrc/css/application/maniphest/task-edit.css' => 'fda62a9b',
@@ -560,7 +560,7 @@
'font-lato' => 'c7ccd872',
'global-drag-and-drop-css' => '5c1b47c2',
'harbormaster-css' => '834879db',
- 'herald-css' => '826075fa',
+ 'herald-css' => '46596280',
'herald-rule-editor' => '746ca158',
'herald-test-css' => 'a52e323e',
'inline-comment-summary-css' => '51efda3a',
diff --git a/src/applications/herald/controller/HeraldRuleViewController.php b/src/applications/herald/controller/HeraldRuleViewController.php
--- a/src/applications/herald/controller/HeraldRuleViewController.php
+++ b/src/applications/herald/controller/HeraldRuleViewController.php
@@ -18,7 +18,8 @@
$header = id(new PHUIHeaderView())
->setUser($viewer)
->setHeader($rule->getName())
- ->setPolicyObject($rule);
+ ->setPolicyObject($rule)
+ ->setHeaderIcon('fa-bullhorn');
if ($rule->getIsDisabled()) {
$header->setStatus(
@@ -35,6 +36,7 @@
$actions = $this->buildActionView($rule);
$properties = $this->buildPropertyView($rule);
$details = $this->buildPropertySectionView($rule);
+ $description = $this->buildDescriptionView($rule);
$id = $rule->getID();
@@ -57,6 +59,7 @@
->setHeader($header)
->setMainColumn($timeline)
->addPropertySection(pht('DETAILS'), $details)
+ ->addPropertySection(pht('DESCRIPTION'), $description)
->setPropertyList($properties)
->setActionList($actions);
@@ -155,17 +158,24 @@
pht('Trigger Object'),
$viewer->renderHandle($rule->getTriggerObjectPHID()));
}
+ }
- $view->addSectionHeader(
- pht('Rule Description'),
- PHUIPropertyListView::ICON_SUMMARY);
+ return $view;
+ }
+ private function buildDescriptionView(HeraldRule $rule) {
+ $viewer = $this->getRequest()->getUser();
+ $view = id(new PHUIPropertyListView())
+ ->setUser($viewer);
+
+ $adapter = HeraldAdapter::getAdapterForContentType($rule->getContentType());
+ if ($adapter) {
$handles = $viewer->loadHandles(HeraldAdapter::getHandlePHIDs($rule));
$rule_text = $adapter->renderRuleAsText($rule, $handles, $viewer);
$view->addTextContent($rule_text);
+ return $view;
}
-
- return $view;
+ return null;
}
}
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
@@ -130,10 +130,12 @@
if ($sections) {
foreach ($sections as $content) {
- $view[] = id(new PHUIObjectBoxView())
- ->setHeaderText($content[0])
- ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
- ->appendChild($content[1]);
+ if ($content[1]) {
+ $view[] = id(new PHUIObjectBoxView())
+ ->setHeaderText($content[0])
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
+ ->appendChild($content[1]);
+ }
}
}
diff --git a/webroot/rsrc/css/application/herald/herald.css b/webroot/rsrc/css/application/herald/herald.css
--- a/webroot/rsrc/css/application/herald/herald.css
+++ b/webroot/rsrc/css/application/herald/herald.css
@@ -42,16 +42,16 @@
}
.herald-list-description {
- color: {$darkgreytext};
+ color: {$bluetext};
+ font-weight: bold;
padding: 8px 0;
}
.herald-list-icon {
- margin-left: 12px;
- margin-right: 2px;
+ margin-right: 8px;
}
.herald-list-item {
- padding-bottom: 4px;
- color: {$greytext};
+ padding-bottom: 20px;
+ color: {$darkbluetext};
}

File Metadata

Mime Type
text/plain
Expires
Mon, Jun 3, 11:57 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6276822
Default Alt Text
D15386.diff (4 KB)

Event Timeline