mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 10:42:41 +01:00
Add FontIcons to PHUIObjectItemView
Summary: Added generic FontIcons for PHUIObjectItemView, used in Almanac Console. Simplified States. Test Plan: Almanac Console, UIExamples Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11527
This commit is contained in:
parent
af16226804
commit
155b83bb6e
4 changed files with 32 additions and 40 deletions
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
return array(
|
return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'core.pkg.css' => 'e6383567',
|
'core.pkg.css' => '3d6955ad',
|
||||||
'core.pkg.js' => 'df35fdde',
|
'core.pkg.js' => 'df35fdde',
|
||||||
'darkconsole.pkg.js' => '8ab24e01',
|
'darkconsole.pkg.js' => '8ab24e01',
|
||||||
'differential.pkg.css' => '8af45893',
|
'differential.pkg.css' => '8af45893',
|
||||||
|
@ -136,7 +136,7 @@ return array(
|
||||||
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
|
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
|
||||||
'rsrc/css/phui/phui-list.css' => '53deb25c',
|
'rsrc/css/phui/phui-list.css' => '53deb25c',
|
||||||
'rsrc/css/phui/phui-object-box.css' => '0d47b3c8',
|
'rsrc/css/phui/phui-object-box.css' => '0d47b3c8',
|
||||||
'rsrc/css/phui/phui-object-item-list-view.css' => 'd2f441c9',
|
'rsrc/css/phui/phui-object-item-list-view.css' => '10297907',
|
||||||
'rsrc/css/phui/phui-pinboard-view.css' => '3dd4a269',
|
'rsrc/css/phui/phui-pinboard-view.css' => '3dd4a269',
|
||||||
'rsrc/css/phui/phui-property-list-view.css' => '51480060',
|
'rsrc/css/phui/phui-property-list-view.css' => '51480060',
|
||||||
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
|
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
|
||||||
|
@ -779,7 +779,7 @@ return array(
|
||||||
'phui-info-panel-css' => '27ea50a1',
|
'phui-info-panel-css' => '27ea50a1',
|
||||||
'phui-list-view-css' => '53deb25c',
|
'phui-list-view-css' => '53deb25c',
|
||||||
'phui-object-box-css' => '0d47b3c8',
|
'phui-object-box-css' => '0d47b3c8',
|
||||||
'phui-object-item-list-view-css' => 'd2f441c9',
|
'phui-object-item-list-view-css' => '10297907',
|
||||||
'phui-pinboard-view-css' => '3dd4a269',
|
'phui-pinboard-view-css' => '3dd4a269',
|
||||||
'phui-property-list-view-css' => '51480060',
|
'phui-property-list-view-css' => '51480060',
|
||||||
'phui-remarkup-preview-css' => '19ad512b',
|
'phui-remarkup-preview-css' => '19ad512b',
|
||||||
|
|
|
@ -10,12 +10,14 @@ final class AlmanacConsoleController extends AlmanacController {
|
||||||
$viewer = $request->getViewer();
|
$viewer = $request->getViewer();
|
||||||
|
|
||||||
$menu = id(new PHUIObjectItemListView())
|
$menu = id(new PHUIObjectItemListView())
|
||||||
->setUser($viewer);
|
->setUser($viewer)
|
||||||
|
->setStackable(true);
|
||||||
|
|
||||||
$menu->addItem(
|
$menu->addItem(
|
||||||
id(new PHUIObjectItemView())
|
id(new PHUIObjectItemView())
|
||||||
->setHeader(pht('Services'))
|
->setHeader(pht('Services'))
|
||||||
->setHref($this->getApplicationURI('service/'))
|
->setHref($this->getApplicationURI('service/'))
|
||||||
|
->setFontIcon('fa-plug')
|
||||||
->addAttribute(
|
->addAttribute(
|
||||||
pht(
|
pht(
|
||||||
'Manage Almanac services.')));
|
'Manage Almanac services.')));
|
||||||
|
@ -24,6 +26,7 @@ final class AlmanacConsoleController extends AlmanacController {
|
||||||
id(new PHUIObjectItemView())
|
id(new PHUIObjectItemView())
|
||||||
->setHeader(pht('Devices'))
|
->setHeader(pht('Devices'))
|
||||||
->setHref($this->getApplicationURI('device/'))
|
->setHref($this->getApplicationURI('device/'))
|
||||||
|
->setFontIcon('fa-server')
|
||||||
->addAttribute(
|
->addAttribute(
|
||||||
pht(
|
pht(
|
||||||
'Manage Almanac devices.')));
|
'Manage Almanac devices.')));
|
||||||
|
@ -32,6 +35,7 @@ final class AlmanacConsoleController extends AlmanacController {
|
||||||
id(new PHUIObjectItemView())
|
id(new PHUIObjectItemView())
|
||||||
->setHeader(pht('Networks'))
|
->setHeader(pht('Networks'))
|
||||||
->setHref($this->getApplicationURI('network/'))
|
->setHref($this->getApplicationURI('network/'))
|
||||||
|
->setFontIcon('fa-globe')
|
||||||
->addAttribute(
|
->addAttribute(
|
||||||
pht(
|
pht(
|
||||||
'Manage Almanac networks.')));
|
'Manage Almanac networks.')));
|
||||||
|
@ -39,10 +43,14 @@ final class AlmanacConsoleController extends AlmanacController {
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb(pht('Console'));
|
$crumbs->addTextCrumb(pht('Console'));
|
||||||
|
|
||||||
|
$box = id(new PHUIObjectBoxView())
|
||||||
|
->setHeaderText('Console')
|
||||||
|
->appendChild($menu);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
$crumbs,
|
$crumbs,
|
||||||
$menu,
|
$box,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => pht('Almanac Console'),
|
'title' => pht('Almanac Console'),
|
||||||
|
|
|
@ -144,8 +144,13 @@ final class PHUIObjectItemView extends AphrontTagView {
|
||||||
$fi = 'fa-refresh ph-spin sky';
|
$fi = 'fa-refresh ph-spin sky';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
$this->setFontIcon($fi);
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFontIcon($icon) {
|
||||||
$this->fontIcon = id(new PHUIIconView())
|
$this->fontIcon = id(new PHUIIconView())
|
||||||
->setIconFont($fi.' fa-2x');
|
->setIconFont($icon);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -537,15 +542,6 @@ final class PHUIObjectItemView extends AphrontTagView {
|
||||||
$this->getImageIcon());
|
$this->getImageIcon());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($image && $this->href) {
|
|
||||||
$image = phutil_tag(
|
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'href' => $this->href,
|
|
||||||
),
|
|
||||||
$image);
|
|
||||||
}
|
|
||||||
|
|
||||||
$ficon = null;
|
$ficon = null;
|
||||||
if ($this->fontIcon) {
|
if ($this->fontIcon) {
|
||||||
$image = phutil_tag(
|
$image = phutil_tag(
|
||||||
|
@ -556,6 +552,15 @@ final class PHUIObjectItemView extends AphrontTagView {
|
||||||
$this->fontIcon);
|
$this->fontIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($image && $this->href) {
|
||||||
|
$image = phutil_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => $this->href,
|
||||||
|
),
|
||||||
|
$image);
|
||||||
|
}
|
||||||
|
|
||||||
/* Build a fake table */
|
/* Build a fake table */
|
||||||
$column1 = phutil_tag(
|
$column1 = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
|
|
|
@ -616,14 +616,12 @@ ul.phui-object-item-icons {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.phui-object-item-ficon {
|
.phui-object-item-ficon {
|
||||||
width: 26px;
|
width: 48px;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
margin: 11px 9px 7px 12px;
|
margin-top: 12px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
text-align: center;
|
||||||
|
font-size: 24px;
|
||||||
.device-desktop .phui-object-list-states .phui-object-item {
|
|
||||||
margin: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.phui-object-item-with-ficon .phui-object-item-content-box {
|
.phui-object-item-with-ficon .phui-object-item-content-box {
|
||||||
|
@ -639,25 +637,6 @@ ul.phui-object-item-icons {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phui-object-box .phui-object-list-states li:last-child
|
|
||||||
.phui-object-item-frame {
|
|
||||||
border: none;
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.phui-object-list-states .phui-object-item-frame {
|
|
||||||
border: none;
|
|
||||||
border-bottom: 1px solid {$thinblueborder};
|
|
||||||
}
|
|
||||||
|
|
||||||
.phui-object-list-states .phui-object-item {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.phui-object-list-states .phui-object-item-frame {
|
|
||||||
min-height: 44px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* - Dashboards ------------------------------------------------------------ */
|
/* - Dashboards ------------------------------------------------------------ */
|
||||||
|
|
||||||
.dashboard-panel .phui-object-item-list-view {
|
.dashboard-panel .phui-object-item-list-view {
|
||||||
|
|
Loading…
Reference in a new issue