From 5ba20b8924d522fda64bacb4a191c9b88eefe712 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 9 Sep 2013 14:14:34 -0700 Subject: [PATCH] Move PhabricatorObjectItem to PHUIObjectItem, add 'plain' setting for lists. Summary: Adds plain support for object lists that just look like lists Test Plan: review UIexamples and a number of other applications Reviewers: epriestley, btrahan Reviewed By: epriestley CC: Korvin, aran Differential Revision: https://secure.phabricator.com/D6922 --- scripts/celerity_mapper.php | 2 +- src/__celerity_resource_map__.php | 124 +++++------ src/__phutil_library_map__.php | 12 +- .../view/PhabricatorAuditCommitListView.php | 4 +- .../audit/view/PhabricatorAuditListView.php | 4 +- .../config/PhabricatorAuthListController.php | 4 +- .../auth/provider/PhabricatorAuthProvider.php | 2 +- .../provider/PhabricatorAuthProviderOAuth.php | 2 +- .../PhabricatorAuthProviderOAuth1.php | 2 +- .../PhabricatorAuthProviderPassword.php | 2 +- ...habricatorCalendarViewStatusController.php | 4 +- ...habricatorChatLogChannelListController.php | 4 +- .../PhabricatorConduitListController.php | 4 +- .../PhabricatorConfigGroupController.php | 4 +- .../PhabricatorConfigIssueListController.php | 4 +- .../PhabricatorConfigListController.php | 4 +- .../PhabricatorCountdownListController.php | 4 +- .../view/PhabricatorDaemonLogListView.php | 4 +- .../DifferentialRevisionListController.php | 2 +- .../view/DifferentialRevisionListView.php | 10 +- .../controller/DiffusionHomeController.php | 8 +- .../diviner/controller/DivinerController.php | 4 +- .../controller/DivinerLegacyController.php | 4 +- .../drydock/controller/DrydockController.php | 8 +- .../PhabricatorFileListController.php | 4 +- .../PhabricatorFlagListController.php | 4 +- .../controller/HeraldRuleListController.php | 4 +- .../herald/view/HeraldRuleEditHistoryView.php | 4 +- .../LegalpadDocumentListController.php | 4 +- .../PhabricatorMailingListsListController.php | 4 +- .../maniphest/view/ManiphestTaskListView.php | 4 +- .../PhabricatorApplicationsListController.php | 4 +- .../PhabricatorPasteListController.php | 4 +- .../PhabricatorPeopleLdapController.php | 4 +- .../PhabricatorPeopleListController.php | 4 +- .../phame/controller/PhameController.php | 2 +- .../blog/PhameBlogListController.php | 4 +- .../phlux/controller/PhluxListController.php | 4 +- .../PhortuneAccountViewController.php | 4 +- .../PhortuneProductListController.php | 4 +- .../controller/PhrictionDiffController.php | 4 +- .../controller/PhrictionHistoryController.php | 4 +- .../controller/PhrictionListController.php | 4 +- .../PonderQuestionListController.php | 4 +- .../PhabricatorProjectListController.php | 4 +- .../project/ReleephProjectListController.php | 4 +- .../project/ReleephProjectViewController.php | 4 +- ...PhabricatorApplicationSearchController.php | 6 +- ...abricatorSettingsPanelExternalAccounts.php | 8 +- .../PhabricatorSlowvoteListController.php | 4 +- .../PhabricatorTokenGivenController.php | 4 +- .../PhabricatorTokenLeaderController.php | 4 +- ...mple.php => PHUIObjectItemListExample.php} | 104 ++++++---- .../examples/PHUIWorkboardExample.php | 38 ++-- .../PhabricatorXHProfSampleListController.php | 4 +- ...PhabricatorCustomFieldConfigOptionType.php | 4 +- .../field/PhabricatorCustomField.php | 2 +- .../PHUIObjectItemListView.php} | 28 ++- .../PHUIObjectItemView.php} | 76 +++---- src/view/phui/PHUIWorkpanelView.php | 2 +- webroot/rsrc/css/application/flag/flag.css | 2 +- .../phui-object-item-list-view.css} | 192 ++++++++++-------- .../maniphest/behavior-batch-selector.js | 2 +- 63 files changed, 426 insertions(+), 370 deletions(-) rename src/applications/uiexample/examples/{PhabricatorObjectItemListExample.php => PHUIObjectItemListExample.php} (75%) rename src/view/{layout/PhabricatorObjectItemListView.php => phui/PHUIObjectItemListView.php} (70%) rename src/view/{layout/PhabricatorObjectItemView.php => phui/PHUIObjectItemView.php} (82%) rename webroot/rsrc/css/{layout/phabricator-object-item-list-view.css => phui/phui-object-item-list-view.css} (60%) diff --git a/scripts/celerity_mapper.php b/scripts/celerity_mapper.php index 23506c4e67..e087b7e59f 100755 --- a/scripts/celerity_mapper.php +++ b/scripts/celerity_mapper.php @@ -101,7 +101,7 @@ $package_spec = array( 'phabricator-nav-view-css', 'phabricator-side-menu-view-css', 'phabricator-crumbs-view-css', - 'phabricator-object-item-list-view-css', + 'phui-object-item-list-view-css', 'global-drag-and-drop-css', 'phui-spacing-css', 'phui-form-css', diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index 37d8b39bcd..110478613d 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -1831,7 +1831,7 @@ celerity_register_resource_map(array( ), 'javelin-behavior-maniphest-batch-selector' => array( - 'uri' => '/res/c33cb5e3/rsrc/js/application/maniphest/behavior-batch-selector.js', + 'uri' => '/res/423c5f1b/rsrc/js/application/maniphest/behavior-batch-selector.js', 'type' => 'js', 'requires' => array( @@ -3173,7 +3173,7 @@ celerity_register_resource_map(array( ), 'phabricator-flag-css' => array( - 'uri' => '/res/7c3dd9ea/rsrc/css/application/flag/flag.css', + 'uri' => '/res/cdb5cb1b/rsrc/css/application/flag/flag.css', 'type' => 'css', 'requires' => array( @@ -3308,15 +3308,6 @@ celerity_register_resource_map(array( ), 'disk' => '/rsrc/css/application/base/notification-menu.css', ), - 'phabricator-object-item-list-view-css' => - array( - 'uri' => '/res/44b658b3/rsrc/css/layout/phabricator-object-item-list-view.css', - 'type' => 'css', - 'requires' => - array( - ), - 'disk' => '/rsrc/css/layout/phabricator-object-item-list-view.css', - ), 'phabricator-object-list-view-css' => array( 'uri' => '/res/4f183668/rsrc/css/application/projects/phabricator-object-list-view.css', @@ -3808,6 +3799,15 @@ celerity_register_resource_map(array( ), 'disk' => '/rsrc/css/phui/phui-list.css', ), + 'phui-object-item-list-view-css' => + array( + 'uri' => '/res/3200de88/rsrc/css/phui/phui-object-item-list-view.css', + 'type' => 'css', + 'requires' => + array( + ), + 'disk' => '/rsrc/css/phui/phui-object-item-list-view.css', + ), 'phui-pinboard-view-css' => array( 'uri' => '/res/f791ea99/rsrc/css/phui/phui-pinboard-view.css', @@ -4171,7 +4171,7 @@ celerity_register_resource_map(array( ), array( 'packages' => array( - '3806f0da' => + '1ae76a7e' => array( 'name' => 'core.pkg.css', 'symbols' => @@ -4208,7 +4208,7 @@ celerity_register_resource_map(array( 29 => 'phabricator-nav-view-css', 30 => 'phabricator-side-menu-view-css', 31 => 'phabricator-crumbs-view-css', - 32 => 'phabricator-object-item-list-view-css', + 32 => 'phui-object-item-list-view-css', 33 => 'global-drag-and-drop-css', 34 => 'phui-spacing-css', 35 => 'phui-form-css', @@ -4218,7 +4218,7 @@ celerity_register_resource_map(array( 39 => 'phabricator-property-list-view-css', 40 => 'phabricator-tag-view-css', ), - 'uri' => '/res/pkg/3806f0da/core.pkg.css', + 'uri' => '/res/pkg/1ae76a7e/core.pkg.css', 'type' => 'css', ), '8977e356' => @@ -4392,7 +4392,7 @@ celerity_register_resource_map(array( 'uri' => '/res/pkg/0a9e494f/maniphest.pkg.css', 'type' => 'css', ), - '98f64f07' => + '83a3853e' => array( 'name' => 'maniphest.pkg.js', 'symbols' => @@ -4403,21 +4403,21 @@ celerity_register_resource_map(array( 3 => 'javelin-behavior-maniphest-transaction-expand', 4 => 'javelin-behavior-maniphest-subpriority-editor', ), - 'uri' => '/res/pkg/98f64f07/maniphest.pkg.js', + 'uri' => '/res/pkg/83a3853e/maniphest.pkg.js', 'type' => 'js', ), ), 'reverse' => array( - 'aphront-dialog-view-css' => '3806f0da', - 'aphront-error-view-css' => '3806f0da', - 'aphront-list-filter-view-css' => '3806f0da', - 'aphront-pager-view-css' => '3806f0da', - 'aphront-panel-view-css' => '3806f0da', - 'aphront-table-view-css' => '3806f0da', - 'aphront-tokenizer-control-css' => '3806f0da', - 'aphront-tooltip-css' => '3806f0da', - 'aphront-typeahead-control-css' => '3806f0da', + 'aphront-dialog-view-css' => '1ae76a7e', + 'aphront-error-view-css' => '1ae76a7e', + 'aphront-list-filter-view-css' => '1ae76a7e', + 'aphront-pager-view-css' => '1ae76a7e', + 'aphront-panel-view-css' => '1ae76a7e', + 'aphront-table-view-css' => '1ae76a7e', + 'aphront-tokenizer-control-css' => '1ae76a7e', + 'aphront-tooltip-css' => '1ae76a7e', + 'aphront-typeahead-control-css' => '1ae76a7e', 'differential-changeset-view-css' => '44bfe40c', 'differential-core-view-css' => '44bfe40c', 'differential-inline-comment-editor' => 'd07a3bc2', @@ -4431,7 +4431,7 @@ celerity_register_resource_map(array( 'differential-table-of-contents-css' => '44bfe40c', 'diffusion-commit-view-css' => 'c8ce2d88', 'diffusion-icons-css' => 'c8ce2d88', - 'global-drag-and-drop-css' => '3806f0da', + 'global-drag-and-drop-css' => '1ae76a7e', 'inline-comment-summary-css' => '44bfe40c', 'javelin-aphlict' => '8977e356', 'javelin-behavior' => '2dbbb7d1', @@ -4463,11 +4463,11 @@ celerity_register_resource_map(array( 'javelin-behavior-konami' => '8977e356', 'javelin-behavior-lightbox-attachments' => '8977e356', 'javelin-behavior-load-blame' => 'd07a3bc2', - 'javelin-behavior-maniphest-batch-selector' => '98f64f07', - 'javelin-behavior-maniphest-subpriority-editor' => '98f64f07', - 'javelin-behavior-maniphest-transaction-controls' => '98f64f07', - 'javelin-behavior-maniphest-transaction-expand' => '98f64f07', - 'javelin-behavior-maniphest-transaction-preview' => '98f64f07', + 'javelin-behavior-maniphest-batch-selector' => '83a3853e', + 'javelin-behavior-maniphest-subpriority-editor' => '83a3853e', + 'javelin-behavior-maniphest-transaction-controls' => '83a3853e', + 'javelin-behavior-maniphest-transaction-expand' => '83a3853e', + 'javelin-behavior-maniphest-transaction-preview' => '83a3853e', 'javelin-behavior-phabricator-active-nav' => '8977e356', 'javelin-behavior-phabricator-autofocus' => '8977e356', 'javelin-behavior-phabricator-gesture' => '8977e356', @@ -4504,55 +4504,55 @@ celerity_register_resource_map(array( 'javelin-util' => '2dbbb7d1', 'javelin-vector' => '2dbbb7d1', 'javelin-workflow' => '2dbbb7d1', - 'lightbox-attachment-css' => '3806f0da', + 'lightbox-attachment-css' => '1ae76a7e', 'maniphest-task-summary-css' => '0a9e494f', 'maniphest-transaction-detail-css' => '0a9e494f', - 'phabricator-action-list-view-css' => '3806f0da', - 'phabricator-application-launch-view-css' => '3806f0da', + 'phabricator-action-list-view-css' => '1ae76a7e', + 'phabricator-application-launch-view-css' => '1ae76a7e', 'phabricator-busy' => '8977e356', 'phabricator-content-source-view-css' => '44bfe40c', - 'phabricator-core-css' => '3806f0da', - 'phabricator-crumbs-view-css' => '3806f0da', + 'phabricator-core-css' => '1ae76a7e', + 'phabricator-crumbs-view-css' => '1ae76a7e', 'phabricator-drag-and-drop-file-upload' => 'd07a3bc2', 'phabricator-dropdown-menu' => '8977e356', 'phabricator-file-upload' => '8977e356', - 'phabricator-filetree-view-css' => '3806f0da', - 'phabricator-flag-css' => '3806f0da', - 'phabricator-header-view-css' => '3806f0da', + 'phabricator-filetree-view-css' => '1ae76a7e', + 'phabricator-flag-css' => '1ae76a7e', + 'phabricator-header-view-css' => '1ae76a7e', 'phabricator-hovercard' => '8977e356', - 'phabricator-jump-nav' => '3806f0da', + 'phabricator-jump-nav' => '1ae76a7e', 'phabricator-keyboard-shortcut' => '8977e356', 'phabricator-keyboard-shortcut-manager' => '8977e356', - 'phabricator-main-menu-view' => '3806f0da', + 'phabricator-main-menu-view' => '1ae76a7e', 'phabricator-menu-item' => '8977e356', - 'phabricator-nav-view-css' => '3806f0da', + 'phabricator-nav-view-css' => '1ae76a7e', 'phabricator-notification' => '8977e356', - 'phabricator-notification-css' => '3806f0da', - 'phabricator-notification-menu-css' => '3806f0da', - 'phabricator-object-item-list-view-css' => '3806f0da', + 'phabricator-notification-css' => '1ae76a7e', + 'phabricator-notification-menu-css' => '1ae76a7e', 'phabricator-object-selector-css' => '44bfe40c', 'phabricator-phtize' => '8977e356', 'phabricator-prefab' => '8977e356', 'phabricator-project-tag-css' => '0a9e494f', - 'phabricator-property-list-view-css' => '3806f0da', - 'phabricator-remarkup-css' => '3806f0da', + 'phabricator-property-list-view-css' => '1ae76a7e', + 'phabricator-remarkup-css' => '1ae76a7e', 'phabricator-shaped-request' => 'd07a3bc2', - 'phabricator-side-menu-view-css' => '3806f0da', - 'phabricator-standard-page-view' => '3806f0da', - 'phabricator-tag-view-css' => '3806f0da', + 'phabricator-side-menu-view-css' => '1ae76a7e', + 'phabricator-standard-page-view' => '1ae76a7e', + 'phabricator-tag-view-css' => '1ae76a7e', 'phabricator-textareautils' => '8977e356', 'phabricator-tooltip' => '8977e356', - 'phabricator-transaction-view-css' => '3806f0da', - 'phabricator-zindex-css' => '3806f0da', - 'phui-button-css' => '3806f0da', - 'phui-form-css' => '3806f0da', - 'phui-form-view-css' => '3806f0da', - 'phui-icon-view-css' => '3806f0da', - 'phui-spacing-css' => '3806f0da', - 'sprite-apps-large-css' => '3806f0da', - 'sprite-gradient-css' => '3806f0da', - 'sprite-icons-css' => '3806f0da', - 'sprite-menu-css' => '3806f0da', - 'syntax-highlighting-css' => '3806f0da', + 'phabricator-transaction-view-css' => '1ae76a7e', + 'phabricator-zindex-css' => '1ae76a7e', + 'phui-button-css' => '1ae76a7e', + 'phui-form-css' => '1ae76a7e', + 'phui-form-view-css' => '1ae76a7e', + 'phui-icon-view-css' => '1ae76a7e', + 'phui-object-item-list-view-css' => '1ae76a7e', + 'phui-spacing-css' => '1ae76a7e', + 'sprite-apps-large-css' => '1ae76a7e', + 'sprite-gradient-css' => '1ae76a7e', + 'sprite-icons-css' => '1ae76a7e', + 'sprite-menu-css' => '1ae76a7e', + 'syntax-highlighting-css' => '1ae76a7e', ), )); diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 714f40ffc6..330c1f9514 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -759,6 +759,9 @@ phutil_register_library_map(array( 'PHUIListItemView' => 'view/phui/PHUIListItemView.php', 'PHUIListView' => 'view/phui/PHUIListView.php', 'PHUIListViewTestCase' => 'view/layout/__tests__/PHUIListViewTestCase.php', + 'PHUIObjectItemListExample' => 'applications/uiexample/examples/PHUIObjectItemListExample.php', + 'PHUIObjectItemListView' => 'view/phui/PHUIObjectItemListView.php', + 'PHUIObjectItemView' => 'view/phui/PHUIObjectItemView.php', 'PHUIPagedFormView' => 'view/form/PHUIPagedFormView.php', 'PHUIPinboardItemView' => 'view/phui/PHUIPinboardItemView.php', 'PHUIPinboardView' => 'view/phui/PHUIPinboardView.php', @@ -1371,9 +1374,6 @@ phutil_register_library_map(array( 'PhabricatorObjectHandleConstants' => 'applications/phid/handle/const/PhabricatorObjectHandleConstants.php', 'PhabricatorObjectHandleData' => 'applications/phid/handle/PhabricatorObjectHandleData.php', 'PhabricatorObjectHandleStatus' => 'applications/phid/handle/const/PhabricatorObjectHandleStatus.php', - 'PhabricatorObjectItemListExample' => 'applications/uiexample/examples/PhabricatorObjectItemListExample.php', - 'PhabricatorObjectItemListView' => 'view/layout/PhabricatorObjectItemListView.php', - 'PhabricatorObjectItemView' => 'view/layout/PhabricatorObjectItemView.php', 'PhabricatorObjectListView' => 'view/control/PhabricatorObjectListView.php', 'PhabricatorObjectMailReceiver' => 'applications/metamta/receiver/PhabricatorObjectMailReceiver.php', 'PhabricatorObjectMailReceiverTestCase' => 'applications/metamta/receiver/__tests__/PhabricatorObjectMailReceiverTestCase.php', @@ -2818,6 +2818,9 @@ phutil_register_library_map(array( 'PHUIListItemView' => 'AphrontTagView', 'PHUIListView' => 'AphrontTagView', 'PHUIListViewTestCase' => 'PhabricatorTestCase', + 'PHUIObjectItemListExample' => 'PhabricatorUIExample', + 'PHUIObjectItemListView' => 'AphrontTagView', + 'PHUIObjectItemView' => 'AphrontTagView', 'PHUIPagedFormView' => 'AphrontTagView', 'PHUIPinboardItemView' => 'AphrontView', 'PHUIPinboardView' => 'AphrontView', @@ -3475,9 +3478,6 @@ phutil_register_library_map(array( 'PhabricatorOAuthServerTokenController' => 'PhabricatorAuthController', 'PhabricatorObjectHandle' => 'PhabricatorPolicyInterface', 'PhabricatorObjectHandleStatus' => 'PhabricatorObjectHandleConstants', - 'PhabricatorObjectItemListExample' => 'PhabricatorUIExample', - 'PhabricatorObjectItemListView' => 'AphrontTagView', - 'PhabricatorObjectItemView' => 'AphrontTagView', 'PhabricatorObjectListView' => 'AphrontView', 'PhabricatorObjectMailReceiver' => 'PhabricatorMailReceiver', 'PhabricatorObjectMailReceiverTestCase' => 'PhabricatorTestCase', diff --git a/src/applications/audit/view/PhabricatorAuditCommitListView.php b/src/applications/audit/view/PhabricatorAuditCommitListView.php index ffa62f4482..cc3cc0e1ea 100644 --- a/src/applications/audit/view/PhabricatorAuditCommitListView.php +++ b/src/applications/audit/view/PhabricatorAuditCommitListView.php @@ -66,7 +66,7 @@ final class PhabricatorAuditCommitListView extends AphrontView { } public function render() { - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setCards(true); $list->setFlush(true); foreach ($this->commits as $commit) { @@ -91,7 +91,7 @@ final class PhabricatorAuditCommitListView extends AphrontView { $commit_status = PhabricatorAuditCommitStatusConstants::getStatusName( $commit->getAuditStatus()); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObjectName($commit_name) ->setHeader($commit_desc) ->setHref($commit_link) diff --git a/src/applications/audit/view/PhabricatorAuditListView.php b/src/applications/audit/view/PhabricatorAuditListView.php index 120e292fd0..16a5058521 100644 --- a/src/applications/audit/view/PhabricatorAuditListView.php +++ b/src/applications/audit/view/PhabricatorAuditListView.php @@ -110,7 +110,7 @@ final class PhabricatorAuditListView extends AphrontView { public function render() { $rowc = array(); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setCards(true); $list->setFlush(true); foreach ($this->audits as $audit) { @@ -135,7 +135,7 @@ final class PhabricatorAuditListView extends AphrontView { PhabricatorAuditStatusConstants::getStatusColor($status_code); $auditor_handle = $this->getHandle($audit->getAuditorPHID()); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObjectName($commit_name) ->setHeader($commit_desc) ->setHref($commit_link) diff --git a/src/applications/auth/controller/config/PhabricatorAuthListController.php b/src/applications/auth/controller/config/PhabricatorAuthListController.php index e5c6b28867..cf59f68a0f 100644 --- a/src/applications/auth/controller/config/PhabricatorAuthListController.php +++ b/src/applications/auth/controller/config/PhabricatorAuthListController.php @@ -11,9 +11,9 @@ final class PhabricatorAuthListController ->setViewer($viewer) ->execute(); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); foreach ($configs as $config) { - $item = new PhabricatorObjectItemView(); + $item = new PHUIObjectItemView(); $id = $config->getID(); diff --git a/src/applications/auth/provider/PhabricatorAuthProvider.php b/src/applications/auth/provider/PhabricatorAuthProvider.php index 32fb052b4b..b51fb27c38 100644 --- a/src/applications/auth/provider/PhabricatorAuthProvider.php +++ b/src/applications/auth/provider/PhabricatorAuthProvider.php @@ -331,7 +331,7 @@ abstract class PhabricatorAuthProvider { public function willRenderLinkedAccount( PhabricatorUser $viewer, - PhabricatorObjectItemView $item, + PHUIObjectItemView $item, PhabricatorExternalAccount $account) { $account_view = id(new PhabricatorAuthAccountView()) diff --git a/src/applications/auth/provider/PhabricatorAuthProviderOAuth.php b/src/applications/auth/provider/PhabricatorAuthProviderOAuth.php index 9578e3e2f4..415fb88e38 100644 --- a/src/applications/auth/provider/PhabricatorAuthProviderOAuth.php +++ b/src/applications/auth/provider/PhabricatorAuthProviderOAuth.php @@ -310,7 +310,7 @@ abstract class PhabricatorAuthProviderOAuth extends PhabricatorAuthProvider { public function willRenderLinkedAccount( PhabricatorUser $viewer, - PhabricatorObjectItemView $item, + PHUIObjectItemView $item, PhabricatorExternalAccount $account) { // Get a valid token, possibly refreshing it. diff --git a/src/applications/auth/provider/PhabricatorAuthProviderOAuth1.php b/src/applications/auth/provider/PhabricatorAuthProviderOAuth1.php index 96cc5d7c1e..30c82cd65f 100644 --- a/src/applications/auth/provider/PhabricatorAuthProviderOAuth1.php +++ b/src/applications/auth/provider/PhabricatorAuthProviderOAuth1.php @@ -245,7 +245,7 @@ abstract class PhabricatorAuthProviderOAuth1 extends PhabricatorAuthProvider { public function willRenderLinkedAccount( PhabricatorUser $viewer, - PhabricatorObjectItemView $item, + PHUIObjectItemView $item, PhabricatorExternalAccount $account) { $item->addAttribute(pht('OAuth1 Account')); diff --git a/src/applications/auth/provider/PhabricatorAuthProviderPassword.php b/src/applications/auth/provider/PhabricatorAuthProviderPassword.php index dddcbc18cb..ab4875b82b 100644 --- a/src/applications/auth/provider/PhabricatorAuthProviderPassword.php +++ b/src/applications/auth/provider/PhabricatorAuthProviderPassword.php @@ -241,7 +241,7 @@ final class PhabricatorAuthProviderPassword public function willRenderLinkedAccount( PhabricatorUser $viewer, - PhabricatorObjectItemView $item, + PHUIObjectItemView $item, PhabricatorExternalAccount $account) { return; } diff --git a/src/applications/calendar/controller/PhabricatorCalendarViewStatusController.php b/src/applications/calendar/controller/PhabricatorCalendarViewStatusController.php index 90d8682eae..68ff80a538 100644 --- a/src/applications/calendar/controller/PhabricatorCalendarViewStatusController.php +++ b/src/applications/calendar/controller/PhabricatorCalendarViewStatusController.php @@ -47,7 +47,7 @@ final class PhabricatorCalendarViewStatusController $user = $this->getRequest()->getUser(); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); foreach ($statuses as $status) { if ($status->getUserPHID() == $user->getPHID()) { $href = $this->getApplicationURI('/status/edit/'.$status->getID().'/'); @@ -70,7 +70,7 @@ final class PhabricatorCalendarViewStatusController ? 'red' : 'yellow'; - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($status->getTerseSummary($user)) ->setHref($href) ->setBarColor($color) diff --git a/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php b/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php index 00cd140908..88ebc89e93 100644 --- a/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php +++ b/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php @@ -11,9 +11,9 @@ final class PhabricatorChatLogChannelListController ->setViewer($user) ->execute(); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); foreach ($channels as $channel) { - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($channel->getChannelName()) ->setHref('/chatlog/channel/'.$channel->getID().'/') ->addAttribute($channel->getServiceName()) diff --git a/src/applications/conduit/controller/PhabricatorConduitListController.php b/src/applications/conduit/controller/PhabricatorConduitListController.php index e2d1eb5f79..fdf46a0fd0 100644 --- a/src/applications/conduit/controller/PhabricatorConduitListController.php +++ b/src/applications/conduit/controller/PhabricatorConduitListController.php @@ -40,7 +40,7 @@ final class PhabricatorConduitListController if ($list) { $out[] = $list; } - $list = id(new PhabricatorObjectItemListView()); + $list = id(new PHUIObjectItemListView()); $app_object = $method->getApplication(); if ($app_object) { @@ -52,7 +52,7 @@ final class PhabricatorConduitListController $method_name = $method->getAPIMethodName(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($method_name) ->setHref($this->getApplicationURI('method/'.$method_name.'/')) ->addAttribute($method->getMethodDescription()); diff --git a/src/applications/config/controller/PhabricatorConfigGroupController.php b/src/applications/config/controller/PhabricatorConfigGroupController.php index 280bbf6f69..45cde11b08 100644 --- a/src/applications/config/controller/PhabricatorConfigGroupController.php +++ b/src/applications/config/controller/PhabricatorConfigGroupController.php @@ -70,12 +70,12 @@ final class PhabricatorConfigGroupController } $engine->process(); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setStackable(true); foreach ($options as $option) { $summary = $engine->getOutput($option, 'summary'); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($option->getKey()) ->setHref('/config/edit/'.$option->getKey().'/') ->addAttribute($summary); diff --git a/src/applications/config/controller/PhabricatorConfigIssueListController.php b/src/applications/config/controller/PhabricatorConfigIssueListController.php index f9b6fb9b1b..9b9b60299b 100644 --- a/src/applications/config/controller/PhabricatorConfigIssueListController.php +++ b/src/applications/config/controller/PhabricatorConfigIssueListController.php @@ -47,13 +47,13 @@ final class PhabricatorConfigIssueListController private function buildIssueList(array $issues) { assert_instances_of($issues, 'PhabricatorSetupIssue'); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setCards(true); $ignored_items = array(); foreach ($issues as $issue) { $href = $this->getApplicationURI('/issue/'.$issue->getIssueKey().'/'); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($issue->getName()) ->setHref($href) ->addAttribute($issue->getSummary()); diff --git a/src/applications/config/controller/PhabricatorConfigListController.php b/src/applications/config/controller/PhabricatorConfigListController.php index c730dac71f..addf01a073 100644 --- a/src/applications/config/controller/PhabricatorConfigListController.php +++ b/src/applications/config/controller/PhabricatorConfigListController.php @@ -44,11 +44,11 @@ final class PhabricatorConfigListController private function buildConfigOptionsList(array $groups) { assert_instances_of($groups, 'PhabricatorApplicationConfigOptions'); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setStackable(true); $groups = msort($groups, 'getName'); foreach ($groups as $group) { - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($group->getName()) ->setHref('/config/group/'.$group->getKey().'/') ->addAttribute($group->getDescription()); diff --git a/src/applications/countdown/controller/PhabricatorCountdownListController.php b/src/applications/countdown/controller/PhabricatorCountdownListController.php index 40f3312ef7..549b6a8705 100644 --- a/src/applications/countdown/controller/PhabricatorCountdownListController.php +++ b/src/applications/countdown/controller/PhabricatorCountdownListController.php @@ -34,12 +34,12 @@ final class PhabricatorCountdownListController $this->loadHandles(mpull($countdowns, 'getAuthorPHID')); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setUser($viewer); foreach ($countdowns as $countdown) { $id = $countdown->getID(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObjectName("C{$id}") ->setHeader($countdown->getTitle()) ->setHref($this->getApplicationURI("{$id}/")) diff --git a/src/applications/daemon/view/PhabricatorDaemonLogListView.php b/src/applications/daemon/view/PhabricatorDaemonLogListView.php index a27d90b525..3ac45fae6d 100644 --- a/src/applications/daemon/view/PhabricatorDaemonLogListView.php +++ b/src/applications/daemon/view/PhabricatorDaemonLogListView.php @@ -17,12 +17,12 @@ final class PhabricatorDaemonLogListView extends AphrontView { throw new Exception("Call setUser() before rendering!"); } - $list = id(new PhabricatorObjectItemListView()); + $list = id(new PHUIObjectItemListView()); foreach ($this->daemonLogs as $log) { $id = $log->getID(); $epoch = $log->getDateCreated(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObjectName(pht("Daemon %s", $id)) ->setHeader($log->getDaemon()) ->setHref("/daemon/log/{$id}/") diff --git a/src/applications/differential/controller/DifferentialRevisionListController.php b/src/applications/differential/controller/DifferentialRevisionListController.php index fc5dd7cb4b..f7f9931be7 100644 --- a/src/applications/differential/controller/DifferentialRevisionListController.php +++ b/src/applications/differential/controller/DifferentialRevisionListController.php @@ -84,7 +84,7 @@ final class DifferentialRevisionListController extends DifferentialController } if (count($views) == 1) { - // Reduce this to a PhabricatorObjectItemListView so we can get the free + // Reduce this to a PHUIObjectItemListView so we can get the free // support from ApplicationSearch. return head($views)->render(); } else { diff --git a/src/applications/differential/view/DifferentialRevisionListView.php b/src/applications/differential/view/DifferentialRevisionListView.php index 67cf4b099d..bc70460b26 100644 --- a/src/applications/differential/view/DifferentialRevisionListView.php +++ b/src/applications/differential/view/DifferentialRevisionListView.php @@ -111,7 +111,7 @@ final class DifferentialRevisionListView extends AphrontView { $field->setHandles($this->handles); } - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setCards(true); $do_not_display_age = array( @@ -120,7 +120,7 @@ final class DifferentialRevisionListView extends AphrontView { ); foreach ($this->revisions as $revision) { - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setUser($user); $rev_fields = array(); @@ -149,14 +149,14 @@ final class DifferentialRevisionListView extends AphrontView { empty($do_not_display_age[$status]); - $object_age = PhabricatorObjectItemView::AGE_FRESH; + $object_age = PHUIObjectItemView::AGE_FRESH; foreach ($this->fields as $field) { if ($show_age) { if ($field instanceof DifferentialDateModifiedFieldSpecification) { if ($stale && $modified < $stale) { - $object_age = PhabricatorObjectItemView::AGE_OLD; + $object_age = PHUIObjectItemView::AGE_OLD; } else if ($fresh && $modified < $fresh) { - $object_age = PhabricatorObjectItemView::AGE_STALE; + $object_age = PHUIObjectItemView::AGE_STALE; } } } diff --git a/src/applications/diffusion/controller/DiffusionHomeController.php b/src/applications/diffusion/controller/DiffusionHomeController.php index ea65c8a3da..e954c72087 100644 --- a/src/applications/diffusion/controller/DiffusionHomeController.php +++ b/src/applications/diffusion/controller/DiffusionHomeController.php @@ -19,11 +19,11 @@ final class DiffusionHomeController extends DiffusionController { ); } - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setCards(true); $list->setFlush(true); foreach ($rows as $row) { - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($row[0]) ->setHref($row[1]) ->setSubhead(($row[2] ? $row[2] : pht('No Description'))); @@ -162,11 +162,11 @@ final class DiffusionHomeController extends DiffusionController { $repository_tool)); } - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setCards(true); $list->setFlush(true); foreach ($rows as $row) { - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($row[0]) ->setSubHead($row[5]) ->setHref($row[1]) diff --git a/src/applications/diviner/controller/DivinerController.php b/src/applications/diviner/controller/DivinerController.php index 5347a18b06..449d2d90fb 100644 --- a/src/applications/diviner/controller/DivinerController.php +++ b/src/applications/diviner/controller/DivinerController.php @@ -27,11 +27,11 @@ abstract class DivinerController extends PhabricatorController { $request = $this->getRequest(); $user = $request->getUser(); - $list = id(new PhabricatorObjectItemListView()) + $list = id(new PHUIObjectItemListView()) ->setUser($user); foreach ($symbols as $symbol) { - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($symbol->getTitle()) ->setHref($symbol->getURI()) ->addIcon('none', diff --git a/src/applications/diviner/controller/DivinerLegacyController.php b/src/applications/diviner/controller/DivinerLegacyController.php index cc6c84e86e..fc23786385 100644 --- a/src/applications/diviner/controller/DivinerLegacyController.php +++ b/src/applications/diviner/controller/DivinerLegacyController.php @@ -29,11 +29,11 @@ final class DivinerLegacyController extends DivinerController { $request = $this->getRequest(); $viewer = $request->getUser(); - $list = id(new PhabricatorObjectItemListView()) + $list = id(new PHUIObjectItemListView()) ->setUser($viewer); foreach ($links as $href => $link) { - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHref($href) ->setHeader($link['name']) ->addAttribute($link['flavor']); diff --git a/src/applications/drydock/controller/DrydockController.php b/src/applications/drydock/controller/DrydockController.php index f9c976c6a7..0e3929761b 100644 --- a/src/applications/drydock/controller/DrydockController.php +++ b/src/applications/drydock/controller/DrydockController.php @@ -80,10 +80,10 @@ abstract class DrydockController extends PhabricatorController { assert_instances_of($leases, 'DrydockLease'); $user = $this->getRequest()->getUser(); - $view = new PhabricatorObjectItemListView(); + $view = new PHUIObjectItemListView(); foreach ($leases as $lease) { - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($lease->getLeaseName()) ->setHref($this->getApplicationURI('/lease/'.$lease->getID().'/')); @@ -126,12 +126,12 @@ abstract class DrydockController extends PhabricatorController { assert_instances_of($resources, 'DrydockResource'); $user = $this->getRequest()->getUser(); - $view = new PhabricatorObjectItemListView(); + $view = new PHUIObjectItemListView(); foreach ($resources as $resource) { $name = pht('Resource %d', $resource->getID()).': '.$resource->getName(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHref($this->getApplicationURI('/resource/'.$resource->getID().'/')) ->setHeader($name); diff --git a/src/applications/files/controller/PhabricatorFileListController.php b/src/applications/files/controller/PhabricatorFileListController.php index 4943e3cc7e..07089758e2 100644 --- a/src/applications/files/controller/PhabricatorFileListController.php +++ b/src/applications/files/controller/PhabricatorFileListController.php @@ -40,7 +40,7 @@ final class PhabricatorFileListController extends PhabricatorFileController $highlighted_ids = array_fill_keys($highlighted_ids, true); - $list_view = id(new PhabricatorObjectItemListView()) + $list_view = id(new PHUIObjectItemListView()) ->setUser($user); foreach ($files as $file) { @@ -58,7 +58,7 @@ final class PhabricatorFileListController extends PhabricatorFileController $uploaded = pht('Uploaded on %s', $date_created); } - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObject($file) ->setObjectName("F{$id}") ->setHeader($name) diff --git a/src/applications/flag/controller/PhabricatorFlagListController.php b/src/applications/flag/controller/PhabricatorFlagListController.php index 2258f252fb..6a22022a29 100644 --- a/src/applications/flag/controller/PhabricatorFlagListController.php +++ b/src/applications/flag/controller/PhabricatorFlagListController.php @@ -30,7 +30,7 @@ final class PhabricatorFlagListController extends PhabricatorFlagController $viewer = $this->getRequest()->getUser(); - $list = id(new PhabricatorObjectItemListView()) + $list = id(new PHUIObjectItemListView()) ->setUser($viewer); foreach ($flags as $flag) { $id = $flag->getID(); @@ -45,7 +45,7 @@ final class PhabricatorFlagListController extends PhabricatorFlagController ), ''); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->addHeadIcon($flag_icon) ->setHeader($flag->getHandle()->renderLink()); diff --git a/src/applications/herald/controller/HeraldRuleListController.php b/src/applications/herald/controller/HeraldRuleListController.php index 9c117884ae..dacf0ec859 100644 --- a/src/applications/herald/controller/HeraldRuleListController.php +++ b/src/applications/herald/controller/HeraldRuleListController.php @@ -35,12 +35,12 @@ final class HeraldRuleListController extends HeraldController $content_type_map = HeraldAdapter::getEnabledAdapterMap(); - $list = id(new PhabricatorObjectItemListView()) + $list = id(new PHUIObjectItemListView()) ->setUser($viewer); foreach ($rules as $rule) { $id = $rule->getID(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObjectName(pht('Rule %s', $rule->getID())) ->setHeader($rule->getName()) ->setHref($this->getApplicationURI("rule/{$id}/")); diff --git a/src/applications/herald/view/HeraldRuleEditHistoryView.php b/src/applications/herald/view/HeraldRuleEditHistoryView.php index 58fa440411..d4cb132e33 100644 --- a/src/applications/herald/view/HeraldRuleEditHistoryView.php +++ b/src/applications/herald/view/HeraldRuleEditHistoryView.php @@ -21,7 +21,7 @@ final class HeraldRuleEditHistoryView extends AphrontView { } public function render() { - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setFlush(true); $list->setCards(true); @@ -48,7 +48,7 @@ final class HeraldRuleEditHistoryView extends AphrontView { $editor = $this->handles[$edit->getEditorPHID()]->renderLink(); $date = phabricator_datetime($edit->getDateCreated(), $this->user); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObjectName(pht('Rule %d', $edit->getRuleID())) ->setSubHead($details) ->addIcon('none', $date) diff --git a/src/applications/legalpad/controller/LegalpadDocumentListController.php b/src/applications/legalpad/controller/LegalpadDocumentListController.php index 4d0f6ea43a..ba334bcaf3 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentListController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentListController.php @@ -33,7 +33,7 @@ final class LegalpadDocumentListController extends LegalpadController mpull($documents, 'getRecentContributorPHIDs')); $this->loadHandles($contributors); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setUser($user); foreach ($documents as $document) { $last_updated = phabricator_date($document->getDateModified(), $user); @@ -42,7 +42,7 @@ final class LegalpadDocumentListController extends LegalpadController $title = $document->getTitle(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObjectName('L'.$document->getID()) ->setHeader($title) ->setHref($this->getApplicationURI('view/'.$document->getID())) diff --git a/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php b/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php index 0edb7611aa..22a843878f 100644 --- a/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php +++ b/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php @@ -29,10 +29,10 @@ final class PhabricatorMailingListsListController PhabricatorSavedQuery $query) { assert_instances_of($lists, 'PhabricatorMetaMTAMailingList'); - $view = id(new PhabricatorObjectItemListView()); + $view = id(new PHUIObjectItemListView()); foreach ($lists as $list) { - $item = new PhabricatorObjectItemView(); + $item = new PHUIObjectItemView(); $item->setHeader($list->getName()); $item->setHref($list->getURI()); diff --git a/src/applications/maniphest/view/ManiphestTaskListView.php b/src/applications/maniphest/view/ManiphestTaskListView.php index cb0afe1b54..b0e6631793 100644 --- a/src/applications/maniphest/view/ManiphestTaskListView.php +++ b/src/applications/maniphest/view/ManiphestTaskListView.php @@ -35,7 +35,7 @@ final class ManiphestTaskListView extends ManiphestView { public function render() { $handles = $this->handles; - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setCards(true); $list->setFlush(true); @@ -54,7 +54,7 @@ final class ManiphestTaskListView extends ManiphestView { } foreach ($this->tasks as $task) { - $item = new PhabricatorObjectItemView(); + $item = new PHUIObjectItemView(); $item->setObjectName('T'.$task->getID()); $item->setHeader($task->getTitle()); $item->setHref('/T'.$task->getID()); diff --git a/src/applications/meta/controller/PhabricatorApplicationsListController.php b/src/applications/meta/controller/PhabricatorApplicationsListController.php index e4e44cb506..55d22f6431 100644 --- a/src/applications/meta/controller/PhabricatorApplicationsListController.php +++ b/src/applications/meta/controller/PhabricatorApplicationsListController.php @@ -35,12 +35,12 @@ final class PhabricatorApplicationsListController private function buildInstalledApplicationsList(array $applications) { - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $applications = msort($applications, 'getName'); foreach ($applications as $application) { - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($application->getName()) ->setHref('/applications/view/'.get_class($application).'/') ->addAttribute($application->getShortDescription()); diff --git a/src/applications/paste/controller/PhabricatorPasteListController.php b/src/applications/paste/controller/PhabricatorPasteListController.php index 18d9d4121f..c46b4cae43 100644 --- a/src/applications/paste/controller/PhabricatorPasteListController.php +++ b/src/applications/paste/controller/PhabricatorPasteListController.php @@ -37,7 +37,7 @@ final class PhabricatorPasteListController extends PhabricatorPasteController $lang_map = PhabricatorEnv::getEnvConfig('pygments.dropdown-choices'); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setUser($user); foreach ($pastes as $paste) { $created = phabricator_date($paste->getDateCreated(), $user); @@ -58,7 +58,7 @@ final class PhabricatorPasteListController extends PhabricatorPasteController $title = nonempty($paste->getTitle(), pht('(An Untitled Masterwork)')); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObjectName('P'.$paste->getID()) ->setHeader($title) ->setHref('/P'.$paste->getID()) diff --git a/src/applications/people/controller/PhabricatorPeopleLdapController.php b/src/applications/people/controller/PhabricatorPeopleLdapController.php index 1bef0912be..ee6e2cd8d1 100644 --- a/src/applications/people/controller/PhabricatorPeopleLdapController.php +++ b/src/applications/people/controller/PhabricatorPeopleLdapController.php @@ -79,7 +79,7 @@ final class PhabricatorPeopleLdapController pht("Successfully imported users from LDAP"), )); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setNoDataString(pht("No users imported?")); foreach ($usernames as $username) { @@ -111,7 +111,7 @@ final class PhabricatorPeopleLdapController $color = 'red'; } - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($header) ->addAttribute($attribute) ->setBarColor($color); diff --git a/src/applications/people/controller/PhabricatorPeopleListController.php b/src/applications/people/controller/PhabricatorPeopleListController.php index fbc22cbd16..878ca311ca 100644 --- a/src/applications/people/controller/PhabricatorPeopleListController.php +++ b/src/applications/people/controller/PhabricatorPeopleListController.php @@ -36,7 +36,7 @@ final class PhabricatorPeopleListController extends PhabricatorPeopleController $request = $this->getRequest(); $viewer = $request->getUser(); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); foreach ($users as $user) { $primary_email = $user->loadPrimaryEmail(); @@ -49,7 +49,7 @@ final class PhabricatorPeopleListController extends PhabricatorPeopleController $user_handle = new PhabricatorObjectHandle(); $user_handle->setImageURI($user->loadProfileImageURI()); - $item = new PhabricatorObjectItemView(); + $item = new PHUIObjectItemView(); $item->setHeader($user->getFullName()) ->setHref('/p/'.$user->getUsername().'/') ->addAttribute(hsprintf('%s %s', diff --git a/src/applications/phame/controller/PhameController.php b/src/applications/phame/controller/PhameController.php index f4cdb407c9..231557a7e7 100644 --- a/src/applications/phame/controller/PhameController.php +++ b/src/applications/phame/controller/PhameController.php @@ -67,7 +67,7 @@ abstract class PhameController extends PhabricatorController { $blogger, $blog); } - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObject($post) ->setHeader($post->getTitle()) ->setHref($this->getApplicationURI('post/view/'.$post->getID().'/')); diff --git a/src/applications/phame/controller/blog/PhameBlogListController.php b/src/applications/phame/controller/blog/PhameBlogListController.php index 0508b04382..bd11cf2947 100644 --- a/src/applications/phame/controller/blog/PhameBlogListController.php +++ b/src/applications/phame/controller/blog/PhameBlogListController.php @@ -72,12 +72,12 @@ final class PhameBlogListController extends PhameController { PhabricatorUser $user, $nodata) { - $view = new PhabricatorObjectItemListView(); + $view = new PHUIObjectItemListView(); $view->setNoDataString($nodata); $view->setUser($user); foreach ($blogs as $blog) { - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($blog->getName()) ->setHref($this->getApplicationURI('blog/view/'.$blog->getID().'/')) ->setObject($blog); diff --git a/src/applications/phlux/controller/PhluxListController.php b/src/applications/phlux/controller/PhluxListController.php index f019f65ede..badc28f9c0 100644 --- a/src/applications/phlux/controller/PhluxListController.php +++ b/src/applications/phlux/controller/PhluxListController.php @@ -13,11 +13,11 @@ final class PhluxListController extends PhluxController { $vars = $query->executeWithCursorPager($pager); - $view = new PhabricatorObjectItemListView(); + $view = new PHUIObjectItemListView(); foreach ($vars as $var) { $key = $var->getVariableKey(); - $item = new PhabricatorObjectItemView(); + $item = new PHUIObjectItemView(); $item->setHeader($key); $item->setHref($this->getApplicationURI('/view/'.$key.'/')); $item->addIcon( diff --git a/src/applications/phortune/controller/PhortuneAccountViewController.php b/src/applications/phortune/controller/PhortuneAccountViewController.php index b43862425d..93f4c4071e 100644 --- a/src/applications/phortune/controller/PhortuneAccountViewController.php +++ b/src/applications/phortune/controller/PhortuneAccountViewController.php @@ -95,7 +95,7 @@ final class PhortuneAccountViewController extends PhortuneController { ->setIcon('new') ->setHref($add_uri)); - $list = id(new PhabricatorObjectItemListView()) + $list = id(new PHUIObjectItemListView()) ->setUser($user) ->setNoDataString( pht('No payment methods associated with this account.')); @@ -111,7 +111,7 @@ final class PhortuneAccountViewController extends PhortuneController { } foreach ($methods as $method) { - $item = new PhabricatorObjectItemView(); + $item = new PHUIObjectItemView(); $item->setHeader($method->getBrand().' / '.$method->getLastFourDigits()); switch ($method->getStatus()) { diff --git a/src/applications/phortune/controller/PhortuneProductListController.php b/src/applications/phortune/controller/PhortuneProductListController.php index e9bd770eb0..31d9de4601 100644 --- a/src/applications/phortune/controller/PhortuneProductListController.php +++ b/src/applications/phortune/controller/PhortuneProductListController.php @@ -30,7 +30,7 @@ final class PhortuneProductListController extends PhabricatorController { $header = id(new PhabricatorHeaderView()) ->setHeader(pht('Product List')); - $product_list = id(new PhabricatorObjectItemListView()) + $product_list = id(new PHUIObjectItemListView()) ->setUser($user) ->setNoDataString(pht('No products.')); @@ -40,7 +40,7 @@ final class PhortuneProductListController extends PhabricatorController { $price = $product->getPriceInCents(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObjectName($product->getID()) ->setHeader($product->getProductName()) ->setHref($view_uri) diff --git a/src/applications/phriction/controller/PhrictionDiffController.php b/src/applications/phriction/controller/PhrictionDiffController.php index 811ac4e611..6fed1c0950 100644 --- a/src/applications/phriction/controller/PhrictionDiffController.php +++ b/src/applications/phriction/controller/PhrictionDiffController.php @@ -246,12 +246,12 @@ final class PhrictionDiffController $phids = mpull($content, 'getAuthorPHID'); $handles = $this->loadViewerHandles($phids); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $first = true; foreach ($content as $c) { $author = $handles[$c->getAuthorPHID()]->renderLink(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader(pht('%s by %s, %s', PhrictionChangeType::getChangeTypeLabel($c->getChangeType()), $author, diff --git a/src/applications/phriction/controller/PhrictionHistoryController.php b/src/applications/phriction/controller/PhrictionHistoryController.php index c8ae6e93e0..859e73ee93 100644 --- a/src/applications/phriction/controller/PhrictionHistoryController.php +++ b/src/applications/phriction/controller/PhrictionHistoryController.php @@ -41,7 +41,7 @@ final class PhrictionHistoryController $author_phids = mpull($history, 'getAuthorPHID'); $handles = $this->loadViewerHandles($author_phids); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); foreach ($history as $content) { @@ -88,7 +88,7 @@ final class PhrictionHistoryController break; } - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader(pht('%s by %s', $change_type, $author)) ->setBarColor($color) ->addAttribute( diff --git a/src/applications/phriction/controller/PhrictionListController.php b/src/applications/phriction/controller/PhrictionListController.php index a7369c5b55..1900250455 100644 --- a/src/applications/phriction/controller/PhrictionListController.php +++ b/src/applications/phriction/controller/PhrictionListController.php @@ -42,7 +42,7 @@ final class PhrictionListController $this->loadHandles($phids); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setUser($viewer); foreach ($documents as $document) { $content = $document->getContent(); @@ -58,7 +58,7 @@ final class PhrictionListController $content->getDateCreated(), $viewer); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($content->getTitle()) ->setHref($slug_uri) ->addByline($byline) diff --git a/src/applications/ponder/controller/PonderQuestionListController.php b/src/applications/ponder/controller/PonderQuestionListController.php index d36990a4bd..66a7a6a5ca 100644 --- a/src/applications/ponder/controller/PonderQuestionListController.php +++ b/src/applications/ponder/controller/PonderQuestionListController.php @@ -36,11 +36,11 @@ final class PonderQuestionListController extends PonderController $handles = $this->loadViewerHandles($phids); - $view = id(new PhabricatorObjectItemListView()) + $view = id(new PHUIObjectItemListView()) ->setUser($viewer); foreach ($questions as $question) { - $item = new PhabricatorObjectItemView(); + $item = new PHUIObjectItemView(); $item->setObjectName('Q'.$question->getID()); $item->setHeader($question->getTitle()); $item->setHref('/Q'.$question->getID()); diff --git a/src/applications/project/controller/PhabricatorProjectListController.php b/src/applications/project/controller/PhabricatorProjectListController.php index 1589fb629b..81fdab8823 100644 --- a/src/applications/project/controller/PhabricatorProjectListController.php +++ b/src/applications/project/controller/PhabricatorProjectListController.php @@ -30,12 +30,12 @@ final class PhabricatorProjectListController assert_instances_of($projects, 'PhabricatorProject'); $viewer = $this->getRequest()->getUser(); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setUser($viewer); foreach ($projects as $project) { $id = $project->getID(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($project->getName()) ->setHref($this->getApplicationURI("view/{$id}/")); diff --git a/src/applications/releeph/controller/project/ReleephProjectListController.php b/src/applications/releeph/controller/project/ReleephProjectListController.php index a8caf83401..8f60723ca7 100644 --- a/src/applications/releeph/controller/project/ReleephProjectListController.php +++ b/src/applications/releeph/controller/project/ReleephProjectListController.php @@ -29,13 +29,13 @@ final class ReleephProjectListController extends ReleephController assert_instances_of($projects, 'ReleephProject'); $viewer = $this->getRequest()->getUser(); - $list = id(new PhabricatorObjectItemListView()) + $list = id(new PHUIObjectItemListView()) ->setUser($viewer); foreach ($projects as $project) { $id = $project->getID(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($project->getName()) ->setHref($this->getApplicationURI("project/{$id}/")); diff --git a/src/applications/releeph/controller/project/ReleephProjectViewController.php b/src/applications/releeph/controller/project/ReleephProjectViewController.php index 1b46f8a62a..5c1e5bf5a9 100644 --- a/src/applications/releeph/controller/project/ReleephProjectViewController.php +++ b/src/applications/releeph/controller/project/ReleephProjectViewController.php @@ -56,7 +56,7 @@ final class ReleephProjectViewController extends ReleephProjectController $requests = mgroup($requests, 'getBranchID'); } - $list = id(new PhabricatorObjectItemListView()) + $list = id(new PHUIObjectItemListView()) ->setUser($viewer); foreach ($branches as $branch) { $diffusion_href = null; @@ -85,7 +85,7 @@ final class ReleephProjectViewController extends ReleephProjectController $branch_link); } - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($branch->getDisplayName()) ->setHref($branch->getURI()) ->addAttribute($branch_link); diff --git a/src/applications/search/controller/PhabricatorApplicationSearchController.php b/src/applications/search/controller/PhabricatorApplicationSearchController.php index 49360b30a7..f715d74cae 100644 --- a/src/applications/search/controller/PhabricatorApplicationSearchController.php +++ b/src/applications/search/controller/PhabricatorApplicationSearchController.php @@ -203,7 +203,7 @@ final class PhabricatorApplicationSearchController $nav->appendChild($list); // TODO: This is a bit hacky. - if ($list instanceof PhabricatorObjectItemListView) { + if ($list instanceof PHUIObjectItemListView) { $list->setNoDataString(pht("No results found for this query.")); $list->setPager($pager); } else { @@ -248,7 +248,7 @@ final class PhabricatorApplicationSearchController $list_id = celerity_generate_unique_node_id(); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setUser($user); $list->setID($list_id); @@ -263,7 +263,7 @@ final class PhabricatorApplicationSearchController $class = get_class($engine); $key = $named_query->getQueryKey(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setHeader($named_query->getQueryName()) ->setHref($engine->getQueryResultsPageURI($key)); diff --git a/src/applications/settings/panel/PhabricatorSettingsPanelExternalAccounts.php b/src/applications/settings/panel/PhabricatorSettingsPanelExternalAccounts.php index 86278c275e..4f7513c335 100644 --- a/src/applications/settings/panel/PhabricatorSettingsPanelExternalAccounts.php +++ b/src/applications/settings/panel/PhabricatorSettingsPanelExternalAccounts.php @@ -33,7 +33,7 @@ final class PhabricatorSettingsPanelExternalAccounts $linked_head = id(new PhabricatorHeaderView()) ->setHeader(pht('Linked Accounts and Authentication')); - $linked = id(new PhabricatorObjectItemListView()) + $linked = id(new PHUIObjectItemListView()) ->setUser($viewer) ->setNoDataString(pht('You have no linked accounts.')); @@ -45,7 +45,7 @@ final class PhabricatorSettingsPanelExternalAccounts } foreach ($accounts as $account) { - $item = id(new PhabricatorObjectItemView()); + $item = id(new PHUIObjectItemView()); $provider = idx($providers, $account->getProviderKey()); if ($provider) { @@ -95,7 +95,7 @@ final class PhabricatorSettingsPanelExternalAccounts $linkable_head = id(new PhabricatorHeaderView()) ->setHeader(pht('Add External Account')); - $linkable = id(new PhabricatorObjectItemListView()) + $linkable = id(new PHUIObjectItemListView()) ->setUser($viewer) ->setNoDataString( pht('Your account is linked with all available providers.')); @@ -115,7 +115,7 @@ final class PhabricatorSettingsPanelExternalAccounts $link_uri = '/auth/link/'.$provider->getProviderKey().'/'; - $item = id(new PhabricatorObjectItemView()); + $item = id(new PHUIObjectItemView()); $item->setHeader($provider->getProviderName()); $item->setHref($link_uri); $item->addAction( diff --git a/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php b/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php index eba553bfd1..d77e7b2679 100644 --- a/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php +++ b/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php @@ -33,7 +33,7 @@ final class PhabricatorSlowvoteListController assert_instances_of($polls, 'PhabricatorSlowvotePoll'); $viewer = $this->getRequest()->getUser(); - $list = id(new PhabricatorObjectItemListView()) + $list = id(new PHUIObjectItemListView()) ->setUser($viewer); $phids = mpull($polls, 'getAuthorPHID'); @@ -47,7 +47,7 @@ final class PhabricatorSlowvoteListController $author = null; } - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObjectName('V'.$poll->getID()) ->setHeader($poll->getQuestion()) ->setHref('/V'.$poll->getID()) diff --git a/src/applications/tokens/controller/PhabricatorTokenGivenController.php b/src/applications/tokens/controller/PhabricatorTokenGivenController.php index 9c68a835ed..16a5643036 100644 --- a/src/applications/tokens/controller/PhabricatorTokenGivenController.php +++ b/src/applications/tokens/controller/PhabricatorTokenGivenController.php @@ -33,12 +33,12 @@ final class PhabricatorTokenGivenController extends PhabricatorTokenController { $tokens = mpull($tokens, null, 'getPHID'); } - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); foreach ($tokens_given as $token_given) { $handle = $handles[$token_given->getObjectPHID()]; $token = idx($tokens, $token_given->getTokenPHID()); - $item = id(new PhabricatorObjectItemView()); + $item = id(new PHUIObjectItemView()); $item->setHeader($handle->getFullName()); $item->setHref($handle->getURI()); diff --git a/src/applications/tokens/controller/PhabricatorTokenLeaderController.php b/src/applications/tokens/controller/PhabricatorTokenLeaderController.php index 9c33244294..1e6485a369 100644 --- a/src/applications/tokens/controller/PhabricatorTokenLeaderController.php +++ b/src/applications/tokens/controller/PhabricatorTokenLeaderController.php @@ -24,10 +24,10 @@ final class PhabricatorTokenLeaderController ->loadHandles(); } - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); foreach ($phids as $object) { $count = idx($counts, $object, 0); - $item = id(new PhabricatorObjectItemView()); + $item = id(new PHUIObjectItemView()); $handle = $handles[$object]; $item->setHeader($handle->getFullName()); diff --git a/src/applications/uiexample/examples/PhabricatorObjectItemListExample.php b/src/applications/uiexample/examples/PHUIObjectItemListExample.php similarity index 75% rename from src/applications/uiexample/examples/PhabricatorObjectItemListExample.php rename to src/applications/uiexample/examples/PHUIObjectItemListExample.php index 1b4d18a7a8..472d8dc8c3 100644 --- a/src/applications/uiexample/examples/PhabricatorObjectItemListExample.php +++ b/src/applications/uiexample/examples/PHUIObjectItemListExample.php @@ -1,6 +1,6 @@ PhabricatorObjectItemListView to render lists of objects.'); + 'Use PHUIObjectItemListView to render lists of objects.'); } public function renderExample() { @@ -24,22 +24,22 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample { $head = id(new PhabricatorHeaderView()) ->setHeader(pht('Basic List')); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setObjectName('FRUIT1') ->setHeader(pht('Apple')) ->setHref('#')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setObjectName('FRUIT2') ->setHeader(pht('Banana')) ->setHref('#')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setObjectName('FRUIT3') ->setHeader(pht('Cherry')) ->setHref('#')); @@ -49,7 +49,7 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample { $head = id(new PhabricatorHeaderView()) ->setHeader(pht('Empty List')); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setNoDataString(pht('This list is empty.')); @@ -58,65 +58,93 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample { $head = id(new PhabricatorHeaderView()) ->setHeader(pht('Stacked List')); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setStackable(true); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Monday')) ->setHref('#')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Tuesday')) ->setHref('#')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Wednesday')) ->setHref('#')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Thursday')) ->setHref('#')); $out[] = array($head, $list); + $head = id(new PhabricatorHeaderView()) + ->setHeader(pht('Plain List')); + $list = new PHUIObjectItemListView(); + $list->setPlain(true); + + $list->addItem( + id(new PHUIObjectItemView()) + ->setHeader(pht('Monday')) + ->setSubHead('I love cats') + ->setHref('#')); + $list->addItem( + id(new PHUIObjectItemView()) + ->setHeader(pht('Tuesday')) + ->setSubHead('Cat, cats, cats') + ->setHref('#')); + $list->addItem( + id(new PHUIObjectItemView()) + ->setHeader(pht('Wednesday')) + ->setSubHead('Meow, meow, meow') + ->setHref('#')); + $list->addItem( + id(new PHUIObjectItemView()) + ->setHeader(pht('Thursday')) + ->setSubHead('Every single day') + ->setHref('#')); + + $out[] = array($head, $list); + $head = id(new PhabricatorHeaderView()) ->setHeader(pht('Card List')); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setCards(true); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Business Card')) ->setBarColor('red')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Playing Card')) ->setBarColor('orange') ->addIcon('comment', pht('Royal Flush!'))); $owner = phutil_tag('a', array('href' => '#'), pht('jackofclubs')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('House of Cards')) ->setBarColor('yellow') ->addByline(pht('Owner: %s', $owner))); $author = phutil_tag('a', array('href' => '#'), pht('agoat')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Cardigan')) ->setBarColor('green') ->addIcon('highlight', pht('Warm!')) ->addByline(pht('Author: %s', $author))); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Cardamom')) ->addFootIcon('highlight-white', 'Spice') ->setBarColor('blue')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht( 'The human cardiovascular system includes the heart, lungs, and '. 'some other parts; most of these parts are pretty squishy')) @@ -130,25 +158,25 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample { $head = id(new PhabricatorHeaderView()) ->setHeader(pht('Grippable List')); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setCards(true); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Grab ahold!')) ->setHref('#') ->setGrippable(true) ->setBarColor('red')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Hold on tight!')) ->setHref('#') ->setGrippable(true) ->setBarColor('yellow')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht("Don't let go!")) ->setHref('#') ->setGrippable(true) @@ -162,10 +190,10 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample { $head = id(new PhabricatorHeaderView()) ->setHeader(pht('List With Actions')); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('You Have The Power')) ->setHref('#') ->setBarColor('blue') @@ -176,7 +204,7 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample { ->setIcon('edit'))); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Believe In Yourself')) ->setHref('#') ->setBarColor('violet') @@ -197,10 +225,10 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample { $head = id(new PhabricatorHeaderView()) ->setHeader(pht('Extras')); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Ace of Hearts')) ->setSubHead( pht('This is the most powerful card in the game "Hearts".')) @@ -215,20 +243,20 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample { ->addHandleIcon($handle, pht('You make all the rules.'))); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Just A Handle')) ->setHref('#') ->addHandleIcon($handle, pht('Handle Here'))); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Poor Use of Space')) ->setHref('#') ->addAttribute('North West') ->addHandleIcon($handle, pht('South East'))); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Crowded Eastern Edge')) ->setHref('#') ->addIcon('computer', pht('Stuff')) @@ -242,30 +270,30 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample { $head = id(new PhabricatorHeaderView()) ->setHeader(pht('Effects')); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setObjectName('X1') ->setHeader(pht('Normal')) ->setHref('#')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setObjectName('X2') ->setHeader(pht('Highlighted')) ->setEffect('highlighted') ->setHref('#')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setObjectName('X3') ->setHeader(pht('Selected')) ->setEffect('selected') ->setHref('#')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setObjectName('X4') ->setHeader(pht('Disabled')) ->setDisabled(true) @@ -277,7 +305,7 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample { $head = id(new PhabricatorHeaderView()) ->setHeader(pht('Colors')); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $bar_colors = array( null => pht('None'), @@ -295,7 +323,7 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample { foreach ($bar_colors as $bar_color => $bar_label) { $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader($bar_label) ->setBarColor($bar_color)); } diff --git a/src/applications/uiexample/examples/PHUIWorkboardExample.php b/src/applications/uiexample/examples/PHUIWorkboardExample.php index 493552141c..c412fc67f3 100644 --- a/src/applications/uiexample/examples/PHUIWorkboardExample.php +++ b/src/applications/uiexample/examples/PHUIWorkboardExample.php @@ -14,88 +14,88 @@ final class PHUIWorkboardExample extends PhabricatorUIExample { /* List 1 */ - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); $list->setCards(true); $list->setFlush(true); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Business Card')) ->setBarColor('red')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Playing Card')) ->setBarColor('orange')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('House of Cards')) ->setBarColor('yellow')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Cardigan')) ->setBarColor('green')); $list->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Cardamom')) ->addFootIcon('highlight-white', 'Spice') ->setBarColor('blue')); /* List 2 */ - $list2 = new PhabricatorObjectItemListView(); + $list2 = new PHUIObjectItemListView(); $list2->setCards(true); $list2->setFlush(true); $list2->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Business Card')) ->setBarColor('red')); $list2->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Playing Card')) ->setBarColor('orange')); /* List 3 */ - $list3 = new PhabricatorObjectItemListView(); + $list3 = new PHUIObjectItemListView(); $list3->setCards(true); $list3->setFlush(true); $list3->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Business Card')) ->setBarColor('red')); $list3->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Playing Card')) ->setBarColor('orange')); $list3->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('House of Cards')) ->setBarColor('yellow')); $list3->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Cardigan')) ->setBarColor('green')); $list3->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Cardamom')) ->addFootIcon('highlight-white', 'Spice') ->setBarColor('blue')); $list3->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Business Card')) ->setBarColor('red')); $list3->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Playing Card')) ->setBarColor('orange')); $list3->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Business Card')) ->setBarColor('red')); $list3->addItem( - id(new PhabricatorObjectItemView()) + id(new PHUIObjectItemView()) ->setHeader(pht('Playing Card')) ->setBarColor('orange')); diff --git a/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php b/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php index 03a158cd3a..86f7221b8c 100644 --- a/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php +++ b/src/applications/xhprof/controller/PhabricatorXHProfSampleListController.php @@ -48,11 +48,11 @@ final class PhabricatorXHProfSampleListController $samples = $pager->sliceResults($samples); $pager->setURI($request->getRequestURI(), 'page'); - $list = new PhabricatorObjectItemListView(); + $list = new PHUIObjectItemListView(); foreach ($samples as $sample) { $file_phid = $sample->getFilePHID(); - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->setObjectName($sample->getID()) ->setHeader($sample->getRequestPath()) ->setHref($this->getApplicationURI('profile/'.$file_phid.'/')) diff --git a/src/infrastructure/customfield/config/PhabricatorCustomFieldConfigOptionType.php b/src/infrastructure/customfield/config/PhabricatorCustomFieldConfigOptionType.php index f7a190f545..d1a0f5f458 100644 --- a/src/infrastructure/customfield/config/PhabricatorCustomFieldConfigOptionType.php +++ b/src/infrastructure/customfield/config/PhabricatorCustomFieldConfigOptionType.php @@ -50,11 +50,11 @@ final class PhabricatorCustomFieldConfigOptionType $list_id = celerity_generate_unique_node_id(); $input_id = celerity_generate_unique_node_id(); - $list = id(new PhabricatorObjectItemListView()) + $list = id(new PHUIObjectItemListView()) ->setFlush(true) ->setID($list_id); foreach ($fields as $key => $field) { - $item = id(new PhabricatorObjectItemView()) + $item = id(new PHUIObjectItemView()) ->addSigil('field-spec') ->setMetadata(array('fieldKey' => $key)) ->setGrippable(true) diff --git a/src/infrastructure/customfield/field/PhabricatorCustomField.php b/src/infrastructure/customfield/field/PhabricatorCustomField.php index f882619c88..3538bc7053 100644 --- a/src/infrastructure/customfield/field/PhabricatorCustomField.php +++ b/src/infrastructure/customfield/field/PhabricatorCustomField.php @@ -858,7 +858,7 @@ abstract class PhabricatorCustomField { /** * @task list */ - public function renderOnListItem(PhabricatorObjectItemView $view) { + public function renderOnListItem(PHUIObjectItemView $view) { if ($this->proxy) { return $this->proxy->renderOnListItem($view); } diff --git a/src/view/layout/PhabricatorObjectItemListView.php b/src/view/phui/PHUIObjectItemListView.php similarity index 70% rename from src/view/layout/PhabricatorObjectItemListView.php rename to src/view/phui/PHUIObjectItemListView.php index 300c6909a7..1a084d72f2 100644 --- a/src/view/layout/PhabricatorObjectItemListView.php +++ b/src/view/phui/PHUIObjectItemListView.php @@ -1,6 +1,6 @@ flush = $flush; return $this; } + public function setPlain($plain) { + $this->plain = $plain; + return $this; + } + public function setHeader($header) { $this->header = $header; return $this; @@ -30,7 +36,7 @@ final class PhabricatorObjectItemListView extends AphrontTagView { return $this; } - public function addItem(PhabricatorObjectItemView $item) { + public function addItem(PHUIObjectItemView $item) { $this->items[] = $item; return $this; } @@ -52,15 +58,21 @@ final class PhabricatorObjectItemListView extends AphrontTagView { protected function getTagAttributes() { $classes = array(); - $classes[] = 'phabricator-object-item-list-view'; + $classes[] = 'phui-object-item-list-view'; if ($this->stackable) { - $classes[] = 'phabricator-object-list-stackable'; + $classes[] = 'phui-object-list-stackable'; } if ($this->cards) { - $classes[] = 'phabricator-object-list-cards'; + $classes[] = 'phui-object-list-cards'; } if ($this->flush) { - $classes[] = 'phabricator-object-list-flush'; + $classes[] = 'phui-object-list-flush'; + } + // If plain, drop all styles + if ($this->plain) { + $classes = array(); + $classes[] = 'phui-object-item-list-view'; + $classes[] = 'phui-object-list-plain'; } return array( @@ -69,14 +81,14 @@ final class PhabricatorObjectItemListView extends AphrontTagView { } protected function getTagContent() { - require_celerity_resource('phabricator-object-item-list-view-css'); + require_celerity_resource('phui-object-item-list-view-css'); $header = null; if (strlen($this->header)) { $header = phutil_tag( 'h1', array( - 'class' => 'phabricator-object-item-list-header', + 'class' => 'phui-object-item-list-header', ), $this->header); } diff --git a/src/view/layout/PhabricatorObjectItemView.php b/src/view/phui/PHUIObjectItemView.php similarity index 82% rename from src/view/layout/PhabricatorObjectItemView.php rename to src/view/phui/PHUIObjectItemView.php index 84f302724f..25c23ef581 100644 --- a/src/view/layout/PhabricatorObjectItemView.php +++ b/src/view/phui/PHUIObjectItemView.php @@ -1,6 +1,6 @@ icons) { - $item_classes[] = 'phabricator-object-item-with-icons'; + $item_classes[] = 'phui-object-item-with-icons'; } if ($this->attributes) { - $item_classes[] = 'phabricator-object-item-with-attrs'; + $item_classes[] = 'phui-object-item-with-attrs'; } if ($this->handleIcons) { - $item_classes[] = 'phabricator-object-item-with-handle-icons'; + $item_classes[] = 'phui-object-item-with-handle-icons'; } if ($this->barColor) { - $item_classes[] = 'phabricator-object-item-bar-color-'.$this->barColor; + $item_classes[] = 'phui-object-item-bar-color-'.$this->barColor; } if ($this->footIcons) { - $item_classes[] = 'phabricator-object-item-with-foot-icons'; + $item_classes[] = 'phui-object-item-with-foot-icons'; } if ($this->bylines) { - $item_classes[] = 'phabricator-object-item-with-bylines'; + $item_classes[] = 'phui-object-item-with-bylines'; } if ($this->actions) { $n = count($this->actions); - $item_classes[] = 'phabricator-object-item-with-actions'; - $item_classes[] = 'phabricator-object-item-with-'.$n.'-actions'; + $item_classes[] = 'phui-object-item-with-actions'; + $item_classes[] = 'phui-object-item-with-'.$n.'-actions'; } if ($this->disabled) { - $item_classes[] = 'phabricator-object-item-disabled'; + $item_classes[] = 'phui-object-item-disabled'; } switch ($this->effect) { case 'highlighted': - $item_classes[] = 'phabricator-object-item-highlighted'; + $item_classes[] = 'phui-object-item-highlighted'; break; case 'selected': - $item_classes[] = 'phabricator-object-item-selected'; + $item_classes[] = 'phui-object-item-selected'; break; case null: break; @@ -238,7 +238,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { } if ($this->getGrippable()) { - $item_classes[] = 'phabricator-object-item-grippable'; + $item_classes[] = 'phui-object-item-grippable'; } return array( @@ -248,7 +248,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { public function getTagContent() { $content_classes = array(); - $content_classes[] = 'phabricator-object-item-content'; + $content_classes[] = 'phui-object-item-content'; $header_name = null; if ($this->objectName) { @@ -256,7 +256,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { phutil_tag( 'span', array( - 'class' => 'phabricator-object-item-objname', + 'class' => 'phui-object-item-objname', ), $this->objectName), ' ', @@ -267,14 +267,14 @@ final class PhabricatorObjectItemView extends AphrontTagView { $this->href ? 'a' : 'div', array( 'href' => $this->href, - 'class' => 'phabricator-object-item-link', + 'class' => 'phui-object-item-link', ), $this->header); $header = javelin_tag( 'div', array( - 'class' => 'phabricator-object-item-name', + 'class' => 'phui-object-item-name', 'sigil' => 'slippery', ), array( @@ -304,7 +304,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $icon = javelin_tag( 'span', array( - 'class' => 'phabricator-object-item-icon-image '. + 'class' => 'phui-object-item-icon-image '. 'sprite-'.$sheet.' '.$sheet.'-'.$icon, 'sigil' => $sigil, 'meta' => $meta, @@ -314,7 +314,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $label = phutil_tag( 'span', array( - 'class' => 'phabricator-object-item-icon-label', + 'class' => 'phui-object-item-icon-label', ), $spec['label']); @@ -328,9 +328,9 @@ final class PhabricatorObjectItemView extends AphrontTagView { } $classes = array(); - $classes[] = 'phabricator-object-item-icon'; + $classes[] = 'phui-object-item-icon'; if ($spec['icon'] == 'none') { - $classes[] = 'phabricator-object-item-icon-none'; + $classes[] = 'phui-object-item-icon-none'; } if (isset($spec['attributes']['class'])) { $classes[] = $spec['attributes']['class']; @@ -347,7 +347,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $icons[] = phutil_tag( 'ul', array( - 'class' => 'phabricator-object-item-icons', + 'class' => 'phui-object-item-icons', ), $icon_list); } @@ -360,7 +360,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $icons[] = phutil_tag( 'div', array( - 'class' => 'phabricator-object-item-handle-icons', + 'class' => 'phui-object-item-handle-icons', ), $handle_bar); } @@ -371,14 +371,14 @@ final class PhabricatorObjectItemView extends AphrontTagView { $bylines[] = phutil_tag( 'div', array( - 'class' => 'phabricator-object-item-byline', + 'class' => 'phui-object-item-byline', ), $byline); } $bylines = phutil_tag( 'div', array( - 'class' => 'phabricator-object-item-bylines', + 'class' => 'phui-object-item-bylines', ), $bylines); } @@ -388,7 +388,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $subhead = phutil_tag( 'div', array( - 'class' => 'phabricator-object-item-subhead', + 'class' => 'phui-object-item-subhead', ), $this->subhead); } @@ -397,7 +397,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $icons = phutil_tag( 'div', array( - 'class' => 'phabricator-object-icon-pane', + 'class' => 'phui-object-icon-pane', ), $icons); } @@ -408,7 +408,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $spacer = phutil_tag( 'span', array( - 'class' => 'phabricator-object-item-attribute-spacer', + 'class' => 'phui-object-item-attribute-spacer', ), "\xC2\xB7"); $first = true; @@ -416,7 +416,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $attrs[] = phutil_tag( 'li', array( - 'class' => 'phabricator-object-item-attribute', + 'class' => 'phui-object-item-attribute', ), array( ($first ? null : $spacer), @@ -428,7 +428,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $attrs = phutil_tag( 'ul', array( - 'class' => 'phabricator-object-item-attributes', + 'class' => 'phui-object-item-attributes', ), $attrs); } @@ -442,7 +442,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $foot = phutil_tag( 'div', array( - 'class' => 'phabricator-object-item-foot-icons', + 'class' => 'phui-object-item-foot-icons', ), $foot_bar); } @@ -452,7 +452,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $grippable = phutil_tag( 'div', array( - 'class' => 'phabricator-object-item-grip', + 'class' => 'phui-object-item-grip', ), ''); } @@ -472,7 +472,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $box = phutil_tag( 'div', array( - 'class' => 'phabricator-object-item-content-box', + 'class' => 'phui-object-item-content-box', ), array( $grippable, @@ -493,7 +493,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { $actions = phutil_tag( 'ul', array( - 'class' => 'phabricator-object-item-actions', + 'class' => 'phui-object-item-actions', ), $actions); } @@ -501,7 +501,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { return phutil_tag( 'div', array( - 'class' => 'phabricator-object-item-frame', + 'class' => 'phui-object-item-frame', ), array( $actions, @@ -528,7 +528,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { return phutil_tag( 'span', array( - 'class' => 'phabricator-object-item-foot-icon', + 'class' => 'phui-object-item-foot-icon', ), array($icon, $label)); } @@ -538,7 +538,7 @@ final class PhabricatorObjectItemView extends AphrontTagView { Javelin::initBehavior('phabricator-tooltips'); $options = array( - 'class' => 'phabricator-object-item-handle-icon', + 'class' => 'phui-object-item-handle-icon', 'style' => 'background-image: url('.$handle->getImageURI().')', ); diff --git a/src/view/phui/PHUIWorkpanelView.php b/src/view/phui/PHUIWorkpanelView.php index 1588036cf3..351bb37c35 100644 --- a/src/view/phui/PHUIWorkpanelView.php +++ b/src/view/phui/PHUIWorkpanelView.php @@ -7,7 +7,7 @@ final class PHUIWorkpanelView extends AphrontView { private $headerAction; private $footerAction; - public function setCards(PhabricatorObjectItemListView $cards) { + public function setCards(PHUIObjectItemListView $cards) { $this->cards[] = $cards; return $this; } diff --git a/webroot/rsrc/css/application/flag/flag.css b/webroot/rsrc/css/application/flag/flag.css index 1863be060d..8f6f7a45e8 100644 --- a/webroot/rsrc/css/application/flag/flag.css +++ b/webroot/rsrc/css/application/flag/flag.css @@ -7,7 +7,7 @@ background: transparent 0 0 no-repeat; } -.phabricator-object-item .phabricator-flag-icon { +.phui-object-item .phabricator-flag-icon { float: left; margin: 2px; margin-right: 8px; diff --git a/webroot/rsrc/css/layout/phabricator-object-item-list-view.css b/webroot/rsrc/css/phui/phui-object-item-list-view.css similarity index 60% rename from webroot/rsrc/css/layout/phabricator-object-item-list-view.css rename to webroot/rsrc/css/phui/phui-object-item-list-view.css index 45c46773a7..0003768e4b 100644 --- a/webroot/rsrc/css/layout/phabricator-object-item-list-view.css +++ b/webroot/rsrc/css/phui/phui-object-item-list-view.css @@ -1,28 +1,28 @@ /** - * @provides phabricator-object-item-list-view-css + * @provides phui-object-item-list-view-css */ -.phabricator-object-item-list-view { +.phui-object-item-list-view { padding: 8px 6px; } -.device-desktop .phabricator-object-item-list-view { +.device-desktop .phui-object-item-list-view { padding: 20px; } -.phabricator-object-item-list-view + .phabricator-object-item-list-view { +.phui-object-item-list-view + .phui-object-item-list-view { padding-top: 0; } -.phabricator-object-item-list-view.phabricator-object-list-flush { +.phui-object-item-list-view.phui-object-list-flush { padding: 0; } -.phabricator-object-item-list-view .aphront-error-view { +.phui-object-item-list-view .aphront-error-view { margin: 0; } -.phabricator-object-item { +.phui-object-item { background: #ffffff; border-style: solid; border-color: {$lightgreyborder}; @@ -31,11 +31,11 @@ overflow: hidden; } -.phabricator-object-item .phui-icon-view { +.phui-object-item .phui-icon-view { display: inline-block; } -.phabricator-object-item-frame { +.phui-object-item-frame { border-style: solid; border-color: {$lightgreyborder}; border-bottom-color: {$greyborder}; @@ -45,54 +45,54 @@ min-height: 29px; } -.phabricator-object-list-cards .phabricator-object-item-frame { +.phui-object-list-cards .phui-object-item-frame { border-bottom-right-radius: 3px; border-top-right-radius: 3px; } -.device-desktop .phabricator-object-item { +.device-desktop .phui-object-item { margin: 0 0 5px 0; } -.phabricator-object-item-name { +.phui-object-item-name { display: inline-block; font-weight: bold; padding: 6px 8px 0; white-space: nowrap; } -.phabricator-object-item-link { +.phui-object-item-link { display: inline-block; } -.phabricator-object-item-objname { +.phui-object-item-objname { color: {$darkgreytext}; cursor: text; } -.phabricator-object-item-content { +.phui-object-item-content { margin-top: 4px; overflow: hidden; } -.phabricator-object-item-grippable { +.phui-object-item-grippable { cursor: move; } -.phabricator-object-item-grip { +.phui-object-item-grip { position: absolute; top: 0; bottom: 0; left: 0; width: 17px; - background: url(/rsrc/image/texture/grip.png) center center no-repeat; + background: url('/rsrc/image/texture/grip.png') center center no-repeat; } -.phabricator-object-item-grippable .phabricator-object-item-frame { +.phui-object-item-grippable .phui-object-item-frame { padding-left: 11px; } -.phabricator-object-item-list-header { +.phui-object-item-list-header { padding: 0 0 8px 0; color: {$darkgreytext}; } @@ -103,7 +103,7 @@ */ -.phabricator-object-item-actions { +.phui-object-item-actions { position: absolute; right: 0; top: 0; @@ -113,7 +113,7 @@ border-left: 1px solid {$lightgreyborder}; } -.phabricator-object-item-actions .phui-list-item-view { +.phui-object-item-actions .phui-list-item-view { float: right; height: 100%; width: 24px; @@ -121,23 +121,23 @@ position: relative; } -.phabricator-object-item-actions .phui-list-item-view + +.phui-object-item-actions .phui-list-item-view + .phui-list-item-view { border-right: 1px solid #d6d6e9; } -.phabricator-object-item-actions .phui-list-item-href { +.phui-object-item-actions .phui-list-item-href { display: inline-block; position: relative; width: 24px; height: 100%; } -.phabricator-object-item-actions .phui-list-item-href:hover { +.phui-object-item-actions .phui-list-item-href:hover { background: #e9e9f9; } -.phabricator-object-item-actions .phui-list-item-icon { +.phui-object-item-actions .phui-list-item-icon { width: 14px; height: 14px; position: absolute; @@ -147,19 +147,19 @@ left: 5px; } -.phabricator-object-item-actions .phui-list-item-name { +.phui-object-item-actions .phui-list-item-name { display: none; } -.phabricator-object-item-with-1-actions .phabricator-object-item-content-box { +.phui-object-item-with-1-actions .phui-object-item-content-box { margin-right: 24px; } -.phabricator-object-item-with-2-actions .phabricator-object-item-content-box { +.phui-object-item-with-2-actions .phui-object-item-content-box { margin-right: 48px; } -.phabricator-object-item-with-3-actions .phabricator-object-item-content-box { +.phui-object-item-with-3-actions .phui-object-item-content-box { margin-right: 72px; } @@ -170,17 +170,17 @@ */ -.phabricator-object-item-list-view.phabricator-object-list-stackable - .phabricator-object-item { +.phui-object-item-list-view.phui-object-list-stackable + .phui-object-item { margin: -1px 0 0 0; } -.phabricator-object-list-stackable .phabricator-object-item { +.phui-object-list-stackable .phui-object-item { border-left-width: 1px; } -.device-desktop .phabricator-object-list-stackable - .phabricator-object-item:hover { +.device-desktop .phui-object-list-stackable + .phui-object-item:hover { background: #e9ecf5; } @@ -190,7 +190,7 @@ */ -.phabricator-object-item-subhead { +.phui-object-item-subhead { color: {$greytext}; padding: 0 8px 6px; } @@ -202,16 +202,16 @@ */ -.phabricator-object-item-attributes { +.phui-object-item-attributes { padding: 0 8px 6px; } -.phabricator-object-item-attribute { +.phui-object-item-attribute { display: inline; color: {$greytext}; } -.phabricator-object-item-attribute-spacer { +.phui-object-item-attribute-spacer { padding: 0 4px; } @@ -223,20 +223,20 @@ */ -.phabricator-object-icon-pane { +.phui-object-icon-pane { float: right; margin-top: 6px; } -.device .phabricator-object-item-no-icon-images .phabricator-object-icon-pane { +.device .phui-object-item-no-icon-images .phui-object-icon-pane { display: none; } -.phabricator-object-item-with-handle-icons .phabricator-object-item-icons { +.phui-object-item-with-handle-icons .phui-object-item-icons { padding-bottom: 30px; } -.phabricator-object-item-icons { +.phui-object-item-icons { float: right; padding: 0 10px; } @@ -246,32 +246,32 @@ the width + padding of the icon div, so the icons have some space even if the content is wider than available space. */ -.device-desktop .phabricator-object-icon-pane { +.device-desktop .phui-object-icon-pane { width: 120px; } -.device-desktop .phabricator-object-item-with-icons - .phabricator-object-item-content, -.device-desktop .phabricator-object-item-with-handle-icons - .phabricator-object-item-content { +.device-desktop .phui-object-item-with-icons + .phui-object-item-content, +.device-desktop .phui-object-item-with-handle-icons + .phui-object-item-content { margin-right: 132px; } -.device .phabricator-object-item-icons { +.device .phui-object-item-icons { width: 18px; } -.device .phabricator-object-item-with-icons .phabricator-object-item-content, -.device .phabricator-object-item-with-handle-icons - .phabricator-object-item-content { +.device .phui-object-item-with-icons .phui-object-item-content, +.device .phui-object-item-with-handle-icons + .phui-object-item-content { margin-right: 30px; } -.device .phabricator-object-item-icon-label { +.device .phui-object-item-icon-label { display: none; } -.phabricator-object-item-icon { +.phui-object-item-icon { vertical-align: middle; position: relative; font-size: 11px; @@ -288,19 +288,19 @@ * Items with icon 'none' still have on mobile, thus creating a weird vertical * margin for elements which follow */ -.device-phone .phabricator-object-item-icon-none { +.device-phone .phui-object-item-icon-none { display: none; } -.device-desktop .phabricator-object-item-icon { +.device-desktop .phui-object-item-icon { padding-right: 18px; } -.device-desktop .phabricator-object-item-icon-none { +.device-desktop .phui-object-item-icon-none { padding-right: 0; } -.phabricator-object-item-icon-image { +.phui-object-item-icon-image { position: absolute; right: 0; top: 2px; @@ -316,43 +316,43 @@ */ -.phabricator-object-item-bar-color-red { +.phui-object-item-bar-color-red { border-left-color: {$red}; } -.phabricator-object-item-bar-color-orange { +.phui-object-item-bar-color-orange { border-left-color: {$orange}; } -.phabricator-object-item-bar-color-yellow { +.phui-object-item-bar-color-yellow { border-left-color: {$yellow}; } -.phabricator-object-item-bar-color-green { +.phui-object-item-bar-color-green { border-left-color: {$green}; } -.phabricator-object-item-bar-color-sky { +.phui-object-item-bar-color-sky { border-left-color: {$sky}; } -.phabricator-object-item-bar-color-blue { +.phui-object-item-bar-color-blue { border-left-color: {$blue}; } -.phabricator-object-item-bar-color-indigo { +.phui-object-item-bar-color-indigo { border-left-color: {$indigo}; } -.phabricator-object-item-bar-color-violet { +.phui-object-item-bar-color-violet { border-left-color: {$violet}; } -.phabricator-object-item-bar-color-grey { +.phui-object-item-bar-color-grey { border-left-color: #bdc3c7; } -.phabricator-object-item-bar-color-black { +.phui-object-item-bar-color-black { border-left-color: #333333; } @@ -362,15 +362,15 @@ */ -.phabricator-object-item-disabled { +.phui-object-item-disabled { border-left-color: #d7d7d7; } -.phabricator-object-item-disabled .phabricator-object-item-frame { +.phui-object-item-disabled .phui-object-item-frame { border-color: #d7d7d7; } -.phabricator-object-item-disabled .phabricator-object-item-objname { +.phui-object-item-disabled .phui-object-item-objname { color: {$greytext}; } @@ -381,21 +381,21 @@ */ -.phabricator-object-item-highlighted { +.phui-object-item-highlighted { background: {$lightyellow}; } -.phabricator-object-list-cards - .phabricator-object-item.phabricator-object-item-highlighted { +.phui-object-list-cards + .phui-object-item.phui-object-item-highlighted { background-image: linear-gradient(to bottom, rgb(253, 255, 221), rgb(243, 245, 206)); background-image: -webkit-linear-gradient(top, rgb(253, 255, 221), rgb(243, 245, 206)); } -.phabricator-object-item-selected { +.phui-object-item-selected { background: {$lightblue}; } -.phabricator-object-list-flush .aphront-error-view { +.phui-object-list-flush .aphront-error-view { margin: 0; background: #fff; } @@ -407,17 +407,17 @@ */ -.phabricator-object-item-foot-icons { +.phui-object-item-foot-icons { margin-left: 10px; bottom: 0; position: absolute; } -.phabricator-object-item-with-foot-icons .phabricator-object-item-content { +.phui-object-item-with-foot-icons .phui-object-item-content { padding-bottom: 22px; } -.phabricator-object-item-foot-icon { +.phui-object-item-foot-icon { display: inline-block; background: #909090; color: #ffffff; @@ -429,7 +429,7 @@ position: relative; } -.phabricator-object-item-foot-icon .sprite-icons { +.phui-object-item-foot-icon .sprite-icons { width: 14px; height: 14px; position: absolute; @@ -444,7 +444,7 @@ */ -.phabricator-object-item-handle-icons { +.phui-object-item-handle-icons { height: 28px; margin-right: 10px; bottom: 0; @@ -453,7 +453,7 @@ position: absolute; } -.phabricator-object-item-handle-icon { +.phui-object-item-handle-icon { margin: 1px; width: 28px; height: 28px; @@ -469,7 +469,7 @@ */ -.phabricator-object-item-bylines { +.phui-object-item-bylines { float: right; clear: right; padding: 0 10px; @@ -488,23 +488,23 @@ */ /* Hard to sprite since we can't have other sprites appearing in tall cells */ -.phabricator-object-list-cards .phabricator-object-item { +.phui-object-list-cards .phui-object-item { border-radius: 3px; border-left-width: 6px; background: #f0f0f0 url('/rsrc/image/texture/card-gradient.png') repeat-x; margin-bottom: 4px; } -.phabricator-object-list-cards .phabricator-object-item-frame { +.phui-object-list-cards .phui-object-item-frame { min-height: 50px; } -.phabricator-object-list-cards .phabricator-object-item-selected { +.phui-object-list-cards .phui-object-item-selected { background: #bfdcff; } -.phabricator-object-list-cards .phabricator-object-item-selected - .phabricator-object-item-frame { +.phui-object-list-cards .phui-object-item-selected + .phui-object-item-frame { border-color: #99ccff; } @@ -530,3 +530,19 @@ .drag-sending { opacity: 0.75; } + +/* - Plain --------------------------------------------------------------------- + + Remove all border styles, just a list of objects + +*/ + +.phui-object-list-plain .phui-object-item { + background: transparent; +} + +.phui-object-list-plain .phui-object-item, +.phui-object-list-plain .phui-object-item-frame { + border: none; +} + diff --git a/webroot/rsrc/js/application/maniphest/behavior-batch-selector.js b/webroot/rsrc/js/application/maniphest/behavior-batch-selector.js index c66a49e66e..6fb3d90aee 100644 --- a/webroot/rsrc/js/application/maniphest/behavior-batch-selector.js +++ b/webroot/rsrc/js/application/maniphest/behavior-batch-selector.js @@ -35,7 +35,7 @@ JX.behavior('maniphest-batch-selector', function(config) { JX.DOM.alterClass( task, - 'phabricator-object-item-selected', + 'phui-object-item-selected', is_selected(task)); update();