Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14004889
D7283.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
85 KB
Referenced Files
None
Subscribers
None
D7283.diff
View Options
Index: scripts/celerity_mapper.php
===================================================================
--- scripts/celerity_mapper.php
+++ scripts/celerity_mapper.php
@@ -112,7 +112,7 @@
'phabricator-application-launch-view-css',
'phabricator-action-list-view-css',
- 'phabricator-property-list-view-css',
+ 'phui-property-list-view-css',
'phabricator-tag-view-css',
'phui-list-view-css',
),
Index: src/__celerity_resource_map__.php
===================================================================
--- src/__celerity_resource_map__.php
+++ src/__celerity_resource_map__.php
@@ -1149,7 +1149,7 @@
),
'diviner-shared-css' =>
array(
- 'uri' => '/res/cba9c99e/rsrc/css/diviner/diviner-shared.css',
+ 'uri' => '/res/2e831eea/rsrc/css/diviner/diviner-shared.css',
'type' => 'css',
'requires' =>
array(
@@ -3387,15 +3387,6 @@
),
'disk' => '/rsrc/css/application/projects/project-tag.css',
),
- 'phabricator-property-list-view-css' =>
- array(
- 'uri' => '/res/31912bb1/rsrc/css/layout/phabricator-property-list-view.css',
- 'type' => 'css',
- 'requires' =>
- array(
- ),
- 'disk' => '/rsrc/css/layout/phabricator-property-list-view.css',
- ),
'phabricator-remarkup-css' =>
array(
'uri' => '/res/7e8988dd/rsrc/css/core/remarkup.css',
@@ -3760,7 +3751,7 @@
),
'phui-document-view-css' =>
array(
- 'uri' => '/res/40e39942/rsrc/css/phui/phui-document.css',
+ 'uri' => '/res/f744b3b2/rsrc/css/phui/phui-document.css',
'type' => 'css',
'requires' =>
array(
@@ -3796,7 +3787,7 @@
),
'phui-header-view-css' =>
array(
- 'uri' => '/res/94208bd6/rsrc/css/phui/phui-header-view.css',
+ 'uri' => '/res/d4cec460/rsrc/css/phui/phui-header-view.css',
'type' => 'css',
'requires' =>
array(
@@ -3848,6 +3839,15 @@
),
'disk' => '/rsrc/css/phui/phui-pinboard-view.css',
),
+ 'phui-property-list-view-css' =>
+ array(
+ 'uri' => '/res/6c937c64/rsrc/css/phui/phui-property-list-view.css',
+ 'type' => 'css',
+ 'requires' =>
+ array(
+ ),
+ 'disk' => '/rsrc/css/phui/phui-property-list-view.css',
+ ),
'phui-remarkup-preview-css' =>
array(
'uri' => '/res/50fa4178/rsrc/css/phui/phui-remarkup-preview.css',
@@ -4220,7 +4220,7 @@
), array(
'packages' =>
array(
- '7cd2ded3' =>
+ '09637a26' =>
array(
'name' => 'core.pkg.css',
'symbols' =>
@@ -4265,11 +4265,11 @@
37 => 'phui-icon-view-css',
38 => 'phabricator-application-launch-view-css',
39 => 'phabricator-action-list-view-css',
- 40 => 'phabricator-property-list-view-css',
+ 40 => 'phui-property-list-view-css',
41 => 'phabricator-tag-view-css',
42 => 'phui-list-view-css',
),
- 'uri' => '/res/pkg/7cd2ded3/core.pkg.css',
+ 'uri' => '/res/pkg/09637a26/core.pkg.css',
'type' => 'css',
),
'64eeda79' =>
@@ -4461,15 +4461,15 @@
),
'reverse' =>
array(
- 'aphront-dialog-view-css' => '7cd2ded3',
- 'aphront-error-view-css' => '7cd2ded3',
- 'aphront-list-filter-view-css' => '7cd2ded3',
- 'aphront-pager-view-css' => '7cd2ded3',
- 'aphront-panel-view-css' => '7cd2ded3',
- 'aphront-table-view-css' => '7cd2ded3',
- 'aphront-tokenizer-control-css' => '7cd2ded3',
- 'aphront-tooltip-css' => '7cd2ded3',
- 'aphront-typeahead-control-css' => '7cd2ded3',
+ 'aphront-dialog-view-css' => '09637a26',
+ 'aphront-error-view-css' => '09637a26',
+ 'aphront-list-filter-view-css' => '09637a26',
+ 'aphront-pager-view-css' => '09637a26',
+ 'aphront-panel-view-css' => '09637a26',
+ 'aphront-table-view-css' => '09637a26',
+ 'aphront-tokenizer-control-css' => '09637a26',
+ 'aphront-tooltip-css' => '09637a26',
+ 'aphront-typeahead-control-css' => '09637a26',
'differential-changeset-view-css' => '4dc2311c',
'differential-core-view-css' => '4dc2311c',
'differential-inline-comment-editor' => '5e9e5c4e',
@@ -4483,7 +4483,7 @@
'differential-table-of-contents-css' => '4dc2311c',
'diffusion-commit-view-css' => 'c8ce2d88',
'diffusion-icons-css' => 'c8ce2d88',
- 'global-drag-and-drop-css' => '7cd2ded3',
+ 'global-drag-and-drop-css' => '09637a26',
'inline-comment-summary-css' => '4dc2311c',
'javelin-aphlict' => '64eeda79',
'javelin-behavior' => '9564fa17',
@@ -4558,56 +4558,56 @@
'javelin-util' => '9564fa17',
'javelin-vector' => '9564fa17',
'javelin-workflow' => '9564fa17',
- 'lightbox-attachment-css' => '7cd2ded3',
+ 'lightbox-attachment-css' => '09637a26',
'maniphest-task-summary-css' => '49898640',
- 'phabricator-action-list-view-css' => '7cd2ded3',
- 'phabricator-application-launch-view-css' => '7cd2ded3',
+ 'phabricator-action-list-view-css' => '09637a26',
+ 'phabricator-application-launch-view-css' => '09637a26',
'phabricator-busy' => '64eeda79',
'phabricator-content-source-view-css' => '4dc2311c',
- 'phabricator-core-css' => '7cd2ded3',
- 'phabricator-crumbs-view-css' => '7cd2ded3',
+ 'phabricator-core-css' => '09637a26',
+ 'phabricator-crumbs-view-css' => '09637a26',
'phabricator-drag-and-drop-file-upload' => '5e9e5c4e',
'phabricator-dropdown-menu' => '64eeda79',
'phabricator-file-upload' => '64eeda79',
- 'phabricator-filetree-view-css' => '7cd2ded3',
- 'phabricator-flag-css' => '7cd2ded3',
+ 'phabricator-filetree-view-css' => '09637a26',
+ 'phabricator-flag-css' => '09637a26',
'phabricator-hovercard' => '64eeda79',
- 'phabricator-jump-nav' => '7cd2ded3',
+ 'phabricator-jump-nav' => '09637a26',
'phabricator-keyboard-shortcut' => '64eeda79',
'phabricator-keyboard-shortcut-manager' => '64eeda79',
- 'phabricator-main-menu-view' => '7cd2ded3',
+ 'phabricator-main-menu-view' => '09637a26',
'phabricator-menu-item' => '64eeda79',
- 'phabricator-nav-view-css' => '7cd2ded3',
+ 'phabricator-nav-view-css' => '09637a26',
'phabricator-notification' => '64eeda79',
- 'phabricator-notification-css' => '7cd2ded3',
- 'phabricator-notification-menu-css' => '7cd2ded3',
+ 'phabricator-notification-css' => '09637a26',
+ 'phabricator-notification-menu-css' => '09637a26',
'phabricator-object-selector-css' => '4dc2311c',
'phabricator-phtize' => '64eeda79',
'phabricator-prefab' => '64eeda79',
'phabricator-project-tag-css' => '49898640',
- 'phabricator-property-list-view-css' => '7cd2ded3',
- 'phabricator-remarkup-css' => '7cd2ded3',
+ 'phabricator-remarkup-css' => '09637a26',
'phabricator-shaped-request' => '5e9e5c4e',
- 'phabricator-side-menu-view-css' => '7cd2ded3',
- 'phabricator-standard-page-view' => '7cd2ded3',
- 'phabricator-tag-view-css' => '7cd2ded3',
+ 'phabricator-side-menu-view-css' => '09637a26',
+ 'phabricator-standard-page-view' => '09637a26',
+ 'phabricator-tag-view-css' => '09637a26',
'phabricator-textareautils' => '64eeda79',
'phabricator-tooltip' => '64eeda79',
- 'phabricator-transaction-view-css' => '7cd2ded3',
- 'phabricator-zindex-css' => '7cd2ded3',
- 'phui-button-css' => '7cd2ded3',
- 'phui-form-css' => '7cd2ded3',
- 'phui-form-view-css' => '7cd2ded3',
- 'phui-header-view-css' => '7cd2ded3',
- 'phui-icon-view-css' => '7cd2ded3',
- 'phui-list-view-css' => '7cd2ded3',
- 'phui-object-item-list-view-css' => '7cd2ded3',
- 'phui-spacing-css' => '7cd2ded3',
- 'sprite-apps-large-css' => '7cd2ded3',
- 'sprite-gradient-css' => '7cd2ded3',
- 'sprite-icons-css' => '7cd2ded3',
- 'sprite-menu-css' => '7cd2ded3',
- 'sprite-status-css' => '7cd2ded3',
- 'syntax-highlighting-css' => '7cd2ded3',
+ 'phabricator-transaction-view-css' => '09637a26',
+ 'phabricator-zindex-css' => '09637a26',
+ 'phui-button-css' => '09637a26',
+ 'phui-form-css' => '09637a26',
+ 'phui-form-view-css' => '09637a26',
+ 'phui-header-view-css' => '09637a26',
+ 'phui-icon-view-css' => '09637a26',
+ 'phui-list-view-css' => '09637a26',
+ 'phui-object-item-list-view-css' => '09637a26',
+ 'phui-property-list-view-css' => '09637a26',
+ 'phui-spacing-css' => '09637a26',
+ 'sprite-apps-large-css' => '09637a26',
+ 'sprite-gradient-css' => '09637a26',
+ 'sprite-icons-css' => '09637a26',
+ 'sprite-menu-css' => '09637a26',
+ 'sprite-status-css' => '09637a26',
+ 'syntax-highlighting-css' => '09637a26',
),
));
Index: src/__phutil_library_map__.php
===================================================================
--- src/__phutil_library_map__.php
+++ src/__phutil_library_map__.php
@@ -788,6 +788,9 @@
'PHUIPagedFormView' => 'view/form/PHUIPagedFormView.php',
'PHUIPinboardItemView' => 'view/phui/PHUIPinboardItemView.php',
'PHUIPinboardView' => 'view/phui/PHUIPinboardView.php',
+ 'PHUIPropertyGroupView' => 'view/phui/PHUIPropertyGroupView.php',
+ 'PHUIPropertyListExample' => 'applications/uiexample/examples/PHUIPropertyListExample.php',
+ 'PHUIPropertyListView' => 'view/phui/PHUIPropertyListView.php',
'PHUIRemarkupPreviewPanel' => 'view/phui/PHUIRemarkupPreviewPanel.php',
'PHUIStatusItemView' => 'view/phui/PHUIStatusItemView.php',
'PHUIStatusListView' => 'view/phui/PHUIStatusListView.php',
@@ -1524,8 +1527,6 @@
'PhabricatorProjectTransaction' => 'applications/project/storage/PhabricatorProjectTransaction.php',
'PhabricatorProjectTransactionType' => 'applications/project/constants/PhabricatorProjectTransactionType.php',
'PhabricatorProjectUpdateController' => 'applications/project/controller/PhabricatorProjectUpdateController.php',
- 'PhabricatorPropertyListExample' => 'applications/uiexample/examples/PhabricatorPropertyListExample.php',
- 'PhabricatorPropertyListView' => 'view/layout/PhabricatorPropertyListView.php',
'PhabricatorQuery' => 'infrastructure/query/PhabricatorQuery.php',
'PhabricatorRecaptchaConfigOptions' => 'applications/config/option/PhabricatorRecaptchaConfigOptions.php',
'PhabricatorRedirectController' => 'applications/base/controller/PhabricatorRedirectController.php',
@@ -2926,6 +2927,9 @@
'PHUIPagedFormView' => 'AphrontTagView',
'PHUIPinboardItemView' => 'AphrontView',
'PHUIPinboardView' => 'AphrontView',
+ 'PHUIPropertyGroupView' => 'AphrontTagView',
+ 'PHUIPropertyListExample' => 'PhabricatorUIExample',
+ 'PHUIPropertyListView' => 'AphrontView',
'PHUIRemarkupPreviewPanel' => 'AphrontTagView',
'PHUIStatusItemView' => 'AphrontTagView',
'PHUIStatusListView' => 'AphrontTagView',
@@ -3726,8 +3730,6 @@
'PhabricatorProjectTransaction' => 'PhabricatorProjectDAO',
'PhabricatorProjectTransactionType' => 'PhabricatorProjectConstants',
'PhabricatorProjectUpdateController' => 'PhabricatorProjectController',
- 'PhabricatorPropertyListExample' => 'PhabricatorUIExample',
- 'PhabricatorPropertyListView' => 'AphrontView',
'PhabricatorRecaptchaConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorRedirectController' => 'PhabricatorController',
'PhabricatorRefreshCSRFController' => 'PhabricatorAuthController',
Index: src/applications/config/controller/PhabricatorConfigAllController.php
===================================================================
--- src/applications/config/controller/PhabricatorConfigAllController.php
+++ src/applications/config/controller/PhabricatorConfigAllController.php
@@ -66,7 +66,7 @@
$versions = $this->loadVersions();
- $version_property_list = id(new PhabricatorPropertyListView());
+ $version_property_list = id(new PHUIPropertyListView());
foreach ($versions as $version) {
list($name, $hash) = $version;
$version_property_list->addProperty($name, $hash);
@@ -74,7 +74,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Current Settings'))
- ->setPropertyList($version_property_list);
+ ->addPropertyList($version_property_list);
$phabricator_root = dirname(phutil_get_library_root('phabricator'));
$version_path = $phabricator_root.'/conf/local/VERSION';
Index: src/applications/countdown/controller/PhabricatorCountdownViewController.php
===================================================================
--- src/applications/countdown/controller/PhabricatorCountdownViewController.php
+++ src/applications/countdown/controller/PhabricatorCountdownViewController.php
@@ -45,12 +45,11 @@
->setHeader($title);
$actions = $this->buildActionListView($countdown);
- $properties = $this->buildPropertyListView($countdown);
+ $properties = $this->buildPropertyListView($countdown, $actions);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
$content = array(
$crumbs,
@@ -99,14 +98,18 @@
return $view;
}
- private function buildPropertyListView(PhabricatorCountdown $countdown) {
+ private function buildPropertyListView(
+ PhabricatorCountdown $countdown,
+ PhabricatorActionListView $actions) {
+
$request = $this->getRequest();
$viewer = $request->getUser();
$this->loadHandles(array($countdown->getAuthorPHID()));
- $view = id(new PhabricatorPropertyListView())
- ->setUser($viewer);
+ $view = id(new PHUIPropertyListView())
+ ->setUser($viewer)
+ ->setActionList($actions);
$view->addProperty(
pht('Author'),
Index: src/applications/daemon/controller/PhabricatorDaemonLogViewController.php
===================================================================
--- src/applications/daemon/controller/PhabricatorDaemonLogViewController.php
+++ src/applications/daemon/controller/PhabricatorDaemonLogViewController.php
@@ -72,11 +72,14 @@
$event_panel->setNoBackground();
$event_panel->appendChild($event_view);
+ $object_box = id(new PHUIObjectBoxView())
+ ->setHeader($header)
+ ->addPropertyList($properties);
+
return $this->buildApplicationPage(
array(
$crumbs,
- $header,
- $properties,
+ $object_box,
$event_panel,
),
array(
@@ -88,7 +91,7 @@
$request = $this->getRequest();
$viewer = $request->getUser();
- $view = id(new PhabricatorPropertyListView())
+ $view = id(new PHUIPropertyListView())
->setUser($viewer);
$id = $daemon->getID();
Index: src/applications/daemon/controller/PhabricatorWorkerTaskDetailController.php
===================================================================
--- src/applications/daemon/controller/PhabricatorWorkerTaskDetailController.php
+++ src/applications/daemon/controller/PhabricatorWorkerTaskDetailController.php
@@ -38,18 +38,20 @@
$task->getID(),
$task->getTaskClass()));
- $actions = $this->buildActionListView($task);
- $properties = $this->buildPropertyListView($task);
+ $actions = $this->buildActionListView($task);
+ $properties = $this->buildPropertyListView($task, $actions);
$retry_head = id(new PHUIHeaderView())
->setHeader(pht('Retries'));
$retry_info = $this->buildRetryListView($task);
+ $object_box = id(new PHUIObjectBoxView())
+ ->setHeader($header)
+ ->addPropertyList($properties);
+
$content = array(
- $header,
- $actions,
- $properties,
+ $object_box,
$retry_head,
$retry_info,
);
@@ -114,8 +116,12 @@
return $view;
}
- private function buildPropertyListView(PhabricatorWorkerTask $task) {
- $view = new PhabricatorPropertyListView();
+ private function buildPropertyListView(
+ PhabricatorWorkerTask $task,
+ PhabricatorActionListView $actions) {
+
+ $view = new PHUIPropertyListView();
+ $view->setActionList($actions);
if ($task->isArchived()) {
switch ($task->getResult()) {
@@ -197,7 +203,7 @@
}
private function buildRetryListView(PhabricatorWorkerTask $task) {
- $view = new PhabricatorPropertyListView();
+ $view = new PHUIPropertyListView();
$data = id(new PhabricatorWorkerTaskData())->load($task->getDataID());
$task->setData($data->getData());
Index: src/applications/differential/controller/DifferentialDiffViewController.php
===================================================================
--- src/applications/differential/controller/DifferentialDiffViewController.php
+++ src/applications/differential/controller/DifferentialDiffViewController.php
@@ -117,7 +117,7 @@
$property_head = id(new PHUIHeaderView())
->setHeader(pht('Properties'));
- $property_view = new PhabricatorPropertyListView();
+ $property_view = new PHUIPropertyListView();
foreach ($dict as $key => $value) {
$property_view->addProperty($key, $value);
}
Index: src/applications/differential/view/DifferentialRevisionDetailView.php
===================================================================
--- src/applications/differential/view/DifferentialRevisionDetailView.php
+++ src/applications/differential/view/DifferentialRevisionDetailView.php
@@ -68,7 +68,7 @@
$actions->addAction($obj);
}
- $properties = id(new PhabricatorPropertyListView())
+ $properties = id(new PHUIPropertyListView())
->setUser($user)
->setObject($revision);
@@ -110,11 +110,11 @@
}
}
$properties->setHasKeyboardShortcuts(true);
+ $properties->setActionList($actions);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
return $object_box;
}
Index: src/applications/diffusion/controller/DiffusionBrowseController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionBrowseController.php
+++ src/applications/diffusion/controller/DiffusionBrowseController.php
@@ -120,11 +120,15 @@
return $view;
}
- protected function buildPropertyView(DiffusionRequest $drequest) {
+ protected function buildPropertyView(
+ DiffusionRequest $drequest,
+ PhabricatorActionListView $actions) {
+
$viewer = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
- ->setUser($viewer);
+ $view = id(new PHUIPropertyListView())
+ ->setUser($viewer)
+ ->setActionList($actions);
$stable_commit = $drequest->getStableCommitName();
$callsign = $drequest->getRepository()->getCallsign();
Index: src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php
+++ src/applications/diffusion/controller/DiffusionBrowseDirectoryController.php
@@ -21,11 +21,12 @@
$reason = $results->getReasonForEmptyResultSet();
$content = array();
+ $actions = $this->buildActionView($drequest);
+ $properties = $this->buildPropertyView($drequest, $actions);
$object_box = id(new PHUIObjectBoxView())
->setHeader($this->buildHeaderView($drequest))
- ->setActionList($this->buildActionView($drequest))
- ->setPropertyList($this->buildPropertyView($drequest));
+ ->addPropertyList($properties);
$content[] = $object_box;
$content[] = $this->renderSearchForm($collapsed = true);
Index: src/applications/diffusion/controller/DiffusionBrowseFileController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionBrowseFileController.php
+++ src/applications/diffusion/controller/DiffusionBrowseFileController.php
@@ -107,10 +107,10 @@
$show_color,
$binary_uri);
+ $properties = $this->buildPropertyView($drequest, $action_list);
$object_box = id(new PHUIObjectBoxView())
->setHeader($this->buildHeaderView($drequest))
- ->setActionList($action_list)
- ->setPropertyList($this->buildPropertyView($drequest));
+ ->addPropertyList($properties);
$content = array();
$content[] = $object_box;
@@ -822,7 +822,7 @@
}
private function buildImageCorpus($file_uri) {
- $properties = new PhabricatorPropertyListView();
+ $properties = new PHUIPropertyListView();
$properties->addProperty(
pht('Image'),
@@ -836,7 +836,7 @@
}
private function buildBinaryCorpus($file_uri, $data) {
- $properties = new PhabricatorPropertyListView();
+ $properties = new PHUIPropertyListView();
$size = strlen($data);
$properties->addTextContent(
Index: src/applications/diffusion/controller/DiffusionBrowseSearchController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionBrowseSearchController.php
+++ src/applications/diffusion/controller/DiffusionBrowseSearchController.php
@@ -5,10 +5,12 @@
public function processRequest() {
$drequest = $this->diffusionRequest;
+ $actions = $this->buildActionView($drequest);
+ $properties = $this->buildPropertyView($drequest, $actions);
+
$object_box = id(new PHUIObjectBoxView())
->setHeader($this->buildHeaderView($drequest))
- ->setActionList($this->buildActionView($drequest))
- ->setPropertyList($this->buildPropertyView($drequest));
+ ->addPropertyList($properties);
$content = array();
Index: src/applications/diffusion/controller/DiffusionChangeController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionChangeController.php
+++ src/applications/diffusion/controller/DiffusionChangeController.php
@@ -81,12 +81,11 @@
->setUser($viewer)
->setPolicyObject($drequest->getRepository());
$actions = $this->buildActionView($drequest);
- $properties = $this->buildPropertyView($drequest);
+ $properties = $this->buildPropertyView($drequest, $actions);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
return $this->buildApplicationPage(
array(
@@ -130,11 +129,15 @@
return $view;
}
- protected function buildPropertyView(DiffusionRequest $drequest) {
+ protected function buildPropertyView(
+ DiffusionRequest $drequest,
+ PhabricatorActionListView $actions) {
+
$viewer = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
- ->setUser($viewer);
+ $view = id(new PHUIPropertyListView())
+ ->setUser($viewer)
+ ->setActionList($actions);
$stable_commit = $drequest->getStableCommitName();
$callsign = $drequest->getRepository()->getCallsign();
Index: src/applications/diffusion/controller/DiffusionCommitController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionCommitController.php
+++ src/applications/diffusion/controller/DiffusionCommitController.php
@@ -113,7 +113,7 @@
$commit_data,
$parents,
$audit_requests);
- $property_list = id(new PhabricatorPropertyListView())
+ $property_list = id(new PHUIPropertyListView())
->setHasKeyboardShortcuts(true)
->setUser($user)
->setObject($commit);
@@ -137,11 +137,11 @@
),
$message));
$content[] = $top_anchor;
+ $property_list->setActionList($headsup_actions);
$object_box = id(new PHUIObjectBoxView())
->setHeader($headsup_view)
- ->setActionList($headsup_actions)
- ->setPropertyList($property_list);
+ ->addPropertyList($property_list);
$content[] = $object_box;
}
Index: src/applications/diffusion/controller/DiffusionHistoryController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionHistoryController.php
+++ src/applications/diffusion/controller/DiffusionHistoryController.php
@@ -70,12 +70,11 @@
->setHeader($this->renderPathLinks($drequest, $mode = 'history'));
$actions = $this->buildActionView($drequest);
- $properties = $this->buildPropertyView($drequest);
+ $properties = $this->buildPropertyView($drequest, $actions);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
$crumbs = $this->buildCrumbs(
array(
@@ -143,11 +142,15 @@
return $view;
}
- protected function buildPropertyView(DiffusionRequest $drequest) {
+ protected function buildPropertyView(
+ DiffusionRequest $drequest,
+ PhabricatorActionListView $actions) {
+
$viewer = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
- ->setUser($viewer);
+ $view = id(new PHUIPropertyListView())
+ ->setUser($viewer)
+ ->setActionList($actions);
$stable_commit = $drequest->getStableCommitName();
$callsign = $drequest->getRepository()->getCallsign();
Index: src/applications/diffusion/controller/DiffusionLintController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionLintController.php
+++ src/applications/diffusion/controller/DiffusionLintController.php
@@ -160,12 +160,12 @@
$properties = $this->buildPropertyView(
$drequest,
$branch,
- $total);
+ $total,
+ $actions);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
} else {
$object_box = null;
}
@@ -316,12 +316,14 @@
protected function buildPropertyView(
DiffusionRequest $drequest,
PhabricatorRepositoryBranch $branch,
- $total) {
+ $total,
+ PhabricatorActionListView $actions) {
$viewer = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
- ->setUser($viewer);
+ $view = id(new PHUIPropertyListView())
+ ->setUser($viewer)
+ ->setActions($actions);
$callsign = $drequest->getRepository()->getCallsign();
$lint_commit = $branch->getLintCommit();
Index: src/applications/diffusion/controller/DiffusionRepositoryController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionRepositoryController.php
+++ src/applications/diffusion/controller/DiffusionRepositoryController.php
@@ -147,7 +147,7 @@
$actions = $this->buildActionList($repository);
- $view = id(new PhabricatorPropertyListView())
+ $view = id(new PHUIPropertyListView())
->setUser($user);
$view->addProperty(pht('Callsign'), $repository->getCallsign());
@@ -174,10 +174,11 @@
$view->addTextContent($description);
}
+ $view->setActionList($actions);
+
return id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($view);
+ ->addPropertyList($view);
}
Index: src/applications/diffusion/controller/DiffusionRepositoryEditBasicController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionRepositoryEditBasicController.php
+++ src/applications/diffusion/controller/DiffusionRepositoryEditBasicController.php
@@ -65,18 +65,16 @@
}
}
- $content = array();
-
$crumbs = $this->buildCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit Basics')));
- $content[] = $crumbs;
$title = pht('Edit %s', $repository->getName());
+ $error_view = null;
if ($errors) {
- $content[] = id(new AphrontErrorView())
+ $error_view = id(new AphrontErrorView())
->setTitle(pht('Form Errors'))
->setErrors($errors);
}
@@ -101,10 +99,15 @@
->appendChild(id(new PHUIFormDividerControl()))
->appendRemarkupInstructions($this->getReadmeInstructions());
- $content[] = $form;
+ $object_box = id(new PHUIObjectBoxView())
+ ->setHeaderText($title)
+ ->setForm($form)
+ ->setFormError($error_view);
return $this->buildApplicationPage(
- $content,
+ array(
+ $crumbs,
+ $object_box),
array(
'title' => $title,
'device' => true,
Index: src/applications/diffusion/controller/DiffusionRepositoryEditController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionRepositoryEditController.php
+++ src/applications/diffusion/controller/DiffusionRepositoryEditController.php
@@ -8,13 +8,10 @@
$drequest = $this->diffusionRequest;
$repository = $drequest->getRepository();
- $content = array();
-
$crumbs = $this->buildCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit')));
- $content[] = $crumbs;
$title = pht('Edit %s', $repository->getName());
@@ -28,25 +25,17 @@
->setBackgroundColor(PhabricatorTagView::COLOR_BLACK));
}
- $content[] = $header;
-
- $content[] = $this->buildBasicActions($repository);
- $content[] = $this->buildBasicProperties($repository);
-
- $content[] = id(new PHUIHeaderView())
- ->setHeader(pht('Policies'));
-
- $content[] = $this->buildPolicyActions($repository);
- $content[] = $this->buildPolicyProperties($repository);
+ $basic_actions = $this->buildBasicActions($repository);
+ $basic_properties =
+ $this->buildBasicProperties($repository, $basic_actions);
- $content[] = id(new PHUIHeaderView())
- ->setHeader(pht('Text Encoding'));
+ $policy_actions = $this->buildPolicyActions($repository);
+ $policy_properties =
+ $this->buildPolicyProperties($repository, $policy_actions);
- $content[] = $this->buildEncodingActions($repository);
- $content[] = $this->buildEncodingProperties($repository);
-
- $content[] = id(new PHUIHeaderView())
- ->setHeader(pht('Edit History'));
+ $encoding_actions = $this->buildEncodingActions($repository);
+ $encoding_properties =
+ $this->buildEncodingProperties($repository, $encoding_actions);
$xactions = id(new PhabricatorRepositoryTransactionQuery())
->setViewer($user)
@@ -70,11 +59,18 @@
->setTransactions($xactions)
->setMarkupEngine($engine);
- $content[] = $xaction_view;
-
+ $obj_box = id(new PHUIObjectBoxView())
+ ->setHeader($header)
+ ->addPropertyList($basic_properties)
+ ->addPropertyList($policy_properties)
+ ->addPropertyList($encoding_properties);
return $this->buildApplicationPage(
- $content,
+ array(
+ $crumbs,
+ $obj_box,
+ $xaction_view,
+ ),
array(
'title' => $title,
'device' => true,
@@ -122,11 +118,15 @@
return $view;
}
- private function buildBasicProperties(PhabricatorRepository $repository) {
+ private function buildBasicProperties(
+ PhabricatorRepository $repository,
+ PhabricatorActionListView $actions) {
+
$user = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
- ->setUser($user);
+ $view = id(new PHUIPropertyListView())
+ ->setUser($user)
+ ->setActionList($actions);
$view->addProperty(pht('Name'), $repository->getName());
$view->addProperty(pht('ID'), $repository->getID());
@@ -177,11 +177,16 @@
return $view;
}
- private function buildEncodingProperties(PhabricatorRepository $repository) {
+ private function buildEncodingProperties(
+ PhabricatorRepository $repository,
+ PhabricatorActionListView $actions) {
+
$user = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
- ->setUser($user);
+ $view = id(new PHUIPropertyListView())
+ ->setUser($user)
+ ->setActionList($actions)
+ ->addSectionHeader(pht('Text Encoding'));
$encoding = $repository->getDetail('encoding');
if (!$encoding) {
@@ -217,11 +222,16 @@
return $view;
}
- private function buildPolicyProperties(PhabricatorRepository $repository) {
+ private function buildPolicyProperties(
+ PhabricatorRepository $repository,
+ PhabricatorActionListView $actions) {
+
$viewer = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
- ->setUser($viewer);
+ $view = id(new PHUIPropertyListView())
+ ->setUser($viewer)
+ ->setActionList($actions)
+ ->addSectionHeader(pht('Policies'));
$descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions(
$viewer,
Index: src/applications/diffusion/controller/DiffusionRepositoryEditEncodingController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionRepositoryEditEncodingController.php
+++ src/applications/diffusion/controller/DiffusionRepositoryEditEncodingController.php
@@ -56,18 +56,16 @@
}
}
- $content = array();
-
$crumbs = $this->buildCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit Encoding')));
- $content[] = $crumbs;
$title = pht('Edit %s', $repository->getName());
+ $error_view = null;
if ($errors) {
- $content[] = id(new AphrontErrorView())
+ $error_view = id(new AphrontErrorView())
->setTitle(pht('Form Errors'))
->setErrors($errors);
}
@@ -86,10 +84,16 @@
->setValue(pht('Save Encoding'))
->addCancelButton($edit_uri));
- $content[] = $form;
+ $object_box = id(new PHUIObjectBoxView())
+ ->setHeaderText($title)
+ ->setForm($form)
+ ->setFormError($error_view);
return $this->buildApplicationPage(
- $content,
+ array(
+ $crumbs,
+ $object_box,
+ ),
array(
'title' => $title,
'device' => true,
Index: src/applications/diviner/controller/DivinerAtomController.php
===================================================================
--- src/applications/diviner/controller/DivinerAtomController.php
+++ src/applications/diviner/controller/DivinerAtomController.php
@@ -80,7 +80,7 @@
->setBackgroundColor(PhabricatorTagView::COLOR_BLUE)
->setName(DivinerAtom::getAtomTypeNameString($atom->getType())));
- $properties = id(new PhabricatorPropertyListView());
+ $properties = id(new PHUIPropertyListView());
$group = $atom->getProperty('group');
if ($group) {
@@ -255,7 +255,7 @@
}
private function buildExtendsAndImplements(
- PhabricatorPropertyListView $view,
+ PHUIPropertyListView $view,
DivinerLiveSymbol $symbol) {
$lineage = $this->getExtendsLineage($symbol);
@@ -335,7 +335,7 @@
}
private function buildDefined(
- PhabricatorPropertyListView $view,
+ PHUIPropertyListView $view,
DivinerLiveSymbol $symbol) {
$atom = $symbol->getAtom();
Index: src/applications/diviner/controller/DivinerBookController.php
===================================================================
--- src/applications/diviner/controller/DivinerBookController.php
+++ src/applications/diviner/controller/DivinerBookController.php
@@ -85,7 +85,7 @@
private function buildPropertyList(DivinerLiveBook $book) {
$user = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
+ $view = id(new PHUIPropertyListView())
->setUser($user);
$policies = PhabricatorPolicyQuery::renderPolicyDescriptions(
Index: src/applications/drydock/controller/DrydockLeaseViewController.php
===================================================================
--- src/applications/drydock/controller/DrydockLeaseViewController.php
+++ src/applications/drydock/controller/DrydockLeaseViewController.php
@@ -25,7 +25,7 @@
->setHeader($title);
$actions = $this->buildActionListView($lease);
- $properties = $this->buildPropertyListView($lease);
+ $properties = $this->buildPropertyListView($lease, $actions);
$pager = new AphrontPagerView();
$pager->setURI(new PhutilURI($lease_uri), 'offset');
@@ -47,8 +47,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
return $this->buildApplicationPage(
array(
@@ -84,8 +83,12 @@
return $view;
}
- private function buildPropertyListView(DrydockLease $lease) {
- $view = new PhabricatorPropertyListView();
+ private function buildPropertyListView(
+ DrydockLease $lease,
+ PhabricatorActionListView $actions) {
+
+ $view = new PHUIPropertyListView();
+ $view->setActionList($actions);
switch ($lease->getStatus()) {
case DrydockLeaseStatus::STATUS_ACTIVE:
Index: src/applications/drydock/controller/DrydockResourceViewController.php
===================================================================
--- src/applications/drydock/controller/DrydockResourceViewController.php
+++ src/applications/drydock/controller/DrydockResourceViewController.php
@@ -23,7 +23,7 @@
->setHeader($title);
$actions = $this->buildActionListView($resource);
- $properties = $this->buildPropertyListView($resource);
+ $properties = $this->buildPropertyListView($resource, $actions);
$resource_uri = 'resource/'.$resource->getID().'/';
$resource_uri = $this->getApplicationURI($resource_uri);
@@ -58,8 +58,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
return $this->buildApplicationPage(
array(
@@ -97,8 +96,12 @@
return $view;
}
- private function buildPropertyListView(DrydockResource $resource) {
- $view = new PhabricatorPropertyListView();
+ private function buildPropertyListView(
+ DrydockResource $resource,
+ PhabricatorActionListView $actions) {
+
+ $view = new PHUIPropertyListView();
+ $view->setActionList($actions);
$status = $resource->getStatus();
$status = DrydockResourceStatus::getNameForStatus($status);
Index: src/applications/files/controller/PhabricatorFileInfoController.php
===================================================================
--- src/applications/files/controller/PhabricatorFileInfoController.php
+++ src/applications/files/controller/PhabricatorFileInfoController.php
@@ -44,7 +44,7 @@
}
$actions = $this->buildActionView($file);
- $properties = $this->buildPropertyView($file);
+ $properties_array = $this->buildPropertyView($file, $actions);
$timeline = $this->buildTransactionView($file, $xactions);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->setActionList($actions);
@@ -54,9 +54,11 @@
->setHref($this->getApplicationURI("/info/{$phid}/")));
$object_box = id(new PHUIObjectBoxView())
- ->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->setHeader($header);
+
+ foreach ($properties_array as $property_item) {
+ $object_box->addPropertyList($property_item);
+ }
return $this->buildApplicationPage(
array(
@@ -162,71 +164,80 @@
return $view;
}
- private function buildPropertyView(PhabricatorFile $file) {
+ private function buildPropertyView(
+ PhabricatorFile $file,
+ PhabricatorActionListView $actions) {
$request = $this->getRequest();
$user = $request->getUser();
- $view = id(new PhabricatorPropertyListView());
+ $listview = array();
+ $properties = id(new PHUIPropertyListView());
+ $properties->setActionList($actions);
if ($file->getAuthorPHID()) {
- $view->addProperty(
+ $properties->addProperty(
pht('Author'),
$this->getHandle($file->getAuthorPHID())->renderLink());
}
- $view->addProperty(
+ $properties->addProperty(
pht('Created'),
phabricator_datetime($file->getDateCreated(), $user));
- $view->addProperty(
+ $properties->addProperty(
pht('Size'),
phabricator_format_bytes($file->getByteSize()));
- $view->addSectionHeader(pht('Technical Details'));
+ $properties->addSectionHeader(pht('Technical Details'));
- $view->addProperty(
+ $properties->addProperty(
pht('Mime Type'),
$file->getMimeType());
- $view->addProperty(
+ $properties->addProperty(
pht('Engine'),
$file->getStorageEngine());
- $view->addProperty(
+ $properties->addProperty(
pht('Format'),
$file->getStorageFormat());
- $view->addProperty(
+ $properties->addProperty(
pht('Handle'),
$file->getStorageHandle());
+ $listview[] = $properties;
+
$metadata = $file->getMetadata();
if (!empty($metadata)) {
- $view->addSectionHeader(pht('Metadata'));
+ $mdata = id(new PHUIPropertyListView())
+ ->addSectionHeader(pht('Metadata'));
foreach ($metadata as $key => $value) {
- $view->addProperty(
+ $mdata->addProperty(
PhabricatorFile::getMetadataName($key),
$value);
}
+ $listview[] = $mdata;
}
$phids = $file->getObjectPHIDs();
if ($phids) {
- $view->addSectionHeader(pht('Attached'));
- $view->addProperty(
+ $attached = new PHUIPropertyListView();
+ $attached->addSectionHeader(pht('Attached'));
+ $attached->addProperty(
pht('Attached To'),
$this->renderHandlesForPHIDs($phids));
+ $listview[] = $attached;
}
-
if ($file->isViewableImage()) {
$image = phutil_tag(
'img',
array(
'src' => $file->getViewURI(),
- 'class' => 'phabricator-property-list-image',
+ 'class' => 'phui-property-list-image',
));
$linked_image = phutil_tag(
@@ -236,13 +247,15 @@
),
$image);
- $view->addImageContent($linked_image);
+ $media = id(new PHUIPropertyListView())
+ ->addImageContent($linked_image);
+ $listview[] = $media;
} else if ($file->isAudio()) {
$audio = phutil_tag(
'audio',
array(
'controls' => 'controls',
- 'class' => 'phabricator-property-list-audio',
+ 'class' => 'phui-property-list-audio',
),
phutil_tag(
'source',
@@ -250,10 +263,12 @@
'src' => $file->getViewURI(),
'type' => $file->getMimeType(),
)));
- $view->addImageContent($audio);
+ $media = id(new PHUIPropertyListView())
+ ->addImageContent($audio);
+ $listview[] = $media;
}
- return $view;
+ return $listview;
}
}
Index: src/applications/herald/controller/HeraldRuleViewController.php
===================================================================
--- src/applications/herald/controller/HeraldRuleViewController.php
+++ src/applications/herald/controller/HeraldRuleViewController.php
@@ -39,7 +39,7 @@
}
$actions = $this->buildActionView($rule);
- $properties = $this->buildPropertyView($rule);
+ $properties = $this->buildPropertyView($rule, $actions);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
@@ -48,8 +48,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
$timeline = $this->buildTimeline($rule);
@@ -109,14 +108,18 @@
return $view;
}
- private function buildPropertyView(HeraldRule $rule) {
+ private function buildPropertyView(
+ HeraldRule $rule,
+ PhabricatorActionListView $actions) {
+
$viewer = $this->getRequest()->getUser();
$this->loadHandles(HeraldAdapter::getHandlePHIDs($rule));
- $view = id(new PhabricatorPropertyListView())
+ $view = id(new PHUIPropertyListView())
->setUser($viewer)
- ->setObject($rule);
+ ->setObject($rule)
+ ->setActionList($actions);
$view->addProperty(
pht('Rule Type'),
Index: src/applications/legalpad/controller/LegalpadDocumentViewController.php
===================================================================
--- src/applications/legalpad/controller/LegalpadDocumentViewController.php
+++ src/applications/legalpad/controller/LegalpadDocumentViewController.php
@@ -67,7 +67,7 @@
->setPolicyObject($document);
$actions = $this->buildActionView($document);
- $properties = $this->buildPropertyView($document, $engine);
+ $properties = $this->buildPropertyView($document, $engine, $actions);
$comment_form_id = celerity_generate_unique_node_id();
@@ -88,8 +88,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
$content = array(
$crumbs,
@@ -149,13 +148,15 @@
private function buildPropertyView(
LegalpadDocument $document,
- PhabricatorMarkupEngine $engine) {
+ PhabricatorMarkupEngine $engine,
+ PhabricatorActionListView $actions) {
$user = $this->getRequest()->getUser();
- $properties = id(new PhabricatorPropertyListView())
+ $properties = id(new PHUIPropertyListView())
->setUser($user)
- ->setObject($document);
+ ->setObject($document)
+ ->setActionList($actions);
$properties->addProperty(
pht('Last Updated'),
Index: src/applications/macro/controller/PhabricatorMacroViewController.php
===================================================================
--- src/applications/macro/controller/PhabricatorMacroViewController.php
+++ src/applications/macro/controller/PhabricatorMacroViewController.php
@@ -35,7 +35,17 @@
->setHref($this->getApplicationURI('/view/'.$macro->getID().'/'))
->setName($title_short));
- $properties = $this->buildPropertyView($macro, $file);
+ $properties = $this->buildPropertyView($macro, $actions);
+ if ($file) {
+ $file_view = new PHUIPropertyListView();
+ $file_view->addImageContent(
+ phutil_tag(
+ 'img',
+ array(
+ 'src' => $file->getViewURI(),
+ 'class' => 'phabricator-image-macro-hero',
+ )));
+ }
$xactions = id(new PhabricatorMacroTransactionQuery())
->setViewer($request->getUser())
@@ -93,8 +103,11 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
+
+ if ($file_view) {
+ $object_box->addPropertyList($file_view);
+ }
$comment_box = id(new PHUIObjectBoxView())
->setFlush(true)
@@ -153,11 +166,12 @@
private function buildPropertyView(
PhabricatorFileImageMacro $macro,
- PhabricatorFile $file = null) {
+ PhabricatorActionListView $actions) {
- $view = id(new PhabricatorPropertyListView())
+ $view = id(new PHUIPropertyListView())
->setUser($this->getRequest()->getUser())
- ->setObject($macro);
+ ->setObject($macro)
+ ->setActionList($actions);
switch ($macro->getAudioBehavior()) {
case PhabricatorFileImageMacro::AUDIO_BEHAVIOR_ONCE:
@@ -171,25 +185,13 @@
$audio_phid = $macro->getAudioPHID();
if ($audio_phid) {
$this->loadHandles(array($audio_phid));
-
$view->addProperty(
pht('Audio'),
$this->getHandle($audio_phid)->renderLink());
}
-
$view->invokeWillRenderEvent();
- if ($file) {
- $view->addImageContent(
- phutil_tag(
- 'img',
- array(
- 'src' => $file->getViewURI(),
- 'class' => 'phabricator-image-macro-hero',
- )));
- }
-
return $view;
}
Index: src/applications/maniphest/controller/ManiphestTaskDetailController.php
===================================================================
--- src/applications/maniphest/controller/ManiphestTaskDetailController.php
+++ src/applications/maniphest/controller/ManiphestTaskDetailController.php
@@ -352,7 +352,9 @@
->setActionList($actions);
$header = $this->buildHeaderView($task);
- $properties = $this->buildPropertyView($task, $field_list, $edges, $engine);
+ $properties = $this->buildPropertyView(
+ $task, $field_list, $edges, $actions);
+ $description = $this->buildDescriptionView($task, $engine);
if (!$user->isLoggedIn()) {
// TODO: Eventually, everything should run through this. For now, we're
@@ -365,8 +367,11 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
+
+ if ($description) {
+ $object_box->addPropertyList($description);
+ }
$comment_box = id(new PHUIObjectBoxView())
->setFlush(true)
@@ -503,13 +508,14 @@
ManiphestTask $task,
PhabricatorCustomFieldList $field_list,
array $edges,
- PhabricatorMarkupEngine $engine) {
+ PhabricatorActionListView $actions) {
$viewer = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
+ $view = id(new PHUIPropertyListView())
->setUser($viewer)
- ->setObject($task);
+ ->setObject($task)
+ ->setActionList($actions);
$view->addProperty(
pht('Assigned To'),
@@ -633,9 +639,18 @@
$view->invokeWillRenderEvent();
+ return $view;
+ }
+
+ private function buildDescriptionView(
+ ManiphestTask $task,
+ PhabricatorMarkupEngine $engine) {
+
+ $section = null;
if (strlen($task->getDescription())) {
- $view->addSectionHeader(pht('Description'));
- $view->addTextContent(
+ $section = new PHUIPropertyListView();
+ $section->addSectionHeader(pht('Description'));
+ $section->addTextContent(
phutil_tag(
'div',
array(
@@ -644,7 +659,7 @@
$engine->getOutput($task, ManiphestTask::MARKUP_FIELD_DESCRIPTION)));
}
- return $view;
+ return $section;
}
}
Index: src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
===================================================================
--- src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
+++ src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
@@ -39,13 +39,12 @@
$header->setStatus('open', 'red', pht('Uninstalled'));
}
- $properties = $this->buildPropertyView($selected);
$actions = $this->buildActionView($user, $selected);
+ $properties = $this->buildPropertyView($selected, $actions);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
return $this->buildApplicationPage(
array(
@@ -58,11 +57,15 @@
));
}
- private function buildPropertyView(PhabricatorApplication $application) {
+ private function buildPropertyView(
+ PhabricatorApplication $application,
+ PhabricatorActionListView $actions) {
+
$viewer = $this->getRequest()->getUser();
- $properties = id(new PhabricatorPropertyListView())
+ $properties = id(new PHUIPropertyListView())
->addProperty(pht('Description'), $application->getShortDescription());
+ $properties->setActionList($actions);
if ($application->isBeta()) {
$properties->addProperty(
Index: src/applications/paste/controller/PhabricatorPasteViewController.php
===================================================================
--- src/applications/paste/controller/PhabricatorPasteViewController.php
+++ src/applications/paste/controller/PhabricatorPasteViewController.php
@@ -68,12 +68,11 @@
$header = $this->buildHeaderView($paste);
$actions = $this->buildActionView($user, $paste, $file);
- $properties = $this->buildPropertyView($paste, $fork_phids);
+ $properties = $this->buildPropertyView($paste, $fork_phids, $actions);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
$source_code = $this->buildSourceCodeView(
$paste,
@@ -206,12 +205,14 @@
private function buildPropertyView(
PhabricatorPaste $paste,
- array $child_phids) {
+ array $child_phids,
+ PhabricatorActionListView $actions) {
$user = $this->getRequest()->getUser();
- $properties = id(new PhabricatorPropertyListView())
+ $properties = id(new PHUIPropertyListView())
->setUser($user)
- ->setObject($paste);
+ ->setObject($paste)
+ ->setActionList($actions);
$properties->addProperty(
pht('Author'),
Index: src/applications/people/controller/PhabricatorPeopleProfileController.php
===================================================================
--- src/applications/people/controller/PhabricatorPeopleProfileController.php
+++ src/applications/people/controller/PhabricatorPeopleProfileController.php
@@ -68,7 +68,7 @@
->setHref($this->getApplicationURI('edit/'.$user->getID().'/')));
}
- $properties = $this->buildPropertyView($user);
+ $properties = $this->buildPropertyView($user, $actions);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
@@ -78,8 +78,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
return $this->buildApplicationPage(
array(
@@ -93,12 +92,15 @@
));
}
- private function buildPropertyView(PhabricatorUser $user) {
- $viewer = $this->getRequest()->getUser();
+ private function buildPropertyView(
+ PhabricatorUser $user,
+ PhabricatorActionListView $actions) {
- $view = id(new PhabricatorPropertyListView())
+ $viewer = $this->getRequest()->getUser();
+ $view = id(new PHUIPropertyListView())
->setUser($viewer)
- ->setObject($user);
+ ->setObject($user)
+ ->setActionList($actions);
$field_list = PhabricatorCustomField::getObjectFields(
$user,
Index: src/applications/phame/controller/blog/PhameBlogViewController.php
===================================================================
--- src/applications/phame/controller/blog/PhameBlogViewController.php
+++ src/applications/phame/controller/blog/PhameBlogViewController.php
@@ -44,7 +44,7 @@
$this->loadHandles($handle_phids);
$actions = $this->renderActions($blog, $user);
- $properties = $this->renderProperties($blog, $user);
+ $properties = $this->renderProperties($blog, $user, $actions);
$post_list = $this->renderPostList(
$posts,
$user,
@@ -65,8 +65,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
$nav->appendChild(
array(
@@ -83,11 +82,16 @@
));
}
- private function renderProperties(PhameBlog $blog, PhabricatorUser $user) {
+ private function renderProperties(
+ PhameBlog $blog,
+ PhabricatorUser $user,
+ PhabricatorActionListView $actions) {
+
require_celerity_resource('aphront-tooltip-css');
Javelin::initBehavior('phabricator-tooltips');
- $properties = new PhabricatorPropertyListView();
+ $properties = new PHUIPropertyListView();
+ $properties->setActionList($actions);
$properties->addProperty(
pht('Skin'),
Index: src/applications/phame/controller/post/PhamePostViewController.php
===================================================================
--- src/applications/phame/controller/post/PhamePostViewController.php
+++ src/applications/phame/controller/post/PhamePostViewController.php
@@ -32,7 +32,7 @@
$post->getBloggerPHID(),
));
$actions = $this->renderActions($post, $user);
- $properties = $this->renderProperties($post, $user);
+ $properties = $this->renderProperties($post, $user, $actions);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->setActionList($actions);
@@ -50,8 +50,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
if ($post->isDraft()) {
$object_box->appendChild(
@@ -167,11 +166,13 @@
private function renderProperties(
PhamePost $post,
- PhabricatorUser $user) {
+ PhabricatorUser $user,
+ PhabricatorActionListView $actions) {
- $properties = id(new PhabricatorPropertyListView())
+ $properties = id(new PHUIPropertyListView())
->setUser($user)
- ->setObject($post);
+ ->setObject($post)
+ ->setActionList($actions);
$properties->addProperty(
pht('Blog'),
Index: src/applications/phlux/controller/PhluxViewController.php
===================================================================
--- src/applications/phlux/controller/PhluxViewController.php
+++ src/applications/phlux/controller/PhluxViewController.php
@@ -55,9 +55,10 @@
$display_value = json_encode($var->getVariableValue());
- $properties = id(new PhabricatorPropertyListView())
+ $properties = id(new PHUIPropertyListView())
->setUser($user)
->setObject($var)
+ ->setActionList($actions)
->addProperty(pht('Value'), $display_value);
$xactions = id(new PhluxTransactionQuery())
@@ -76,8 +77,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
return $this->buildApplicationPage(
array(
Index: src/applications/pholio/controller/PholioMockViewController.php
===================================================================
--- src/applications/pholio/controller/PholioMockViewController.php
+++ src/applications/pholio/controller/PholioMockViewController.php
@@ -73,7 +73,7 @@
->setPolicyObject($mock);
$actions = $this->buildActionView($mock);
- $properties = $this->buildPropertyView($mock, $engine);
+ $properties = $this->buildPropertyView($mock, $engine, $actions);
require_celerity_resource('pholio-css');
require_celerity_resource('pholio-inline-comments-css');
@@ -105,8 +105,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
$content = array(
$crumbs,
@@ -197,13 +196,15 @@
private function buildPropertyView(
PholioMock $mock,
- PhabricatorMarkupEngine $engine) {
+ PhabricatorMarkupEngine $engine,
+ PhabricatorActionListView $actions) {
$user = $this->getRequest()->getUser();
- $properties = id(new PhabricatorPropertyListView())
+ $properties = id(new PHUIPropertyListView())
->setUser($user)
- ->setObject($mock);
+ ->setObject($mock)
+ ->setActionList($actions);
$properties->addProperty(
pht('Author'),
@@ -222,7 +223,7 @@
$properties->invokeWillRenderEvent();
$properties->addImageContent(
- $engine->getOutput($mock, PholioMock::MARKUP_FIELD_DESCRIPTION));
+ $engine->getOutput($mock, PholioMock::MARKUP_FIELD_DESCRIPTION));
return $properties;
}
Index: src/applications/phortune/controller/PhortuneAccountViewController.php
===================================================================
--- src/applications/phortune/controller/PhortuneAccountViewController.php
+++ src/applications/phortune/controller/PhortuneAccountViewController.php
@@ -50,11 +50,12 @@
$crumbs->setActionList($actions);
- $properties = id(new PhabricatorPropertyListView())
+ $properties = id(new PHUIPropertyListView())
->setObject($account)
->setUser($user);
$properties->addProperty(pht('Balance'), $account->getBalanceInCents());
+ $properties->setActionList($actions);
$payment_methods = $this->buildPaymentMethodsSection($account);
$purchase_history = $this->buildPurchaseHistorySection($account);
@@ -62,8 +63,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
return $this->buildApplicationPage(
array(
Index: src/applications/phortune/controller/PhortuneProductViewController.php
===================================================================
--- src/applications/phortune/controller/PhortuneProductViewController.php
+++ src/applications/phortune/controller/PhortuneProductViewController.php
@@ -59,8 +59,9 @@
->setName(pht('#%d', $product->getID()))
->setHref($request->getRequestURI()));
- $properties = id(new PhabricatorPropertyListView())
+ $properties = id(new PHUIPropertyListView())
->setUser($user)
+ ->setActionList($actions)
->addProperty(pht('Type'), $product->getTypeName())
->addProperty(
pht('Price'),
@@ -83,8 +84,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
return $this->buildApplicationPage(
array(
Index: src/applications/phriction/controller/PhrictionDocumentController.php
===================================================================
--- src/applications/phriction/controller/PhrictionDocumentController.php
+++ src/applications/phriction/controller/PhrictionDocumentController.php
@@ -162,13 +162,16 @@
$header = id(new PHUIHeaderView())
->setHeader($page_title);
+ $prop_list = new PHUIPropertyGroupView();
+ $prop_list->addPropertyList($properties);
+
$page_content = id(new PHUIDocumentView())
->setOffset(true)
->setHeader($header)
->appendChild(
array(
$actions,
- $properties,
+ $prop_list,
$move_notice,
$core_content,
));
@@ -202,7 +205,7 @@
$slug) {
$viewer = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
+ $view = id(new PHUIPropertyListView())
->setUser($viewer)
->setObject($document);
Index: src/applications/ponder/controller/PonderQuestionViewController.php
===================================================================
--- src/applications/ponder/controller/PonderQuestionViewController.php
+++ src/applications/ponder/controller/PonderQuestionViewController.php
@@ -48,12 +48,11 @@
->setHeader($question->getTitle());
$actions = $this->buildActionListView($question);
- $properties = $this->buildPropertyListView($question);
+ $properties = $this->buildPropertyListView($question, $actions);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
$crumbs->setActionList($actions);
@@ -130,12 +129,14 @@
}
private function buildPropertyListView(
- PonderQuestion $question) {
+ PonderQuestion $question,
+ PhabricatorActionListView $actions) {
$viewer = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
+ $view = id(new PHUIPropertyListView())
->setUser($viewer)
- ->setObject($question);
+ ->setObject($question)
+ ->setActionList($actions);
$this->loadHandles(array($question->getAuthorPHID()));
@@ -265,12 +266,11 @@
->setHeader($this->getHandle($author_phid)->getFullName());
$actions = $this->buildAnswerActions($answer);
- $properties = $this->buildAnswerProperties($answer);
+ $properties = $this->buildAnswerProperties($answer, $actions);
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
$out[] = $object_box;
$details = array();
@@ -339,11 +339,15 @@
return $view;
}
- private function buildAnswerProperties(PonderAnswer $answer) {
+ private function buildAnswerProperties(
+ PonderAnswer $answer,
+ PhabricatorActionListView $actions) {
+
$viewer = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
+ $view = id(new PHUIPropertyListView())
->setUser($viewer)
- ->setObject($answer);
+ ->setObject($answer)
+ ->setActionList($actions);
$view->addProperty(
pht('Created'),
Index: src/applications/project/controller/PhabricatorProjectProfileController.php
===================================================================
--- src/applications/project/controller/PhabricatorProjectProfileController.php
+++ src/applications/project/controller/PhabricatorProjectProfileController.php
@@ -59,7 +59,7 @@
->setImage($picture);
$actions = $this->buildActionListView($project);
- $properties = $this->buildPropertyListView($project);
+ $properties = $this->buildPropertyListView($project, $actions);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
@@ -68,8 +68,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
return $this->buildApplicationPage(
array(
@@ -240,13 +239,16 @@
return $view;
}
- private function buildPropertyListView(PhabricatorProject $project) {
+ private function buildPropertyListView(
+ PhabricatorProject $project,
+ PhabricatorActionListView $actions) {
$request = $this->getRequest();
$viewer = $request->getUser();
- $view = id(new PhabricatorPropertyListView())
+ $view = id(new PHUIPropertyListView())
->setUser($viewer)
- ->setObject($project);
+ ->setObject($project)
+ ->setActionList($actions);
$view->addProperty(
pht('Created'),
Index: src/applications/releeph/controller/branch/ReleephBranchViewController.php
===================================================================
--- src/applications/releeph/controller/branch/ReleephBranchViewController.php
+++ src/applications/releeph/controller/branch/ReleephBranchViewController.php
@@ -160,9 +160,10 @@
->setHref($history_uri)
->setIcon('transcript'));
- $properties = id(new PhabricatorPropertyListView())
+ $properties = id(new PHUIPropertyListView())
->setUser($viewer)
- ->setObject($branch);
+ ->setObject($branch)
+ ->setActionList($actions);
$properties->addProperty(
pht('Branch'),
@@ -170,8 +171,7 @@
return id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
}
}
Index: src/applications/releeph/controller/project/ReleephProjectViewController.php
===================================================================
--- src/applications/releeph/controller/project/ReleephProjectViewController.php
+++ src/applications/releeph/controller/project/ReleephProjectViewController.php
@@ -220,7 +220,7 @@
->setHref($history_uri)
->setIcon('transcript'));
- $properties = id(new PhabricatorPropertyListView())
+ $properties = id(new PHUIPropertyListView())
->setUser($viewer)
->setObject($project);
@@ -228,6 +228,8 @@
pht('Repository'),
$project->getRepository()->getName());
+ $properties->setActionList($actions);
+
$pushers = $project->getPushers();
if ($pushers) {
$this->loadHandles($pushers);
@@ -238,8 +240,7 @@
return id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
}
}
Index: src/applications/slowvote/controller/PhabricatorSlowvotePollController.php
===================================================================
--- src/applications/slowvote/controller/PhabricatorSlowvotePollController.php
+++ src/applications/slowvote/controller/PhabricatorSlowvotePollController.php
@@ -47,7 +47,7 @@
->setPolicyObject($poll);
$actions = $this->buildActionView($poll);
- $properties = $this->buildPropertyView($poll);
+ $properties = $this->buildPropertyView($poll, $actions);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
@@ -59,8 +59,7 @@
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
- ->setActionList($actions)
- ->setPropertyList($properties);
+ ->addPropertyList($properties);
return $this->buildApplicationPage(
array(
@@ -105,12 +104,16 @@
return $view;
}
- private function buildPropertyView(PhabricatorSlowvotePoll $poll) {
+ private function buildPropertyView(
+ PhabricatorSlowvotePoll $poll,
+ PhabricatorActionListView $actions) {
+
$viewer = $this->getRequest()->getUser();
- $view = id(new PhabricatorPropertyListView())
+ $view = id(new PHUIPropertyListView())
->setUser($viewer)
- ->setObject($poll);
+ ->setObject($poll)
+ ->setActionList($actions);
$view->invokeWillRenderEvent();
Index: src/applications/uiexample/examples/PHUIPropertyListExample.php
===================================================================
--- src/applications/uiexample/examples/PHUIPropertyListExample.php
+++ src/applications/uiexample/examples/PHUIPropertyListExample.php
@@ -1,6 +1,6 @@
<?php
-final class PhabricatorPropertyListExample extends PhabricatorUIExample {
+final class PHUIPropertyListExample extends PhabricatorUIExample {
public function getName() {
return 'Property List';
@@ -8,14 +8,39 @@
public function getDescription() {
return hsprintf(
- 'Use <tt>PhabricatorPropertyListView</tt> to render object properties.');
+ 'Use <tt>PHUIPropertyListView</tt> to render object properties.');
}
public function renderExample() {
$request = $this->getRequest();
$user = $request->getUser();
- $view = new PhabricatorPropertyListView();
+ $details1 = id(new PHUIListItemView())
+ ->setName('Details')
+ ->setHref('#')
+ ->setSelected(true)
+ ->setType(PHUIListItemView::TYPE_LINK);
+
+ $details2 = id(new PHUIListItemView())
+ ->setName('Lint (Warn)')
+ ->setHref('#')
+ ->setStatusColor(PHUIListItemView::STATUS_WARN)
+ ->setType(PHUIListItemView::TYPE_LINK);
+
+ $details3 = id(new PHUIListItemView())
+ ->setName('Unit (3/5)')
+ ->setHref('#')
+ ->setStatusColor(PHUIListItemView::STATUS_FAIL)
+ ->setType(PHUIListItemView::TYPE_LINK);
+
+ $statustabs = id(new PHUIListView())
+ ->setType(PHUIListView::NAVBAR_LIST)
+ ->addMenuItem($details1)
+ ->addMenuItem($details2)
+ ->addMenuItem($details3);
+
+ $view = new PHUIPropertyListView();
+ $view->setTabs($statustabs);
$view->addProperty(
pht('Color'),
@@ -36,28 +61,34 @@
'velit, aliquam et consequat quis, tincidunt id dolor.');
- $view->addSectionHeader('Colors of the Rainbow');
+ $view2 = new PHUIPropertyListView();
+ $view2->addSectionHeader('Colors of the Rainbow');
- $view->addProperty('R', 'Red');
- $view->addProperty('O', 'Orange');
- $view->addProperty('Y', 'Yellow');
- $view->addProperty('G', 'Green');
- $view->addProperty('B', 'Blue');
- $view->addProperty('I', 'Indigo');
- $view->addProperty('V', 'Violet');
+ $view2->addProperty('R', 'Red');
+ $view2->addProperty('O', 'Orange');
+ $view2->addProperty('Y', 'Yellow');
+ $view2->addProperty('G', 'Green');
+ $view2->addProperty('B', 'Blue');
+ $view2->addProperty('I', 'Indigo');
+ $view2->addProperty('V', 'Violet');
- $view->addSectionHeader('Haiku About Pasta');
- $view->addTextContent(
+ $view3 = new PHUIPropertyListView();
+ $view3->addSectionHeader('Haiku About Pasta');
+
+ $view3->addTextContent(
hsprintf(
'this is a pasta<br />'.
'haiku. it is very bad.<br />'.
'what did you expect?'));
- $edge_cases_header = id(new PHUIHeaderView())
- ->setHeader(pht('Edge Cases'));
+ $object_box1 = id(new PHUIObjectBoxView())
+ ->setHeaderText('PHUIPropertyListView Stackered')
+ ->addPropertyList($view)
+ ->addPropertyList($view2)
+ ->addPropertyList($view3);
- $edge_cases_view = new PhabricatorPropertyListView();
+ $edge_cases_view = new PHUIPropertyListView();
$edge_cases_view->addProperty(
pht('Description'),
@@ -97,29 +128,13 @@
pht('Joe'),
pht('Smith'));
- $edge_cases_view->addProperty(
- pht('Description'),
- pht('The next section shows adjacent section headers.'));
-
- $edge_cases_view->addSectionHeader('Several');
- $edge_cases_view->addSectionHeader('Adjacent');
- $edge_cases_view->addSectionHeader('Section');
- $edge_cases_view->addSectionHeader('Headers');
-
- $edge_cases_view->addProperty(
- pht('Description'),
- pht('The next section is several adjacent text blocks.'));
-
- $edge_cases_view->addTextContent('Lorem');
- $edge_cases_view->addTextContent('ipsum');
- $edge_cases_view->addTextContent('dolor');
- $edge_cases_view->addTextContent('sit');
- $edge_cases_view->addTextContent('amet...');
+ $object_box2 = id(new PHUIObjectBoxView())
+ ->setHeaderText('Some Bad Examples')
+ ->addPropertyList($edge_cases_view);
return array(
- $view,
- $edge_cases_header,
- $edge_cases_view,
+ $object_box1,
+ $object_box2,
);
}
}
Index: src/infrastructure/customfield/field/PhabricatorCustomFieldList.php
===================================================================
--- src/infrastructure/customfield/field/PhabricatorCustomFieldList.php
+++ src/infrastructure/customfield/field/PhabricatorCustomFieldList.php
@@ -85,7 +85,7 @@
public function appendFieldsToPropertyList(
PhabricatorCustomFieldInterface $object,
PhabricatorUser $viewer,
- PhabricatorPropertyListView $view) {
+ PHUIPropertyListView $view) {
$this->readFieldsFromStorage($object);
$fields = $this->fields;
Index: src/view/phui/PHUIObjectBoxView.php
===================================================================
--- src/view/phui/PHUIObjectBoxView.php
+++ src/view/phui/PHUIObjectBoxView.php
@@ -8,16 +8,12 @@
private $validationException;
private $header;
private $flush;
- private $propertyList;
- private $actionList;
+ private $propertyList = array();
- public function setActionList(PhabricatorActionListView $action_list) {
- $this->actionList = $action_list;
- return $this;
- }
-
- public function setPropertyList(PhabricatorPropertyListView $property_list) {
- $this->propertyList = $property_list;
+ // This is mostly a conveinence method to lessen code dupe
+ // when building objectboxes.
+ public function addPropertyList(PHUIPropertyListView $property_list) {
+ $this->propertyList[] = $property_list;
return $this;
}
@@ -78,9 +74,12 @@
}
}
- $property_list = $this->propertyList;
- if ($this->actionList && $this->propertyList) {
- $property_list->setActionList($this->actionList);
+ $property_list = null;
+ if ($this->propertyList) {
+ $property_list = new PHUIPropertyGroupView();
+ foreach ($this->propertyList as $item) {
+ $property_list->addPropertyList($item);
+ }
}
$content = id(new PHUIBoxView())
@@ -90,7 +89,7 @@
$this->formError,
$exception_errors,
$this->form,
- $this->propertyList,
+ $property_list,
$this->renderChildren(),
))
->setBorder(true)
Index: src/view/phui/PHUIPropertyGroupView.php
===================================================================
--- /dev/null
+++ src/view/phui/PHUIPropertyGroupView.php
@@ -0,0 +1,24 @@
+<?php
+
+final class PHUIPropertyGroupView extends AphrontTagView {
+
+ private $items;
+
+ public function addPropertyList(PHUIPropertyListView $item) {
+ $this->items[] = $item;
+ }
+
+ protected function canAppendChild() {
+ return false;
+ }
+
+ protected function getTagAttributes() {
+ return array(
+ 'class' => 'phui-property-list-view',
+ );
+ }
+
+ protected function getTagContent() {
+ return $this->items;
+ }
+}
Index: src/view/phui/PHUIPropertyListView.php
===================================================================
--- src/view/phui/PHUIPropertyListView.php
+++ src/view/phui/PHUIPropertyListView.php
@@ -1,12 +1,13 @@
<?php
-final class PhabricatorPropertyListView extends AphrontView {
+final class PHUIPropertyListView extends AphrontView {
private $parts = array();
private $hasKeyboardShortcuts;
private $object;
private $invokedWillRenderEvent;
private $actionList;
+ private $tabs;
protected function canAppendChild() {
return false;
@@ -49,6 +50,11 @@
return $this;
}
+ public function setTabs(PHUIListView $tabs) {
+ $this->tabs = $tabs;
+ return $tabs;
+ }
+
public function addSectionHeader($name) {
$this->parts[] = array(
'type' => 'section',
@@ -90,7 +96,7 @@
public function render() {
$this->invokeWillRenderEvent();
- require_celerity_resource('phabricator-property-list-view-css');
+ require_celerity_resource('phui-property-list-view-css');
$items = array();
foreach ($this->parts as $part) {
@@ -114,9 +120,12 @@
return phutil_tag(
'div',
array(
- 'class' => 'phabricator-property-list-view',
+ 'class' => 'phui-property-list-section',
),
- $items);
+ array(
+ $this->tabs,
+ $items,
+ ));
}
private function renderPropertyPart(array $part) {
@@ -132,14 +141,14 @@
$items[] = phutil_tag(
'dt',
array(
- 'class' => 'phabricator-property-list-key',
+ 'class' => 'phui-property-list-key',
),
array($key, ' '));
$items[] = phutil_tag(
'dd',
array(
- 'class' => 'phabricator-property-list-value',
+ 'class' => 'phui-property-list-value',
),
array($value, ' '));
}
@@ -147,7 +156,7 @@
$list = phutil_tag(
'dl',
array(
- 'class' => 'phabricator-property-list-properties',
+ 'class' => 'phui-property-list-properties',
),
$items);
@@ -159,7 +168,7 @@
$list = phutil_tag(
'div',
array(
- 'class' => 'phabricator-property-list-properties-wrap',
+ 'class' => 'phui-property-list-properties-wrap',
),
array($shortcuts, $list));
@@ -168,7 +177,7 @@
$action_list = phutil_tag(
'div',
array(
- 'class' => 'phabricator-property-list-actions',
+ 'class' => 'phui-property-list-actions',
),
$this->actionList);
$this->actionList = null;
@@ -177,7 +186,7 @@
return phutil_tag(
'div',
array(
- 'class' => 'phabricator-property-list-container grouped',
+ 'class' => 'phui-property-list-container grouped',
),
array($action_list, $list));
}
@@ -186,16 +195,16 @@
return phutil_tag(
'div',
array(
- 'class' => 'phabricator-property-list-section-header',
+ 'class' => 'phui-property-list-section-header',
),
$part['name']);
}
private function renderTextPart(array $part) {
$classes = array();
- $classes[] = 'phabricator-property-list-text-content';
+ $classes[] = 'phui-property-list-text-content';
if ($part['type'] == 'image') {
- $classes[] = 'phabricator-property-list-image-content';
+ $classes[] = 'phui-property-list-image-content';
}
return phutil_tag(
'div',
Index: webroot/rsrc/css/diviner/diviner-shared.css
===================================================================
--- webroot/rsrc/css/diviner/diviner-shared.css
+++ webroot/rsrc/css/diviner/diviner-shared.css
@@ -73,7 +73,7 @@
width: 100%;
}
-.phabricator-property-list-view + .diviner-document-section {
+.phui-property-list-view + .diviner-document-section {
margin-top: -1px;
}
Index: webroot/rsrc/css/phui/phui-document.css
===================================================================
--- webroot/rsrc/css/phui/phui-document.css
+++ webroot/rsrc/css/phui/phui-document.css
@@ -86,18 +86,18 @@
text-shadow: 0 1px 2px #fff;
}
-.phui-document-content .phabricator-property-list-container {
+.phui-document-content .phui-property-list-container {
border-color: #dde8ef;
}
-.phui-document-content .phabricator-property-list-view {
+.phui-document-content .phui-property-list-view {
border: none;
box-shadow: none;
margin: 0;
background-color: #f6f7f8;
}
-.phui-document-content .phabricator-property-list-value {
+.phui-document-content .phui-property-list-value {
width: auto;
}
@@ -158,6 +158,6 @@
padding-right: 160px;
}
-.phui-document-view .phabricator-property-list-view {
+.phui-document-view .phui-property-list-view {
border-bottom: 1px solid {$thinblueborder};
}
Index: webroot/rsrc/css/phui/phui-header-view.css
===================================================================
--- webroot/rsrc/css/phui/phui-header-view.css
+++ webroot/rsrc/css/phui/phui-header-view.css
@@ -33,7 +33,7 @@
border-top-width: 0;
}
-.phabricator-property-list-view + .diviner-document-section {
+.phui-property-list-view + .diviner-document-section {
margin-top: -1px;
}
Index: webroot/rsrc/css/phui/phui-property-list-view.css
===================================================================
--- webroot/rsrc/css/phui/phui-property-list-view.css
+++ webroot/rsrc/css/phui/phui-property-list-view.css
@@ -1,12 +1,12 @@
/**
- * @provides phabricator-property-list-view-css
+ * @provides phui-property-list-view-css
*/
-.phabricator-property-list-view {
+.phui-property-list-view {
background-color: #fff;
}
-.phabricator-property-list-view .keyboard-shortcuts-available {
+.phui-property-list-view .keyboard-shortcuts-available {
float: right;
height: 16px;
margin: 12px 10px -28px 0px;
@@ -23,30 +23,30 @@
display: none;
}
-.phabricator-property-list-container +
- .phabricator-property-list-section-header {
- border-color: {$lightgreyborder};
+.phui-property-list-section +
+ .phui-property-list-section {
+ border-color: {$thinblueborder};
border-style: solid;
border-width: 1px 0 0;
}
-.device-desktop .phabricator-property-list-container {
+.device-desktop .phui-property-list-container {
padding: 12px 0 12px 0;
width: 100%;
}
-.device .phabricator-property-list-container {
+.device .phui-property-list-container {
padding: 12px 0 4px 0;
}
-.phabricator-property-list-key {
+.phui-property-list-key {
color: {$bluetext};
font-weight: bold;
overflow: hidden;
white-space: nowrap;
}
-.device-desktop .phabricator-property-list-key {
+.device-desktop .phui-property-list-key {
width: 18%;
margin-left: 1%;
text-align: right;
@@ -55,44 +55,47 @@
margin-bottom: 4px;
}
-.device .phabricator-property-list-key {
+.device .phui-property-list-key {
padding-left: 8px;
}
-.phabricator-property-list-value {
+.phui-property-list-value {
color: {$darkgreytext};
overflow: hidden;
line-height: 17px;
}
-.device-desktop .phabricator-property-list-value {
+.device-desktop .phui-property-list-value {
width: 78%;
margin-left: 1%;
float: left;
margin-bottom: 4px;
}
-.device .phabricator-property-list-value {
+.device .phui-property-list-value {
padding-left: 16px;
margin-bottom: 8px;
}
-.phabricator-property-list-section-header {
+.phui-property-list-section-header {
color: {$bluetext};
padding: 12px 16px 0px;
text-transform: uppercase;
font-weight: 700;
}
-.phabricator-property-list-section-header + .phabricator-property-list-text-content {
- border-top: none;
+.device .phui-property-list-section-header {
+ padding-left: 8px;
}
-.phabricator-property-list-text-content {
+.phui-property-list-text-content {
padding: 12px 16px;
background: #fff;
overflow: hidden;
- border-top: 1px solid {$lightblueborder};
+}
+
+.device .phui-property-list-text-content {
+ padding: 8px;
}
/* In the common case where we immediately follow a header, move back up 30px
@@ -104,17 +107,17 @@
.device-desktop .phui-header-view
+ .phabricator-action-list-view
- + .phabricator-property-list-view {
+ + .phui-property-list-view {
margin-top: 0px;
}
-.phabricator-property-list-image {
+.phui-property-list-image {
margin: auto;
max-width: 95%;
}
-.phabricator-property-list-audio {
+.phui-property-list-audio {
display: block;
margin: 16px auto;
width: 50%;
@@ -123,28 +126,28 @@
/* When tags appear in property lists, give them a little more vertical
spacing. */
-.phabricator-property-list-view .phabricator-tag-view {
+.phui-property-list-view .phabricator-tag-view {
margin: 2px 0;
}
-.phabricator-property-list-properties-wrap {
+.phui-property-list-properties-wrap {
float: left;
width: 78%;
}
-.device .phabricator-property-list-properties-wrap {
+.device .phui-property-list-properties-wrap {
width: auto;
border: none;
}
-.phabricator-property-list-actions {
+.phui-property-list-actions {
width: 20%;
float: right;
margin-right: 12px;
border-left: 1px solid {$thinblueborder};
}
-.device .phabricator-property-list-actions {
+.device .phui-property-list-actions {
float: none;
width: auto;
margin: -12px 0 12px 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 28, 4:32 AM (2 w, 1 d ago)
Storage Engine
amazon-s3
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
phabricator/secure/bd/lp/5etrexj7soqlemal
Default Alt Text
D7283.diff (85 KB)
Attached To
Mode
D7283: PHUIPropertyListView
Attached
Detach File
Event Timeline
Log In to Comment