mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +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(
|
||||
'conpherence.pkg.css' => '3c8a0668',
|
||||
'conpherence.pkg.js' => '020aebcf',
|
||||
'core.pkg.css' => 'ad8fc332',
|
||||
'core.pkg.css' => '6d9a0ba6',
|
||||
'core.pkg.js' => '705aec2c',
|
||||
'differential.pkg.css' => '607c84be',
|
||||
'differential.pkg.js' => '1b97518d',
|
||||
|
@ -176,7 +176,7 @@ return array(
|
|||
'rsrc/css/phui/phui-status.css' => 'e5ff8be0',
|
||||
'rsrc/css/phui/phui-tag-view.css' => '8519160a',
|
||||
'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.css' => '74fc9d98',
|
||||
'rsrc/css/phui/workboards/phui-workcard.css' => '913441b6',
|
||||
|
@ -873,7 +873,7 @@ return array(
|
|||
'phui-tag-view-css' => '8519160a',
|
||||
'phui-theme-css' => '35883b37',
|
||||
'phui-timeline-view-css' => '1e348e4b',
|
||||
'phui-two-column-view-css' => '0a876b9e',
|
||||
'phui-two-column-view-css' => 'f96d319f',
|
||||
'phui-workboard-color-css' => 'e86de308',
|
||||
'phui-workboard-view-css' => '74fc9d98',
|
||||
'phui-workcard-view-css' => '913441b6',
|
||||
|
|
|
@ -2037,6 +2037,7 @@ phutil_register_library_map(array(
|
|||
'PHUIInfoView' => 'view/phui/PHUIInfoView.php',
|
||||
'PHUIInvisibleCharacterTestCase' => 'view/phui/__tests__/PHUIInvisibleCharacterTestCase.php',
|
||||
'PHUIInvisibleCharacterView' => 'view/phui/PHUIInvisibleCharacterView.php',
|
||||
'PHUILauncherView' => 'view/phui/PHUILauncherView.php',
|
||||
'PHUILeftRightExample' => 'applications/uiexample/examples/PHUILeftRightExample.php',
|
||||
'PHUILeftRightView' => 'view/phui/PHUILeftRightView.php',
|
||||
'PHUIListExample' => 'applications/uiexample/examples/PHUIListExample.php',
|
||||
|
@ -8236,6 +8237,7 @@ phutil_register_library_map(array(
|
|||
'PHUIInfoView' => 'AphrontTagView',
|
||||
'PHUIInvisibleCharacterTestCase' => 'PhabricatorTestCase',
|
||||
'PHUIInvisibleCharacterView' => 'AphrontView',
|
||||
'PHUILauncherView' => 'AphrontTagView',
|
||||
'PHUILeftRightExample' => 'PhabricatorUIExample',
|
||||
'PHUILeftRightView' => 'AphrontTagView',
|
||||
'PHUIListExample' => 'PhabricatorUIExample',
|
||||
|
|
|
@ -10,13 +10,15 @@ final class AlmanacConsoleController extends AlmanacController {
|
|||
$viewer = $request->getViewer();
|
||||
|
||||
$menu = id(new PHUIObjectItemListView())
|
||||
->setUser($viewer);
|
||||
->setUser($viewer)
|
||||
->setBig(true);
|
||||
|
||||
$menu->addItem(
|
||||
id(new PHUIObjectItemView())
|
||||
->setHeader(pht('Devices'))
|
||||
->setHref($this->getApplicationURI('device/'))
|
||||
->setImageIcon('fa-server')
|
||||
->setClickable(true)
|
||||
->addAttribute(
|
||||
pht(
|
||||
'Create an inventory of physical and virtual hosts and '.
|
||||
|
@ -27,6 +29,7 @@ final class AlmanacConsoleController extends AlmanacController {
|
|||
->setHeader(pht('Services'))
|
||||
->setHref($this->getApplicationURI('service/'))
|
||||
->setImageIcon('fa-plug')
|
||||
->setClickable(true)
|
||||
->addAttribute(
|
||||
pht(
|
||||
'Create and update services, and map them to interfaces on '.
|
||||
|
@ -37,6 +40,7 @@ final class AlmanacConsoleController extends AlmanacController {
|
|||
->setHeader(pht('Networks'))
|
||||
->setHref($this->getApplicationURI('network/'))
|
||||
->setImageIcon('fa-globe')
|
||||
->setClickable(true)
|
||||
->addAttribute(
|
||||
pht(
|
||||
'Manage public and private networks.')));
|
||||
|
@ -46,6 +50,7 @@ final class AlmanacConsoleController extends AlmanacController {
|
|||
->setHeader(pht('Namespaces'))
|
||||
->setHref($this->getApplicationURI('namespace/'))
|
||||
->setImageIcon('fa-asterisk')
|
||||
->setClickable(true)
|
||||
->addAttribute(
|
||||
pht('Control who can create new named services and devices.')));
|
||||
|
||||
|
@ -57,6 +62,7 @@ final class AlmanacConsoleController extends AlmanacController {
|
|||
->setHeader(pht('Documentation'))
|
||||
->setHref($docs_uri)
|
||||
->setImageIcon('fa-book')
|
||||
->setClickable(true)
|
||||
->addAttribute(pht('Browse documentation for Almanac.')));
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
|
@ -64,17 +70,15 @@ final class AlmanacConsoleController extends AlmanacController {
|
|||
$crumbs->setBorder(true);
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Almanac Console'))
|
||||
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
|
||||
->setObjectList($menu);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Almanac Console'))
|
||||
->setHeaderIcon('fa-server');
|
||||
$launcher_view = id(new PHUILauncherView())
|
||||
->appendChild($box);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$box,
|
||||
));
|
||||
->setFooter($launcher_view);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(pht('Almanac Console'))
|
||||
|
|
|
@ -59,9 +59,11 @@ final class PhabricatorDashboardConsoleController
|
|||
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
|
||||
->setObjectList($menu);
|
||||
|
||||
$launch_view = id(new PHUILauncherView())
|
||||
->appendChild($box);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setFixed(true)
|
||||
->setFooter($box);
|
||||
->setFooter($launch_view);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
|
|
|
@ -78,14 +78,16 @@ final class DiffusionRepositoryEditController
|
|||
->addClass('diffusion-create-repo')
|
||||
->appendChild($layout);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setFixed(true)
|
||||
->setFooter(
|
||||
$launcher_view = id(new PHUILauncherView())
|
||||
->appendChild(
|
||||
array(
|
||||
$layout,
|
||||
$hints,
|
||||
));
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setFooter($launcher_view);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
|
|
|
@ -76,9 +76,11 @@ final class DrydockConsoleController extends DrydockController {
|
|||
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
|
||||
->setObjectList($menu);
|
||||
|
||||
$launcher_view = id(new PHUILauncherView())
|
||||
->appendChild($box);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setFixed(true)
|
||||
->setFooter($box);
|
||||
->setFooter($launcher_view);
|
||||
|
||||
return $this->newPage()
|
||||
->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
|
||||
*/
|
||||
|
||||
.phui-launcher-view {
|
||||
max-width: 1140px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.phui-two-column-fixed {
|
||||
max-width: 1140px;
|
||||
margin: 0 auto;
|
||||
|
|
Loading…
Reference in a new issue