mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Move existing "Console" interfaces away from "setFixed(...)" on "TwoColumnView"
Summary: Depends on D20931. Ref T13362. Move all "Console"-style interfaces to use a consistent layout based on a new "LauncherView" which just centers the content. Test Plan: Viewed all affected interfaces. Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13362 Differential Revision: https://secure.phabricator.com/D20933
This commit is contained in:
parent
cb481f36c5
commit
26c2a1ba68
8 changed files with 55 additions and 18 deletions
|
@ -9,7 +9,7 @@ return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'conpherence.pkg.css' => '3c8a0668',
|
'conpherence.pkg.css' => '3c8a0668',
|
||||||
'conpherence.pkg.js' => '020aebcf',
|
'conpherence.pkg.js' => '020aebcf',
|
||||||
'core.pkg.css' => 'ad8fc332',
|
'core.pkg.css' => '6d9a0ba6',
|
||||||
'core.pkg.js' => '705aec2c',
|
'core.pkg.js' => '705aec2c',
|
||||||
'differential.pkg.css' => '607c84be',
|
'differential.pkg.css' => '607c84be',
|
||||||
'differential.pkg.js' => '1b97518d',
|
'differential.pkg.js' => '1b97518d',
|
||||||
|
@ -176,7 +176,7 @@ return array(
|
||||||
'rsrc/css/phui/phui-status.css' => 'e5ff8be0',
|
'rsrc/css/phui/phui-status.css' => 'e5ff8be0',
|
||||||
'rsrc/css/phui/phui-tag-view.css' => '8519160a',
|
'rsrc/css/phui/phui-tag-view.css' => '8519160a',
|
||||||
'rsrc/css/phui/phui-timeline-view.css' => '1e348e4b',
|
'rsrc/css/phui/phui-timeline-view.css' => '1e348e4b',
|
||||||
'rsrc/css/phui/phui-two-column-view.css' => '0a876b9e',
|
'rsrc/css/phui/phui-two-column-view.css' => 'f96d319f',
|
||||||
'rsrc/css/phui/workboards/phui-workboard-color.css' => 'e86de308',
|
'rsrc/css/phui/workboards/phui-workboard-color.css' => 'e86de308',
|
||||||
'rsrc/css/phui/workboards/phui-workboard.css' => '74fc9d98',
|
'rsrc/css/phui/workboards/phui-workboard.css' => '74fc9d98',
|
||||||
'rsrc/css/phui/workboards/phui-workcard.css' => '913441b6',
|
'rsrc/css/phui/workboards/phui-workcard.css' => '913441b6',
|
||||||
|
@ -873,7 +873,7 @@ return array(
|
||||||
'phui-tag-view-css' => '8519160a',
|
'phui-tag-view-css' => '8519160a',
|
||||||
'phui-theme-css' => '35883b37',
|
'phui-theme-css' => '35883b37',
|
||||||
'phui-timeline-view-css' => '1e348e4b',
|
'phui-timeline-view-css' => '1e348e4b',
|
||||||
'phui-two-column-view-css' => '0a876b9e',
|
'phui-two-column-view-css' => 'f96d319f',
|
||||||
'phui-workboard-color-css' => 'e86de308',
|
'phui-workboard-color-css' => 'e86de308',
|
||||||
'phui-workboard-view-css' => '74fc9d98',
|
'phui-workboard-view-css' => '74fc9d98',
|
||||||
'phui-workcard-view-css' => '913441b6',
|
'phui-workcard-view-css' => '913441b6',
|
||||||
|
|
|
@ -2037,6 +2037,7 @@ phutil_register_library_map(array(
|
||||||
'PHUIInfoView' => 'view/phui/PHUIInfoView.php',
|
'PHUIInfoView' => 'view/phui/PHUIInfoView.php',
|
||||||
'PHUIInvisibleCharacterTestCase' => 'view/phui/__tests__/PHUIInvisibleCharacterTestCase.php',
|
'PHUIInvisibleCharacterTestCase' => 'view/phui/__tests__/PHUIInvisibleCharacterTestCase.php',
|
||||||
'PHUIInvisibleCharacterView' => 'view/phui/PHUIInvisibleCharacterView.php',
|
'PHUIInvisibleCharacterView' => 'view/phui/PHUIInvisibleCharacterView.php',
|
||||||
|
'PHUILauncherView' => 'view/phui/PHUILauncherView.php',
|
||||||
'PHUILeftRightExample' => 'applications/uiexample/examples/PHUILeftRightExample.php',
|
'PHUILeftRightExample' => 'applications/uiexample/examples/PHUILeftRightExample.php',
|
||||||
'PHUILeftRightView' => 'view/phui/PHUILeftRightView.php',
|
'PHUILeftRightView' => 'view/phui/PHUILeftRightView.php',
|
||||||
'PHUIListExample' => 'applications/uiexample/examples/PHUIListExample.php',
|
'PHUIListExample' => 'applications/uiexample/examples/PHUIListExample.php',
|
||||||
|
@ -8236,6 +8237,7 @@ phutil_register_library_map(array(
|
||||||
'PHUIInfoView' => 'AphrontTagView',
|
'PHUIInfoView' => 'AphrontTagView',
|
||||||
'PHUIInvisibleCharacterTestCase' => 'PhabricatorTestCase',
|
'PHUIInvisibleCharacterTestCase' => 'PhabricatorTestCase',
|
||||||
'PHUIInvisibleCharacterView' => 'AphrontView',
|
'PHUIInvisibleCharacterView' => 'AphrontView',
|
||||||
|
'PHUILauncherView' => 'AphrontTagView',
|
||||||
'PHUILeftRightExample' => 'PhabricatorUIExample',
|
'PHUILeftRightExample' => 'PhabricatorUIExample',
|
||||||
'PHUILeftRightView' => 'AphrontTagView',
|
'PHUILeftRightView' => 'AphrontTagView',
|
||||||
'PHUIListExample' => 'PhabricatorUIExample',
|
'PHUIListExample' => 'PhabricatorUIExample',
|
||||||
|
|
|
@ -10,13 +10,15 @@ final class AlmanacConsoleController extends AlmanacController {
|
||||||
$viewer = $request->getViewer();
|
$viewer = $request->getViewer();
|
||||||
|
|
||||||
$menu = id(new PHUIObjectItemListView())
|
$menu = id(new PHUIObjectItemListView())
|
||||||
->setUser($viewer);
|
->setUser($viewer)
|
||||||
|
->setBig(true);
|
||||||
|
|
||||||
$menu->addItem(
|
$menu->addItem(
|
||||||
id(new PHUIObjectItemView())
|
id(new PHUIObjectItemView())
|
||||||
->setHeader(pht('Devices'))
|
->setHeader(pht('Devices'))
|
||||||
->setHref($this->getApplicationURI('device/'))
|
->setHref($this->getApplicationURI('device/'))
|
||||||
->setImageIcon('fa-server')
|
->setImageIcon('fa-server')
|
||||||
|
->setClickable(true)
|
||||||
->addAttribute(
|
->addAttribute(
|
||||||
pht(
|
pht(
|
||||||
'Create an inventory of physical and virtual hosts and '.
|
'Create an inventory of physical and virtual hosts and '.
|
||||||
|
@ -27,6 +29,7 @@ final class AlmanacConsoleController extends AlmanacController {
|
||||||
->setHeader(pht('Services'))
|
->setHeader(pht('Services'))
|
||||||
->setHref($this->getApplicationURI('service/'))
|
->setHref($this->getApplicationURI('service/'))
|
||||||
->setImageIcon('fa-plug')
|
->setImageIcon('fa-plug')
|
||||||
|
->setClickable(true)
|
||||||
->addAttribute(
|
->addAttribute(
|
||||||
pht(
|
pht(
|
||||||
'Create and update services, and map them to interfaces on '.
|
'Create and update services, and map them to interfaces on '.
|
||||||
|
@ -37,6 +40,7 @@ final class AlmanacConsoleController extends AlmanacController {
|
||||||
->setHeader(pht('Networks'))
|
->setHeader(pht('Networks'))
|
||||||
->setHref($this->getApplicationURI('network/'))
|
->setHref($this->getApplicationURI('network/'))
|
||||||
->setImageIcon('fa-globe')
|
->setImageIcon('fa-globe')
|
||||||
|
->setClickable(true)
|
||||||
->addAttribute(
|
->addAttribute(
|
||||||
pht(
|
pht(
|
||||||
'Manage public and private networks.')));
|
'Manage public and private networks.')));
|
||||||
|
@ -46,6 +50,7 @@ final class AlmanacConsoleController extends AlmanacController {
|
||||||
->setHeader(pht('Namespaces'))
|
->setHeader(pht('Namespaces'))
|
||||||
->setHref($this->getApplicationURI('namespace/'))
|
->setHref($this->getApplicationURI('namespace/'))
|
||||||
->setImageIcon('fa-asterisk')
|
->setImageIcon('fa-asterisk')
|
||||||
|
->setClickable(true)
|
||||||
->addAttribute(
|
->addAttribute(
|
||||||
pht('Control who can create new named services and devices.')));
|
pht('Control who can create new named services and devices.')));
|
||||||
|
|
||||||
|
@ -57,6 +62,7 @@ final class AlmanacConsoleController extends AlmanacController {
|
||||||
->setHeader(pht('Documentation'))
|
->setHeader(pht('Documentation'))
|
||||||
->setHref($docs_uri)
|
->setHref($docs_uri)
|
||||||
->setImageIcon('fa-book')
|
->setImageIcon('fa-book')
|
||||||
|
->setClickable(true)
|
||||||
->addAttribute(pht('Browse documentation for Almanac.')));
|
->addAttribute(pht('Browse documentation for Almanac.')));
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
@ -64,17 +70,15 @@ final class AlmanacConsoleController extends AlmanacController {
|
||||||
$crumbs->setBorder(true);
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
|
->setHeaderText(pht('Almanac Console'))
|
||||||
|
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
|
||||||
->setObjectList($menu);
|
->setObjectList($menu);
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
$launcher_view = id(new PHUILauncherView())
|
||||||
->setHeader(pht('Almanac Console'))
|
->appendChild($box);
|
||||||
->setHeaderIcon('fa-server');
|
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$view = id(new PHUITwoColumnView())
|
||||||
->setHeader($header)
|
->setFooter($launcher_view);
|
||||||
->setFooter(array(
|
|
||||||
$box,
|
|
||||||
));
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle(pht('Almanac Console'))
|
->setTitle(pht('Almanac Console'))
|
||||||
|
|
|
@ -59,9 +59,11 @@ final class PhabricatorDashboardConsoleController
|
||||||
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
|
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
|
||||||
->setObjectList($menu);
|
->setObjectList($menu);
|
||||||
|
|
||||||
|
$launch_view = id(new PHUILauncherView())
|
||||||
|
->appendChild($box);
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$view = id(new PHUITwoColumnView())
|
||||||
->setFixed(true)
|
->setFooter($launch_view);
|
||||||
->setFooter($box);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
|
|
|
@ -78,14 +78,16 @@ final class DiffusionRepositoryEditController
|
||||||
->addClass('diffusion-create-repo')
|
->addClass('diffusion-create-repo')
|
||||||
->appendChild($layout);
|
->appendChild($layout);
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$launcher_view = id(new PHUILauncherView())
|
||||||
->setFixed(true)
|
->appendChild(
|
||||||
->setFooter(
|
|
||||||
array(
|
array(
|
||||||
$layout,
|
$layout,
|
||||||
$hints,
|
$hints,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setFooter($launcher_view);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
|
|
|
@ -76,9 +76,11 @@ final class DrydockConsoleController extends DrydockController {
|
||||||
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
|
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
|
||||||
->setObjectList($menu);
|
->setObjectList($menu);
|
||||||
|
|
||||||
|
$launcher_view = id(new PHUILauncherView())
|
||||||
|
->appendChild($box);
|
||||||
|
|
||||||
$view = id(new PHUITwoColumnView())
|
$view = id(new PHUITwoColumnView())
|
||||||
->setFixed(true)
|
->setFooter($launcher_view);
|
||||||
->setFooter($box);
|
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
|
|
20
src/view/phui/PHUILauncherView.php
Normal file
20
src/view/phui/PHUILauncherView.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PHUILauncherView
|
||||||
|
extends AphrontTagView {
|
||||||
|
|
||||||
|
protected function getTagName() {
|
||||||
|
return 'div';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getTagAttributes() {
|
||||||
|
$classes = array();
|
||||||
|
|
||||||
|
$classes[] = 'phui-launcher-view';
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'class' => implode(' ', $classes),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -2,6 +2,11 @@
|
||||||
* @provides phui-two-column-view-css
|
* @provides phui-two-column-view-css
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
.phui-launcher-view {
|
||||||
|
max-width: 1140px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
.phui-two-column-fixed {
|
.phui-two-column-fixed {
|
||||||
max-width: 1140px;
|
max-width: 1140px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
Loading…
Reference in a new issue