mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-17 18:21:11 +01:00
Use slim tags in ObjectList
Summary: Toss the hard-codes and use slim tags. Test Plan: Scoped out task list. Reviewers: chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D9748
This commit is contained in:
parent
950d81dac0
commit
455ac8ec4d
5 changed files with 22 additions and 22 deletions
|
@ -7,7 +7,7 @@
|
|||
return array(
|
||||
'names' =>
|
||||
array(
|
||||
'core.pkg.css' => 'c494bff8',
|
||||
'core.pkg.css' => '4b1115ac',
|
||||
'core.pkg.js' => '834b4eda',
|
||||
'darkconsole.pkg.js' => 'df001cab',
|
||||
'differential.pkg.css' => '4a93db37',
|
||||
|
@ -141,7 +141,7 @@ return array(
|
|||
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
|
||||
'rsrc/css/phui/phui-spacing.css' => '042804d6',
|
||||
'rsrc/css/phui/phui-status.css' => '2f562399',
|
||||
'rsrc/css/phui/phui-tag-view.css' => '30dd4e6f',
|
||||
'rsrc/css/phui/phui-tag-view.css' => '4d7fedbf',
|
||||
'rsrc/css/phui/phui-text.css' => '23e9b4b7',
|
||||
'rsrc/css/phui/phui-timeline-view.css' => 'bbd990d0',
|
||||
'rsrc/css/phui/phui-workboard-view.css' => '2bf82d00',
|
||||
|
@ -787,7 +787,7 @@ return array(
|
|||
'phui-remarkup-preview-css' => '19ad512b',
|
||||
'phui-spacing-css' => '042804d6',
|
||||
'phui-status-list-view-css' => '2f562399',
|
||||
'phui-tag-view-css' => '30dd4e6f',
|
||||
'phui-tag-view-css' => '4d7fedbf',
|
||||
'phui-text-css' => '23e9b4b7',
|
||||
'phui-timeline-view-css' => 'bbd990d0',
|
||||
'phui-workboard-view-css' => '2bf82d00',
|
||||
|
|
|
@ -84,6 +84,7 @@ final class ManiphestTaskListView extends ManiphestView {
|
|||
id(new PHUIHandleTagListView())
|
||||
->setLimit(4)
|
||||
->setNoDataString(pht('No Projects'))
|
||||
->setSlim(true)
|
||||
->setHandles($project_handles));
|
||||
|
||||
$item->setMetadata(
|
||||
|
|
|
@ -6,6 +6,7 @@ final class PHUIHandleTagListView extends AphrontTagView {
|
|||
private $annotations = array();
|
||||
private $limit;
|
||||
private $noDataString;
|
||||
private $slim;
|
||||
|
||||
public function setHandles(array $handles) {
|
||||
$this->handles = $handles;
|
||||
|
@ -27,6 +28,11 @@ final class PHUIHandleTagListView extends AphrontTagView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setSlim($slim) {
|
||||
$this->slim = true;
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function getTagName() {
|
||||
return 'ul';
|
||||
}
|
||||
|
@ -55,9 +61,13 @@ final class PHUIHandleTagListView extends AphrontTagView {
|
|||
|
||||
$list = array();
|
||||
foreach ($handles as $handle) {
|
||||
$tag = $handle->renderTag();
|
||||
if ($this->slim) {
|
||||
$tag->setSlimShady(true);
|
||||
}
|
||||
$list[] = $this->newItem(
|
||||
array(
|
||||
$handle->renderTag(),
|
||||
$tag,
|
||||
idx($this->annotations, $handle->getPHID(), null),
|
||||
));
|
||||
}
|
||||
|
@ -94,7 +104,8 @@ final class PHUIHandleTagListView extends AphrontTagView {
|
|||
private function newPlaceholderTag() {
|
||||
return id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_OBJECT)
|
||||
->setShade(PHUITagView::COLOR_DISABLED);
|
||||
->setShade(PHUITagView::COLOR_DISABLED)
|
||||
->setSlimShady($this->slim);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -287,6 +287,7 @@ final class PhabricatorRepositorySearchEngine
|
|||
if ($project_handles) {
|
||||
$item->addAttribute(
|
||||
id(new PHUIHandleTagListView())
|
||||
->setSlim(true)
|
||||
->setHandles($project_handles));
|
||||
}
|
||||
|
||||
|
|
|
@ -164,9 +164,12 @@ a.phui-tag-view:hover
|
|||
left: 6px;
|
||||
}
|
||||
|
||||
.phui-tag-shade-slim .phui-tag-core {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.phui-tag-shade-slim.phui-tag-icon-view .phui-tag-core {
|
||||
padding-left: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.phui-tag-shade-red .phui-tag-core {
|
||||
|
@ -316,22 +319,6 @@ a.phui-tag-view:hover.phui-tag-shade-disabled .phui-tag-core {
|
|||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.phui-object-item .phui-tag-view .phui-tag-core {
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.phui-object-item .phui-tag-icon-view .phui-tag-core {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.phui-object-item .phui-tag-view .phui-icon-view {
|
||||
font-size: 11px;
|
||||
top: 3px;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
.phui-object-item .phabricator-handle-tag-list {
|
||||
display: inline-block;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue