1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-09 16:32:39 +01:00

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
This commit is contained in:
Chad Little 2013-09-09 14:14:34 -07:00
parent d1225e782b
commit 5ba20b8924
63 changed files with 426 additions and 370 deletions

View file

@ -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',

View file

@ -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',
),
));

View file

@ -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',

View file

@ -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)

View file

@ -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)

View file

@ -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();

View file

@ -331,7 +331,7 @@ abstract class PhabricatorAuthProvider {
public function willRenderLinkedAccount(
PhabricatorUser $viewer,
PhabricatorObjectItemView $item,
PHUIObjectItemView $item,
PhabricatorExternalAccount $account) {
$account_view = id(new PhabricatorAuthAccountView())

View file

@ -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.

View file

@ -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'));

View file

@ -241,7 +241,7 @@ final class PhabricatorAuthProviderPassword
public function willRenderLinkedAccount(
PhabricatorUser $viewer,
PhabricatorObjectItemView $item,
PHUIObjectItemView $item,
PhabricatorExternalAccount $account) {
return;
}

View file

@ -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)

View file

@ -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())

View file

@ -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());

View file

@ -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);

View file

@ -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());

View file

@ -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());

View file

@ -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}/"))

View file

@ -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}/")

View file

@ -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 {

View file

@ -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;
}
}
}

View file

@ -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])

View file

@ -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',

View file

@ -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']);

View file

@ -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);

View file

@ -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)

View file

@ -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());

View file

@ -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}/"));

View file

@ -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)

View file

@ -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()))

View file

@ -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());

View file

@ -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());

View file

@ -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());

View file

@ -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())

View file

@ -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);

View file

@ -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',

View file

@ -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().'/'));

View file

@ -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);

View file

@ -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(

View file

@ -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()) {

View file

@ -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)

View file

@ -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,

View file

@ -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(

View file

@ -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)

View file

@ -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());

View file

@ -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}/"));

View file

@ -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}/"));

View file

@ -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);

View file

@ -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));

View file

@ -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(

View file

@ -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())

View file

@ -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());

View file

@ -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());

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorObjectItemListExample extends PhabricatorUIExample {
final class PHUIObjectItemListExample extends PhabricatorUIExample {
public function getName() {
return 'Object Item List';
@ -8,7 +8,7 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample {
public function getDescription() {
return hsprintf(
'Use <tt>PhabricatorObjectItemListView</tt> to render lists of objects.');
'Use <tt>PHUIObjectItemListView</tt> 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));
}

View file

@ -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'));

View file

@ -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.'/'))

View file

@ -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)

View file

@ -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);
}

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorObjectItemListView extends AphrontTagView {
final class PHUIObjectItemListView extends AphrontTagView {
private $header;
private $items;
@ -9,12 +9,18 @@ final class PhabricatorObjectItemListView extends AphrontTagView {
private $cards;
private $noDataString;
private $flush;
private $plain;
public function setFlush($flush) {
$this->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);
}

View file

@ -1,6 +1,6 @@
<?php
final class PhabricatorObjectItemView extends AphrontTagView {
final class PHUIObjectItemView extends AphrontTagView {
private $objectName;
private $header;
@ -188,48 +188,48 @@ final class PhabricatorObjectItemView extends AphrontTagView {
protected function getTagAttributes() {
$item_classes = array();
$item_classes[] = 'phabricator-object-item';
$item_classes[] = 'phui-object-item';
if ($this->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().')',
);

View file

@ -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;
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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();