Page MenuHomePhabricator

D9201.diff
No OneTemporary

D9201.diff

diff --git a/src/view/phui/PHUIPropertyListView.php b/src/view/phui/PHUIPropertyListView.php
--- a/src/view/phui/PHUIPropertyListView.php
+++ b/src/view/phui/PHUIPropertyListView.php
@@ -109,7 +109,28 @@
require_celerity_resource('phui-property-list-view-css');
$items = array();
- foreach ($this->parts as $part) {
+
+ $parts = $this->parts;
+
+ // If we have an action list, make sure we render a property part, even
+ // if there are no properties. Otherwise, the action list won't render.
+ if ($this->actionList) {
+ $have_property_part = false;
+ foreach ($this->parts as $part) {
+ if ($part['type'] == 'property') {
+ $have_property_part = true;
+ break;
+ }
+ }
+ if (!$have_property_part) {
+ $parts[] = array(
+ 'type' => 'property',
+ 'list' => array(),
+ );
+ }
+ }
+
+ foreach ($parts as $part) {
$type = $part['type'];
switch ($type) {
case 'property':
@@ -200,11 +221,11 @@
}
return phutil_tag(
- 'div',
- array(
- 'class' => 'phui-property-list-container grouped',
- ),
- array($action_list, $list));
+ 'div',
+ array(
+ 'class' => 'phui-property-list-container grouped',
+ ),
+ array($action_list, $list));
}
private function renderSectionPart(array $part) {

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 5:57 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714689
Default Alt Text
D9201.diff (1 KB)

Event Timeline