1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Adds 'setSubHead' to Objectlist

Summary: There are a few places a third text row in ObjectItemListView is needed or make things easier to read. Built and rolled out in Config.

Test Plan: Tested in Config Groups.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5837
This commit is contained in:
Chad Little 2013-05-06 14:01:57 -07:00
parent c5692bb9bf
commit 54b2953dec
4 changed files with 70 additions and 39 deletions

View file

@ -3195,7 +3195,7 @@ celerity_register_resource_map(array(
), ),
'phabricator-object-item-list-view-css' => 'phabricator-object-item-list-view-css' =>
array( array(
'uri' => '/res/c49799c6/rsrc/css/layout/phabricator-object-item-list-view.css', 'uri' => '/res/439ecf73/rsrc/css/layout/phabricator-object-item-list-view.css',
'type' => 'css', 'type' => 'css',
'requires' => 'requires' =>
array( array(
@ -4002,7 +4002,7 @@ celerity_register_resource_map(array(
), array( ), array(
'packages' => 'packages' =>
array( array(
55644450 => '25d66007' =>
array( array(
'name' => 'core.pkg.css', 'name' => 'core.pkg.css',
'symbols' => 'symbols' =>
@ -4044,7 +4044,7 @@ celerity_register_resource_map(array(
34 => 'phabricator-object-item-list-view-css', 34 => 'phabricator-object-item-list-view-css',
35 => 'global-drag-and-drop-css', 35 => 'global-drag-and-drop-css',
), ),
'uri' => '/res/pkg/55644450/core.pkg.css', 'uri' => '/res/pkg/25d66007/core.pkg.css',
'type' => 'css', 'type' => 'css',
), ),
'26980a1c' => '26980a1c' =>
@ -4235,16 +4235,16 @@ celerity_register_resource_map(array(
'reverse' => 'reverse' =>
array( array(
'aphront-attached-file-view-css' => '6b1fccc6', 'aphront-attached-file-view-css' => '6b1fccc6',
'aphront-dialog-view-css' => '55644450', 'aphront-dialog-view-css' => '25d66007',
'aphront-error-view-css' => '55644450', 'aphront-error-view-css' => '25d66007',
'aphront-form-view-css' => '55644450', 'aphront-form-view-css' => '25d66007',
'aphront-list-filter-view-css' => '55644450', 'aphront-list-filter-view-css' => '25d66007',
'aphront-pager-view-css' => '55644450', 'aphront-pager-view-css' => '25d66007',
'aphront-panel-view-css' => '55644450', 'aphront-panel-view-css' => '25d66007',
'aphront-table-view-css' => '55644450', 'aphront-table-view-css' => '25d66007',
'aphront-tokenizer-control-css' => '55644450', 'aphront-tokenizer-control-css' => '25d66007',
'aphront-tooltip-css' => '55644450', 'aphront-tooltip-css' => '25d66007',
'aphront-typeahead-control-css' => '55644450', 'aphront-typeahead-control-css' => '25d66007',
'differential-changeset-view-css' => '8aaacd1b', 'differential-changeset-view-css' => '8aaacd1b',
'differential-core-view-css' => '8aaacd1b', 'differential-core-view-css' => '8aaacd1b',
'differential-inline-comment-editor' => '27c55b30', 'differential-inline-comment-editor' => '27c55b30',
@ -4258,7 +4258,7 @@ celerity_register_resource_map(array(
'differential-table-of-contents-css' => '8aaacd1b', 'differential-table-of-contents-css' => '8aaacd1b',
'diffusion-commit-view-css' => 'c8ce2d88', 'diffusion-commit-view-css' => 'c8ce2d88',
'diffusion-icons-css' => 'c8ce2d88', 'diffusion-icons-css' => 'c8ce2d88',
'global-drag-and-drop-css' => '55644450', 'global-drag-and-drop-css' => '25d66007',
'inline-comment-summary-css' => '8aaacd1b', 'inline-comment-summary-css' => '8aaacd1b',
'javelin-aphlict' => '26980a1c', 'javelin-aphlict' => '26980a1c',
'javelin-behavior' => '7d174323', 'javelin-behavior' => '7d174323',
@ -4330,48 +4330,48 @@ celerity_register_resource_map(array(
'javelin-util' => '7d174323', 'javelin-util' => '7d174323',
'javelin-vector' => '7d174323', 'javelin-vector' => '7d174323',
'javelin-workflow' => '7d174323', 'javelin-workflow' => '7d174323',
'lightbox-attachment-css' => '55644450', 'lightbox-attachment-css' => '25d66007',
'maniphest-task-summary-css' => '6b1fccc6', 'maniphest-task-summary-css' => '6b1fccc6',
'maniphest-transaction-detail-css' => '6b1fccc6', 'maniphest-transaction-detail-css' => '6b1fccc6',
'phabricator-busy' => '26980a1c', 'phabricator-busy' => '26980a1c',
'phabricator-content-source-view-css' => '8aaacd1b', 'phabricator-content-source-view-css' => '8aaacd1b',
'phabricator-core-buttons-css' => '55644450', 'phabricator-core-buttons-css' => '25d66007',
'phabricator-core-css' => '55644450', 'phabricator-core-css' => '25d66007',
'phabricator-crumbs-view-css' => '55644450', 'phabricator-crumbs-view-css' => '25d66007',
'phabricator-directory-css' => '55644450', 'phabricator-directory-css' => '25d66007',
'phabricator-drag-and-drop-file-upload' => '27c55b30', 'phabricator-drag-and-drop-file-upload' => '27c55b30',
'phabricator-dropdown-menu' => '26980a1c', 'phabricator-dropdown-menu' => '26980a1c',
'phabricator-file-upload' => '26980a1c', 'phabricator-file-upload' => '26980a1c',
'phabricator-filetree-view-css' => '55644450', 'phabricator-filetree-view-css' => '25d66007',
'phabricator-flag-css' => '55644450', 'phabricator-flag-css' => '25d66007',
'phabricator-form-view-css' => '55644450', 'phabricator-form-view-css' => '25d66007',
'phabricator-header-view-css' => '55644450', 'phabricator-header-view-css' => '25d66007',
'phabricator-jump-nav' => '55644450', 'phabricator-jump-nav' => '25d66007',
'phabricator-keyboard-shortcut' => '26980a1c', 'phabricator-keyboard-shortcut' => '26980a1c',
'phabricator-keyboard-shortcut-manager' => '26980a1c', 'phabricator-keyboard-shortcut-manager' => '26980a1c',
'phabricator-main-menu-view' => '55644450', 'phabricator-main-menu-view' => '25d66007',
'phabricator-menu-item' => '26980a1c', 'phabricator-menu-item' => '26980a1c',
'phabricator-nav-view-css' => '55644450', 'phabricator-nav-view-css' => '25d66007',
'phabricator-notification' => '26980a1c', 'phabricator-notification' => '26980a1c',
'phabricator-notification-css' => '55644450', 'phabricator-notification-css' => '25d66007',
'phabricator-notification-menu-css' => '55644450', 'phabricator-notification-menu-css' => '25d66007',
'phabricator-object-item-list-view-css' => '55644450', 'phabricator-object-item-list-view-css' => '25d66007',
'phabricator-object-selector-css' => '8aaacd1b', 'phabricator-object-selector-css' => '8aaacd1b',
'phabricator-phtize' => '26980a1c', 'phabricator-phtize' => '26980a1c',
'phabricator-prefab' => '26980a1c', 'phabricator-prefab' => '26980a1c',
'phabricator-project-tag-css' => '6b1fccc6', 'phabricator-project-tag-css' => '6b1fccc6',
'phabricator-remarkup-css' => '55644450', 'phabricator-remarkup-css' => '25d66007',
'phabricator-shaped-request' => '27c55b30', 'phabricator-shaped-request' => '27c55b30',
'phabricator-side-menu-view-css' => '55644450', 'phabricator-side-menu-view-css' => '25d66007',
'phabricator-standard-page-view' => '55644450', 'phabricator-standard-page-view' => '25d66007',
'phabricator-textareautils' => '26980a1c', 'phabricator-textareautils' => '26980a1c',
'phabricator-tooltip' => '26980a1c', 'phabricator-tooltip' => '26980a1c',
'phabricator-transaction-view-css' => '55644450', 'phabricator-transaction-view-css' => '25d66007',
'phabricator-zindex-css' => '55644450', 'phabricator-zindex-css' => '25d66007',
'sprite-apps-large-css' => '55644450', 'sprite-apps-large-css' => '25d66007',
'sprite-gradient-css' => '55644450', 'sprite-gradient-css' => '25d66007',
'sprite-icon-css' => '55644450', 'sprite-icon-css' => '25d66007',
'sprite-menu-css' => '55644450', 'sprite-menu-css' => '25d66007',
'syntax-highlighting-css' => '55644450', 'syntax-highlighting-css' => '25d66007',
), ),
)); ));

View file

@ -165,6 +165,8 @@ final class PhabricatorObjectItemListExample extends PhabricatorUIExample {
$list->addItem( $list->addItem(
id(new PhabricatorObjectItemView()) id(new PhabricatorObjectItemView())
->setHeader(pht('Ace of Hearts')) ->setHeader(pht('Ace of Hearts'))
->setSubHead(
pht('This is the most powerful card in the game "Hearts".'))
->setHref('#') ->setHref('#')
->addAttribute(pht('Suit: Hearts')) ->addAttribute(pht('Suit: Hearts'))
->addAttribute(pht('Rank: Ace')) ->addAttribute(pht('Rank: Ace'))

View file

@ -4,6 +4,7 @@ final class PhabricatorObjectItemView extends AphrontTagView {
private $objectName; private $objectName;
private $header; private $header;
private $subhead;
private $href; private $href;
private $attributes = array(); private $attributes = array();
private $icons = array(); private $icons = array();
@ -61,6 +62,11 @@ final class PhabricatorObjectItemView extends AphrontTagView {
return $this; return $this;
} }
public function setSubHead($subhead) {
$this->subhead = $subhead;
return $this;
}
public function getHeader() { public function getHeader() {
return $this->header; return $this->header;
} }
@ -284,6 +290,16 @@ final class PhabricatorObjectItemView extends AphrontTagView {
$bylines); $bylines);
} }
$subhead = null;
if ($this->subhead) {
$subhead = phutil_tag(
'div',
array(
'class' => 'phabricator-object-item-subhead',
),
$this->subhead);
}
if ($icons) { if ($icons) {
$icons = phutil_tag( $icons = phutil_tag(
'div', 'div',
@ -315,6 +331,7 @@ final class PhabricatorObjectItemView extends AphrontTagView {
)); ));
$first = false; $first = false;
} }
$attrs = phutil_tag( $attrs = phutil_tag(
'ul', 'ul',
array( array(
@ -353,6 +370,7 @@ final class PhabricatorObjectItemView extends AphrontTagView {
'class' => implode(' ', $content_classes), 'class' => implode(' ', $content_classes),
), ),
array( array(
$subhead,
$attrs, $attrs,
$this->renderChildren(), $this->renderChildren(),
$foot, $foot,

View file

@ -102,6 +102,17 @@
background: #e9ecf5; background: #e9ecf5;
} }
/* - Subhead -------------------------------------------------------------------
Descriptive Text or Links under the main header, before attributes.
*/
.phabricator-object-item-subhead {
color: #777;
padding: 0 8px 6px;
}
/* - Attribute List ------------------------------------------------------------ /* - Attribute List ------------------------------------------------------------