mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
Move setLaunchButton to setSideColumn for ObjectItem
Summary: Makes this a bit more flexible and allow UI to take over `col-2` completely. Also cleaned up application search a little with tags Test Plan: Review various pages, grep for callsites. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18021
This commit is contained in:
parent
6b3d04683d
commit
9bbea869b3
6 changed files with 41 additions and 25 deletions
|
@ -9,7 +9,7 @@ return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'conpherence.pkg.css' => 'ff161f2d',
|
'conpherence.pkg.css' => 'ff161f2d',
|
||||||
'conpherence.pkg.js' => 'b5b51108',
|
'conpherence.pkg.js' => 'b5b51108',
|
||||||
'core.pkg.css' => '2c6a5ba4',
|
'core.pkg.css' => 'b666574e',
|
||||||
'core.pkg.js' => '21d34805',
|
'core.pkg.js' => '21d34805',
|
||||||
'darkconsole.pkg.js' => '1f9a31bc',
|
'darkconsole.pkg.js' => '1f9a31bc',
|
||||||
'differential.pkg.css' => '7d4cfa59',
|
'differential.pkg.css' => '7d4cfa59',
|
||||||
|
@ -132,7 +132,7 @@ return array(
|
||||||
'rsrc/css/phui/object-item/phui-oi-color.css' => 'cd2b9b77',
|
'rsrc/css/phui/object-item/phui-oi-color.css' => 'cd2b9b77',
|
||||||
'rsrc/css/phui/object-item/phui-oi-drag-ui.css' => '08f4ccc3',
|
'rsrc/css/phui/object-item/phui-oi-drag-ui.css' => '08f4ccc3',
|
||||||
'rsrc/css/phui/object-item/phui-oi-flush-ui.css' => '9d9685d6',
|
'rsrc/css/phui/object-item/phui-oi-flush-ui.css' => '9d9685d6',
|
||||||
'rsrc/css/phui/object-item/phui-oi-list-view.css' => '78fdc98e',
|
'rsrc/css/phui/object-item/phui-oi-list-view.css' => 'ed19241b',
|
||||||
'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => 'a8beebea',
|
'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => 'a8beebea',
|
||||||
'rsrc/css/phui/phui-action-list.css' => 'c01858f4',
|
'rsrc/css/phui/phui-action-list.css' => 'c01858f4',
|
||||||
'rsrc/css/phui/phui-action-panel.css' => '91c7b835',
|
'rsrc/css/phui/phui-action-panel.css' => '91c7b835',
|
||||||
|
@ -875,7 +875,7 @@ return array(
|
||||||
'phui-oi-color-css' => 'cd2b9b77',
|
'phui-oi-color-css' => 'cd2b9b77',
|
||||||
'phui-oi-drag-ui-css' => '08f4ccc3',
|
'phui-oi-drag-ui-css' => '08f4ccc3',
|
||||||
'phui-oi-flush-ui-css' => '9d9685d6',
|
'phui-oi-flush-ui-css' => '9d9685d6',
|
||||||
'phui-oi-list-view-css' => '78fdc98e',
|
'phui-oi-list-view-css' => 'ed19241b',
|
||||||
'phui-oi-simple-ui-css' => 'a8beebea',
|
'phui-oi-simple-ui-css' => 'a8beebea',
|
||||||
'phui-pager-css' => '77d8a794',
|
'phui-pager-css' => '77d8a794',
|
||||||
'phui-pinboard-view-css' => '2495140e',
|
'phui-pinboard-view-css' => '2495140e',
|
||||||
|
|
|
@ -30,8 +30,8 @@ final class PhabricatorGuideListView extends AphrontView {
|
||||||
->setText(pht('Skip'))
|
->setText(pht('Skip'))
|
||||||
->setTag('a')
|
->setTag('a')
|
||||||
->setHref($skip_href)
|
->setHref($skip_href)
|
||||||
->setColor(PHUIButtonView::GREY);
|
->setColor(PHUIButtonView::SIMPLE);
|
||||||
$list_item->setLaunchButton($skip);
|
$list_item->setSideColumn($skip);
|
||||||
}
|
}
|
||||||
$list->addItem($list_item);
|
$list->addItem($list_item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,20 +218,39 @@ final class PhabricatorAppSearchEngine
|
||||||
|
|
||||||
$configure = id(new PHUIButtonView())
|
$configure = id(new PHUIButtonView())
|
||||||
->setTag('a')
|
->setTag('a')
|
||||||
|
->setIcon('fa-gears')
|
||||||
->setHref('/applications/view/'.get_class($application).'/')
|
->setHref('/applications/view/'.get_class($application).'/')
|
||||||
->setText(pht('Configure'))
|
->setText(pht('Configure'))
|
||||||
->setColor(PHUIButtonView::GREY);
|
->setColor(PHUIButtonView::GREY);
|
||||||
|
|
||||||
$name = $application->getName();
|
$name = $application->getName();
|
||||||
if ($application->isPrototype()) {
|
|
||||||
$name = $name.' '.pht('(Prototype)');
|
|
||||||
}
|
|
||||||
|
|
||||||
$item = id(new PHUIObjectItemView())
|
$item = id(new PHUIObjectItemView())
|
||||||
->setHeader($name)
|
->setHeader($name)
|
||||||
->setImageIcon($icon)
|
->setImageIcon($icon)
|
||||||
->setSubhead($description)
|
->setSideColumn($configure);
|
||||||
->setLaunchButton($configure);
|
|
||||||
|
if (!$application->isFirstParty()) {
|
||||||
|
$tag = id(new PHUITagView())
|
||||||
|
->setName(pht('Extension'))
|
||||||
|
->setIcon('fa-puzzle-piece')
|
||||||
|
->setColor(PHUITagView::COLOR_BLUE)
|
||||||
|
->setType(PHUITagView::TYPE_SHADE)
|
||||||
|
->setSlimShady(true);
|
||||||
|
$item->addAttribute($tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($application->isPrototype()) {
|
||||||
|
$prototype_tag = id(new PHUITagView())
|
||||||
|
->setName(pht('Prototype'))
|
||||||
|
->setIcon('fa-exclamation-circle')
|
||||||
|
->setColor(PHUITagView::COLOR_ORANGE)
|
||||||
|
->setType(PHUITagView::TYPE_SHADE)
|
||||||
|
->setSlimShady(true);
|
||||||
|
$item->addAttribute($prototype_tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
$item->addAttribute($description);
|
||||||
|
|
||||||
if ($application->getBaseURI() && $application->isInstalled()) {
|
if ($application->getBaseURI() && $application->isInstalled()) {
|
||||||
$item->setHref($application->getBaseURI());
|
$item->setHref($application->getBaseURI());
|
||||||
|
@ -242,10 +261,6 @@ final class PhabricatorAppSearchEngine
|
||||||
$item->setDisabled(true);
|
$item->setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$application->isFirstParty()) {
|
|
||||||
$item->addAttribute(pht('Extension'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,8 +97,9 @@ final class PhameBlogSearchEngine
|
||||||
$button = id(new PHUIButtonView())
|
$button = id(new PHUIButtonView())
|
||||||
->setTag('a')
|
->setTag('a')
|
||||||
->setText('New Post')
|
->setText('New Post')
|
||||||
->setHref($this->getApplicationURI('/post/edit/?blog='.$id));
|
->setHref($this->getApplicationURI('/post/edit/?blog='.$id))
|
||||||
$item->setLaunchButton($button);
|
->setColor(PHUIButtonView::SIMPLE);
|
||||||
|
$item->setSideColumn($button);
|
||||||
}
|
}
|
||||||
|
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
|
|
|
@ -25,7 +25,7 @@ final class PHUIObjectItemView extends AphrontTagView {
|
||||||
private $badge;
|
private $badge;
|
||||||
private $countdownNum;
|
private $countdownNum;
|
||||||
private $countdownNoun;
|
private $countdownNoun;
|
||||||
private $launchButton;
|
private $sideColumn;
|
||||||
private $coverImage;
|
private $coverImage;
|
||||||
private $description;
|
private $description;
|
||||||
|
|
||||||
|
@ -229,9 +229,8 @@ final class PHUIObjectItemView extends AphrontTagView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setLaunchButton(PHUIButtonView $button) {
|
public function setSideColumn($column) {
|
||||||
$button->setSize(PHUIButtonView::SMALL);
|
$this->sideColumn = $column;
|
||||||
$this->launchButton = $button;
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,14 +651,15 @@ final class PHUIObjectItemView extends AphrontTagView {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->launchButton) {
|
/* Fixed width, right column container. */
|
||||||
|
if ($this->sideColumn) {
|
||||||
$column2 = phutil_tag(
|
$column2 = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'phui-oi-col2 phui-oi-launch-button',
|
'class' => 'phui-oi-col2 phui-oi-side-column',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
$this->launchButton,
|
$this->sideColumn,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -650,13 +650,13 @@ ul.phui-oi-list-view .phui-oi-selected
|
||||||
|
|
||||||
/* - Launcher Button -------------------------------------------------------- */
|
/* - Launcher Button -------------------------------------------------------- */
|
||||||
|
|
||||||
.phui-oi-col2.phui-oi-launch-button {
|
.phui-oi-col2.phui-oi-side-column {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding-right: 4px;
|
padding-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-phone .phui-oi-col2.phui-oi-launch-button {
|
.device-phone .phui-oi-col2.phui-oi-side-column {
|
||||||
padding: 0 8px 8px;
|
padding: 0 8px 8px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue