Config re-design
Summary:
This is a full UI pass at a cleaner "Config" application. The main idea is to simplify the UI, center it, and have a different feel than other UI, a sort of "manage" UI theme for objects with loads of settings. Also adds a new minimalistic "WHITE_CONFIG" box type which may get re-used in Diffusion settings. This is a 90% pass, I'll have a few follow up diffs. Specifically:
- Build breadcrumbs as a flexible UI to go into headers.
- One click ObjectItemView option, for hover states.
- Sidenav doesn't always select (AphrontFilter issue)
- Mobile touchups, though it's pretty reasonable.
Test Plan:
Click through every page here, edit options, see new navigation UI. Test a few various setup issue layouts including fatals.
{F5163228}
{F5163229}
{F5163230}
{F5163231}
{F5163232}
{F5163233}
{F5163234}
Reviewers: epriestley
Reviewed By: epriestley
Spies: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D18519
This commit is contained in:
@@ -2445,7 +2445,6 @@ phutil_register_library_map(array(
|
||||
'PhabricatorConfigOption' => 'applications/config/option/PhabricatorConfigOption.php',
|
||||
'PhabricatorConfigOptionType' => 'applications/config/custom/PhabricatorConfigOptionType.php',
|
||||
'PhabricatorConfigPHIDModule' => 'applications/config/module/PhabricatorConfigPHIDModule.php',
|
||||
'PhabricatorConfigPageView' => 'applications/config/view/PhabricatorConfigPageView.php',
|
||||
'PhabricatorConfigProxySource' => 'infrastructure/env/PhabricatorConfigProxySource.php',
|
||||
'PhabricatorConfigPurgeCacheController' => 'applications/config/controller/PhabricatorConfigPurgeCacheController.php',
|
||||
'PhabricatorConfigRegexOptionType' => 'applications/config/custom/PhabricatorConfigRegexOptionType.php',
|
||||
@@ -7734,7 +7733,6 @@ phutil_register_library_map(array(
|
||||
),
|
||||
'PhabricatorConfigOptionType' => 'Phobject',
|
||||
'PhabricatorConfigPHIDModule' => 'PhabricatorConfigModule',
|
||||
'PhabricatorConfigPageView' => 'AphrontTagView',
|
||||
'PhabricatorConfigProxySource' => 'PhabricatorConfigSource',
|
||||
'PhabricatorConfigPurgeCacheController' => 'PhabricatorConfigController',
|
||||
'PhabricatorConfigRegexOptionType' => 'PhabricatorConfigJSONOptionType',
|
||||
|
||||
@@ -28,8 +28,17 @@ abstract class PhabricatorConfigGroupConstants
|
||||
public static function getGroupURI($group) {
|
||||
$map = array(
|
||||
self::GROUP_CORE => '/',
|
||||
self::GROUP_APPLICATION => pht('application/'),
|
||||
self::GROUP_DEVELOPER => pht('developer/'),
|
||||
self::GROUP_APPLICATION => 'application/',
|
||||
self::GROUP_DEVELOPER => 'developer/',
|
||||
);
|
||||
return idx($map, $group, '#');
|
||||
}
|
||||
|
||||
public static function getGroupFullURI($group) {
|
||||
$map = array(
|
||||
self::GROUP_CORE => '/config/',
|
||||
self::GROUP_APPLICATION => '/config/application/',
|
||||
self::GROUP_DEVELOPER => '/config/developer/',
|
||||
);
|
||||
return idx($map, $group, '#');
|
||||
}
|
||||
|
||||
@@ -49,29 +49,29 @@ final class PhabricatorConfigAllController
|
||||
));
|
||||
|
||||
$title = pht('Current Settings');
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true);
|
||||
$header = $this->buildHeaderView($title);
|
||||
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('all/');
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$view = $this->buildConfigBoxView(
|
||||
pht('All Settings'),
|
||||
$table);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($table);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($view);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,28 +11,25 @@ final class PhabricatorConfigApplicationController
|
||||
|
||||
$groups = PhabricatorApplicationConfigOptions::loadAll();
|
||||
$apps_list = $this->buildConfigOptionsList($groups, 'apps');
|
||||
$apps_list = $this->buildConfigBoxView(pht('Applications'), $apps_list);
|
||||
|
||||
$title = pht('Application Settings');
|
||||
$header = $this->buildHeaderView($title);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true);
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
->addTextCrumb(pht('Applications'))
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($apps_list);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($apps_list);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
private function buildConfigOptionsList(array $groups, $type) {
|
||||
|
||||
@@ -9,16 +9,15 @@ final class PhabricatorConfigCacheController
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('cache/');
|
||||
|
||||
$purge_button = id(new PHUIButtonView())
|
||||
->setText(pht('Purge Caches'))
|
||||
->setHref('/config/cache/purge/')
|
||||
->setTag('a')
|
||||
->setWorkflow(true)
|
||||
->setIcon('fa-exclamation-triangle');
|
||||
|
||||
$title = pht('Cache Status');
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true);
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
->addTextCrumb(pht('Cache Status'))
|
||||
->setBorder(true);
|
||||
$header = $this->buildHeaderView($title, $purge_button);
|
||||
|
||||
$code_box = $this->renderCodeBox();
|
||||
$data_box = $this->renderDataBox();
|
||||
@@ -28,40 +27,27 @@ final class PhabricatorConfigCacheController
|
||||
$data_box,
|
||||
);
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($page);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($page);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
private function renderCodeBox() {
|
||||
$cache = PhabricatorOpcodeCacheSpec::getActiveCacheSpec();
|
||||
|
||||
$properties = id(new PHUIPropertyListView());
|
||||
|
||||
$this->renderCommonProperties($properties, $cache);
|
||||
|
||||
$purge_button = id(new PHUIButtonView())
|
||||
->setText(pht('Purge Caches'))
|
||||
->setHref('/config/cache/purge/')
|
||||
->setTag('a')
|
||||
->setWorkflow(true)
|
||||
->setIcon('fa-exclamation-triangle');
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Opcode Cache'))
|
||||
->addActionLink($purge_button);
|
||||
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->addPropertyList($properties);
|
||||
return $this->buildConfigBoxView(pht('Opcode Cache'), $properties);
|
||||
}
|
||||
|
||||
private function renderDataBox() {
|
||||
@@ -109,11 +95,9 @@ final class PhabricatorConfigCacheController
|
||||
));
|
||||
}
|
||||
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Data Cache'))
|
||||
->addPropertyList($properties)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($table);
|
||||
$properties = $this->buildConfigBoxView(pht('Data Cache'), $properties);
|
||||
$table = $this->buildConfigBoxView(pht('Cache Storage'), $table);
|
||||
return array($properties, $table);
|
||||
}
|
||||
|
||||
private function renderCommonProperties(
|
||||
|
||||
@@ -9,34 +9,31 @@ final class PhabricatorConfigClusterDatabasesController
|
||||
|
||||
$title = pht('Cluster Database Status');
|
||||
$doc_href = PhabricatorEnv::getDoclink('Cluster: Databases');
|
||||
$button = id(new PHUIButtonView())
|
||||
->setIcon('fa-book')
|
||||
->setHref($doc_href)
|
||||
->setTag('a')
|
||||
->setText(pht('Documentation'));
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true)
|
||||
->addActionLink(
|
||||
id(new PHUIButtonView())
|
||||
->setIcon('fa-book')
|
||||
->setHref($doc_href)
|
||||
->setTag('a')
|
||||
->setText(pht('Documentation')));
|
||||
$header = $this->buildHeaderView($title, $button);
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
$database_status = $this->buildClusterDatabaseStatus();
|
||||
$status = $this->buildConfigBoxView(pht('Status'), $database_status);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$database_status = $this->buildClusterDatabaseStatus();
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($database_status);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($status);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
private function buildClusterDatabaseStatus() {
|
||||
|
||||
@@ -9,34 +9,33 @@ final class PhabricatorConfigClusterNotificationsController
|
||||
|
||||
$title = pht('Cluster Notifications');
|
||||
$doc_href = PhabricatorEnv::getDoclink('Cluster: Notifications');
|
||||
$button = id(new PHUIButtonView())
|
||||
->setIcon('fa-book')
|
||||
->setHref($doc_href)
|
||||
->setTag('a')
|
||||
->setText(pht('Documentation'));
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true)
|
||||
->addActionLink(
|
||||
id(new PHUIButtonView())
|
||||
->setIcon('fa-book')
|
||||
->setHref($doc_href)
|
||||
->setTag('a')
|
||||
->setText(pht('Documentation')));
|
||||
$header = $this->buildHeaderView($title, $button);
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
$notification_status = $this->buildClusterNotificationStatus();
|
||||
$status = $this->buildConfigBoxView(
|
||||
pht('Notifications Status'),
|
||||
$notification_status);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$notification_status = $this->buildClusterNotificationStatus();
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($notification_status);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($status);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
private function buildClusterNotificationStatus() {
|
||||
|
||||
@@ -10,39 +10,39 @@ final class PhabricatorConfigClusterRepositoriesController
|
||||
$title = pht('Cluster Repository Status');
|
||||
|
||||
$doc_href = PhabricatorEnv::getDoclink('Cluster: Repositories');
|
||||
$button = id(new PHUIButtonView())
|
||||
->setIcon('fa-book')
|
||||
->setHref($doc_href)
|
||||
->setTag('a')
|
||||
->setText(pht('Documentation'));
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true)
|
||||
->addActionLink(
|
||||
id(new PHUIButtonView())
|
||||
->setIcon('fa-book')
|
||||
->setHref($doc_href)
|
||||
->setTag('a')
|
||||
->setText(pht('Documentation')));
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
->addTextCrumb(pht('Repository Servers'))
|
||||
->setBorder(true);
|
||||
$header = $this->buildHeaderView($title, $button);
|
||||
|
||||
$repository_status = $this->buildClusterRepositoryStatus();
|
||||
$repository_errors = $this->buildClusterRepositoryErrors();
|
||||
$repo_status = $this->buildConfigBoxView(
|
||||
pht('Repository Status'), $repository_status);
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$repository_errors = $this->buildClusterRepositoryErrors();
|
||||
$repo_errors = $this->buildConfigBoxView(
|
||||
pht('Repository Errors'), $repository_errors);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent(
|
||||
array(
|
||||
$repository_status,
|
||||
$repository_errors,
|
||||
));
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn(array(
|
||||
$repo_status,
|
||||
$repo_errors,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
private function buildClusterRepositoryStatus() {
|
||||
|
||||
@@ -10,33 +10,30 @@ final class PhabricatorConfigClusterSearchController
|
||||
$title = pht('Cluster Search');
|
||||
$doc_href = PhabricatorEnv::getDoclink('Cluster: Search');
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true)
|
||||
->addActionLink(
|
||||
id(new PHUIButtonView())
|
||||
->setIcon('fa-book')
|
||||
->setHref($doc_href)
|
||||
->setTag('a')
|
||||
->setText(pht('Documentation')));
|
||||
$button = id(new PHUIButtonView())
|
||||
->setIcon('fa-book')
|
||||
->setHref($doc_href)
|
||||
->setTag('a')
|
||||
->setText(pht('Documentation'));
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs($nav)
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
$header = $this->buildHeaderView($title, $button);
|
||||
|
||||
$search_status = $this->buildClusterSearchStatus();
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($search_status);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($search_status);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
private function buildClusterSearchStatus() {
|
||||
@@ -105,15 +102,16 @@ final class PhabricatorConfigClusterSearchController
|
||||
->setNoDataString(pht('No search servers are configured.'))
|
||||
->setHeaders($head);
|
||||
|
||||
$view = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($service->getDisplayName())
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($table);
|
||||
$view = $this->buildConfigBoxView(pht('Search Servers'), $table);
|
||||
|
||||
if ($stats_view) {
|
||||
$view->addPropertyList($stats_view);
|
||||
$stats = null;
|
||||
if ($stats_view->hasAnyProperties()) {
|
||||
$stats = $this->buildConfigBoxView(
|
||||
pht('%s Stats', $service->getDisplayName()),
|
||||
$stats_view);
|
||||
}
|
||||
return $view;
|
||||
|
||||
return array($stats, $view);
|
||||
}
|
||||
|
||||
private function renderIndexStats($stats) {
|
||||
|
||||
@@ -8,10 +8,10 @@ abstract class PhabricatorConfigController extends PhabricatorController {
|
||||
|
||||
public function buildSideNavView($filter = null, $for_app = false) {
|
||||
|
||||
|
||||
$guide_href = new PhutilURI('/guides/');
|
||||
$nav = new AphrontSideNavFilterView();
|
||||
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
||||
$nav->addLabel(pht('Configuration'));
|
||||
$nav->addFilter('/',
|
||||
pht('Core Settings'), null, 'fa-gear');
|
||||
$nav->addFilter('application/',
|
||||
@@ -46,7 +46,6 @@ abstract class PhabricatorConfigController extends PhabricatorController {
|
||||
pht('Search Servers'), null, 'fa-search');
|
||||
$nav->addLabel(pht('Modules'));
|
||||
|
||||
|
||||
$modules = PhabricatorConfigModule::getAllModules();
|
||||
foreach ($modules as $key => $module) {
|
||||
$nav->addFilter('module/'.$key.'/',
|
||||
@@ -60,4 +59,37 @@ abstract class PhabricatorConfigController extends PhabricatorController {
|
||||
return $this->buildSideNavView(null, true)->getMenu();
|
||||
}
|
||||
|
||||
public function buildHeaderView($text, $action = null) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$file = PhabricatorFile::loadBuiltin($viewer, 'projects/v3/manage.png');
|
||||
$image = $file->getBestURI($file);
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($text)
|
||||
->setProfileHeader(true)
|
||||
->setImage($image);
|
||||
|
||||
if ($action) {
|
||||
$header->addActionLink($action);
|
||||
}
|
||||
|
||||
return $header;
|
||||
}
|
||||
|
||||
public function buildConfigBoxView($title, $content, $action = null) {
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title);
|
||||
|
||||
if ($action) {
|
||||
$header->addActionItem($action);
|
||||
}
|
||||
|
||||
$view = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->appendChild($content)
|
||||
->setBackground(PHUIObjectBoxView::WHITE_CONFIG);
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,10 +12,6 @@ final class PhabricatorConfigDatabaseIssueController
|
||||
$expect = $query->loadExpectedSchemata();
|
||||
$comp_servers = $query->buildComparisonSchemata($expect, $actual);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Database Issues'));
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
// Collect all open issues.
|
||||
$issues = array();
|
||||
foreach ($comp_servers as $ref_name => $comp) {
|
||||
@@ -158,24 +154,27 @@ final class PhabricatorConfigDatabaseIssueController
|
||||
}
|
||||
|
||||
$title = pht('Database Issues');
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true);
|
||||
$header = $this->buildHeaderView($title);
|
||||
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('dbissue/');
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$view = $this->buildConfigBoxView(pht('Issues'), $table);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($table);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($view);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -132,27 +132,24 @@ final class PhabricatorConfigDatabaseStatusController
|
||||
}
|
||||
|
||||
$doc_link = PhabricatorEnv::getDoclink('Managing Storage Adjustments');
|
||||
$button = id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setIcon('fa-book')
|
||||
->setHref($doc_link)
|
||||
->setText(pht('Documentation'));
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true)
|
||||
->addActionLink(
|
||||
id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setIcon('fa-book')
|
||||
->setHref($doc_link)
|
||||
->setText(pht('Learn More')));
|
||||
$header = $this->buildHeaderView($title, $button);
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($body);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($body);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
|
||||
@@ -221,11 +218,12 @@ final class PhabricatorConfigDatabaseStatusController
|
||||
));
|
||||
|
||||
$title = pht('Database Status');
|
||||
|
||||
$properties = $this->buildProperties(
|
||||
array(
|
||||
),
|
||||
$comp->getIssues());
|
||||
$properties = $this->buildConfigBoxView(pht('Properties'), $properties);
|
||||
$table = $this->buildConfigBoxView(pht('Database'), $table);
|
||||
|
||||
return $this->buildResponse($title, array($properties, $table));
|
||||
}
|
||||
@@ -280,7 +278,7 @@ final class PhabricatorConfigDatabaseStatusController
|
||||
null,
|
||||
));
|
||||
|
||||
$title = pht('Database: %s', $database_name);
|
||||
$title = $database_name;
|
||||
|
||||
$actual_database = $actual->getDatabase($database_name);
|
||||
if ($actual_database) {
|
||||
@@ -325,6 +323,9 @@ final class PhabricatorConfigDatabaseStatusController
|
||||
),
|
||||
$database->getIssues());
|
||||
|
||||
$properties = $this->buildConfigBoxView(pht('Properties'), $properties);
|
||||
$table = $this->buildConfigBoxView(pht('Database'), $table);
|
||||
|
||||
return $this->buildResponse($title, array($properties, $table));
|
||||
}
|
||||
|
||||
@@ -503,7 +504,7 @@ final class PhabricatorConfigDatabaseStatusController
|
||||
null,
|
||||
));
|
||||
|
||||
$title = pht('Database: %s.%s', $database_name, $table_name);
|
||||
$title = pht('%s.%s', $database_name, $table_name);
|
||||
|
||||
if ($actual_table) {
|
||||
$actual_collation = $actual_table->getCollation();
|
||||
@@ -534,8 +535,14 @@ final class PhabricatorConfigDatabaseStatusController
|
||||
),
|
||||
$table->getIssues());
|
||||
|
||||
$box_header = pht('%s.%s', $database_name, $table_name);
|
||||
|
||||
$properties = $this->buildConfigBoxView(pht('Properties'), $properties);
|
||||
$table = $this->buildConfigBoxView(pht('Database'), $table_view);
|
||||
$keys = $this->buildConfigBoxView(pht('Keys'), $keys_view);
|
||||
|
||||
return $this->buildResponse(
|
||||
$title, array($properties, $table_view, $keys_view));
|
||||
$title, array($properties, $table, $keys));
|
||||
}
|
||||
|
||||
private function renderColumn(
|
||||
@@ -613,7 +620,7 @@ final class PhabricatorConfigDatabaseStatusController
|
||||
|
||||
|
||||
$title = pht(
|
||||
'Database Status: %s.%s.%s',
|
||||
'%s.%s.%s',
|
||||
$database_name,
|
||||
$table_name,
|
||||
$column_name);
|
||||
@@ -671,6 +678,8 @@ final class PhabricatorConfigDatabaseStatusController
|
||||
),
|
||||
$column->getIssues());
|
||||
|
||||
$properties = $this->buildConfigBoxView(pht('Properties'), $properties);
|
||||
|
||||
return $this->buildResponse($title, $properties);
|
||||
}
|
||||
|
||||
@@ -734,7 +743,7 @@ final class PhabricatorConfigDatabaseStatusController
|
||||
}
|
||||
|
||||
$title = pht(
|
||||
'Database Status: %s.%s (%s)',
|
||||
'%s.%s (%s)',
|
||||
$database_name,
|
||||
$table_name,
|
||||
$key_name);
|
||||
@@ -764,6 +773,8 @@ final class PhabricatorConfigDatabaseStatusController
|
||||
),
|
||||
$key->getIssues());
|
||||
|
||||
$properties = $this->buildConfigBoxView(pht('Properties'), $properties);
|
||||
|
||||
return $this->buildResponse($title, $properties);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ final class PhabricatorConfigEditController
|
||||
$viewer = $request->getViewer();
|
||||
$key = $request->getURIData('key');
|
||||
|
||||
|
||||
$options = PhabricatorApplicationConfigOptions::loadAllOptions();
|
||||
if (empty($options[$key])) {
|
||||
$ancient = PhabricatorExtraConfigSetupCheck::getAncientConfig();
|
||||
@@ -104,44 +103,45 @@ final class PhabricatorConfigEditController
|
||||
$error_view = null;
|
||||
if ($errors) {
|
||||
$error_view = id(new PHUIInfoView())
|
||||
->setSeverity(PHUIInfoView::SEVERITY_ERROR)
|
||||
->setErrors($errors);
|
||||
}
|
||||
|
||||
$doc_href = PhabricatorEnv::getDoclink(
|
||||
'Configuration Guide: Locked and Hidden Configuration');
|
||||
|
||||
$doc_link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $doc_href,
|
||||
'target' => '_blank',
|
||||
),
|
||||
pht('Learn more about locked and hidden options.'));
|
||||
|
||||
$status_items = array();
|
||||
$tag = null;
|
||||
if ($option->getHidden()) {
|
||||
$tag = id(new PHUITagView())
|
||||
->setName(pht('Hidden'))
|
||||
->setColor(PHUITagView::COLOR_GREY)
|
||||
->setBorder(PHUITagView::BORDER_NONE)
|
||||
->setType(PHUITagView::TYPE_SHADE);
|
||||
|
||||
$message = pht(
|
||||
'This configuration is hidden and can not be edited or viewed from '.
|
||||
'the web interface.');
|
||||
|
||||
$status_items[] = id(new PHUIStatusItemView())
|
||||
->setIcon('fa-eye-slash red')
|
||||
->setTarget(phutil_tag('strong', array(), pht('Configuration Hidden')))
|
||||
->setNote($message);
|
||||
$status_items[] = id(new PHUIInfoView())
|
||||
->appendChild(array($message, ' ', $doc_link));
|
||||
} else if ($option->getLocked()) {
|
||||
$tag = id(new PHUITagView())
|
||||
->setName(pht('Locked'))
|
||||
->setColor(PHUITagView::COLOR_RED)
|
||||
->setBorder(PHUITagView::BORDER_NONE)
|
||||
->setType(PHUITagView::TYPE_SHADE);
|
||||
|
||||
$message = $option->getLockedMessage();
|
||||
|
||||
$status_items[] = id(new PHUIStatusItemView())
|
||||
->setIcon('fa-lock red')
|
||||
->setTarget(phutil_tag('strong', array(), pht('Configuration Locked')))
|
||||
->setNote($message);
|
||||
}
|
||||
|
||||
if ($status_items) {
|
||||
$doc_href = PhabricatorEnv::getDoclink(
|
||||
'Configuration Guide: Locked and Hidden Configuration');
|
||||
|
||||
$doc_link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $doc_href,
|
||||
'target' => '_blank',
|
||||
),
|
||||
pht('Configuration Guide: Locked and Hidden Configuration'));
|
||||
|
||||
$status_items[] = id(new PHUIStatusItemView())
|
||||
->setIcon('fa-book')
|
||||
->setTarget(phutil_tag('strong', array(), pht('Learn More')))
|
||||
->setNote($doc_link);
|
||||
$status_items[] = id(new PHUIInfoView())
|
||||
->appendChild(array($message, ' ', $doc_link));
|
||||
}
|
||||
|
||||
if ($option->getHidden() || $option->getLocked()) {
|
||||
@@ -168,18 +168,6 @@ final class PhabricatorConfigEditController
|
||||
->setUser($viewer)
|
||||
->addHiddenInput('issue', $request->getStr('issue'));
|
||||
|
||||
if ($status_items) {
|
||||
$status_view = id(new PHUIStatusListView());
|
||||
|
||||
foreach ($status_items as $status_item) {
|
||||
$status_view->addItem($status_item);
|
||||
}
|
||||
|
||||
$form->appendControl(
|
||||
id(new AphrontFormMarkupControl())
|
||||
->setValue($status_view));
|
||||
}
|
||||
|
||||
$description = $option->getDescription();
|
||||
if (strlen($description)) {
|
||||
$description_view = new PHUIRemarkupView($viewer, $description);
|
||||
@@ -213,56 +201,66 @@ final class PhabricatorConfigEditController
|
||||
->setValue(pht('Save Config Entry')));
|
||||
}
|
||||
|
||||
$current_config = null;
|
||||
if (!$option->getHidden()) {
|
||||
$form->appendChild(
|
||||
id(new AphrontFormMarkupControl())
|
||||
->setLabel(pht('Current Configuration'))
|
||||
->setValue($this->renderDefaults($option, $config_entry)));
|
||||
$current_config = $this->renderDefaults($option, $config_entry);
|
||||
$current_config = $this->buildConfigBoxView(
|
||||
pht('Current Configuration'),
|
||||
$current_config);
|
||||
}
|
||||
|
||||
$examples = $this->renderExamples($option);
|
||||
if ($examples) {
|
||||
$form->appendChild(
|
||||
id(new AphrontFormMarkupControl())
|
||||
->setLabel(pht('Examples'))
|
||||
->setValue($examples));
|
||||
$examples = $this->buildConfigBoxView(
|
||||
pht('Examples'),
|
||||
$examples);
|
||||
}
|
||||
|
||||
$title = pht('Edit Option: %s', $key);
|
||||
$header_icon = 'fa-pencil';
|
||||
$short = pht('Edit');
|
||||
$title = $key;
|
||||
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Config Option'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
if ($error_view) {
|
||||
$form_box->setInfoView($error_view);
|
||||
$box_header = array();
|
||||
if ($group) {
|
||||
$box_header[] = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $group_uri,
|
||||
),
|
||||
$group->getName());
|
||||
$box_header[] = " \xC2\xBB ";
|
||||
}
|
||||
$box_header[] = $key;
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Config'), $this->getApplicationURI());
|
||||
|
||||
if ($group) {
|
||||
$crumbs->addTextCrumb($group->getName(), $group_uri);
|
||||
}
|
||||
|
||||
$crumbs->addTextCrumb($key, '/config/edit/'.$key);
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$form_box = $this->buildConfigBoxView($box_header, $form, $tag);
|
||||
|
||||
$timeline = $this->buildTransactionTimeline(
|
||||
$config_entry,
|
||||
new PhabricatorConfigTransactionQuery());
|
||||
$timeline->setShouldTerminate(true);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon($header_icon);
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter($group_uri);
|
||||
|
||||
$header = $this->buildHeaderView($title);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter($form_box);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn(array(
|
||||
$error_view,
|
||||
$form_box,
|
||||
$status_items,
|
||||
$examples,
|
||||
$current_config,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
@@ -426,7 +424,7 @@ final class PhabricatorConfigEditController
|
||||
}
|
||||
}
|
||||
|
||||
$table[] = phutil_tag('tr', array(), array(
|
||||
$table[] = phutil_tag('tr', array('class' => 'column-labels'), array(
|
||||
phutil_tag('th', array(), $description),
|
||||
phutil_tag('td', array(), $value),
|
||||
));
|
||||
@@ -438,6 +436,8 @@ final class PhabricatorConfigEditController
|
||||
'table',
|
||||
array(
|
||||
'class' => 'config-option-table',
|
||||
'cellspacing' => '0',
|
||||
'cellpadding' => '0',
|
||||
),
|
||||
$table);
|
||||
}
|
||||
@@ -497,6 +497,8 @@ final class PhabricatorConfigEditController
|
||||
'table',
|
||||
array(
|
||||
'class' => 'config-option-table',
|
||||
'cellspacing' => '0',
|
||||
'cellpadding' => '0',
|
||||
),
|
||||
$table);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ final class PhabricatorConfigGroupController
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$group_uri = PhabricatorConfigGroupConstants::getGroupURI(
|
||||
$group_uri = PhabricatorConfigGroupConstants::getGroupFullURI(
|
||||
$options->getGroup());
|
||||
$group_name = PhabricatorConfigGroupConstants::getGroupShortName(
|
||||
$options->getGroup());
|
||||
@@ -22,28 +22,28 @@ final class PhabricatorConfigGroupController
|
||||
$nav->selectFilter($group_uri);
|
||||
|
||||
$title = pht('%s Configuration', $options->getName());
|
||||
$header = $this->buildHeaderView($title);
|
||||
$list = $this->buildOptionList($options->getOptions());
|
||||
$group_url = phutil_tag('a', array('href' => $group_uri), $group_name);
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
$box_header = pht("%s \xC2\xBB %s", $group_url, $options->getName());
|
||||
$view = $this->buildConfigBoxView($box_header, $list);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($group_name, $this->getApplicationURI($group_uri))
|
||||
->addTextCrumb($options->getName())
|
||||
->setBorder(true);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true);
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($list);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($view);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
private function buildOptionList(array $options) {
|
||||
@@ -77,13 +77,11 @@ final class PhabricatorConfigGroupController
|
||||
->setHref('/config/edit/'.$option->getKey().'/')
|
||||
->addAttribute($summary);
|
||||
|
||||
$label = pht('Current Value:');
|
||||
$color = null;
|
||||
$db_value = idx($db_values, $option->getKey());
|
||||
if ($db_value && !$db_value->getIsDeleted()) {
|
||||
$item->setEffect('visited');
|
||||
$color = 'violet';
|
||||
$label = pht('Customized Value:');
|
||||
}
|
||||
|
||||
if ($option->getHidden()) {
|
||||
@@ -91,6 +89,8 @@ final class PhabricatorConfigGroupController
|
||||
$item->setDisabled(true);
|
||||
} else if ($option->getLocked()) {
|
||||
$item->setStatusIcon('fa-lock '.$color, pht('Locked'));
|
||||
} else if ($color) {
|
||||
$item->setStatusIcon('fa-pencil '.$color, pht('Editable'));
|
||||
} else {
|
||||
$item->setStatusIcon('fa-pencil-square-o '.$color, pht('Editable'));
|
||||
}
|
||||
@@ -102,14 +102,13 @@ final class PhabricatorConfigGroupController
|
||||
$current_value = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'config-options-current-value',
|
||||
'class' => 'config-options-current-value '.$color,
|
||||
),
|
||||
array(
|
||||
phutil_tag('span', array(), $label),
|
||||
' '.$current_value,
|
||||
$current_value,
|
||||
));
|
||||
|
||||
$item->appendChild($current_value);
|
||||
$item->setSideColumn($current_value);
|
||||
}
|
||||
|
||||
$list->addItem($item);
|
||||
|
||||
@@ -29,28 +29,25 @@ final class PhabricatorConfigHistoryController
|
||||
$object->willRenderTimeline($timeline, $this->getRequest());
|
||||
|
||||
$title = pht('Settings History');
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb($title);
|
||||
$crumbs->setBorder(true);
|
||||
$header = $this->buildHeaderView($title);
|
||||
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('history/');
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true);
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($timeline);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($timeline);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,34 +43,34 @@ final class PhabricatorConfigIssueListController
|
||||
}
|
||||
|
||||
$title = pht('Setup Issues');
|
||||
$header = $this->buildHeaderView($title);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true);
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
->addTextCrumb(pht('Setup Issues'))
|
||||
->setBorder(true);
|
||||
|
||||
$page = array(
|
||||
$no_issues,
|
||||
$issue_list = array(
|
||||
$important,
|
||||
$php,
|
||||
$mysql,
|
||||
$other,
|
||||
);
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$issue_list = $this->buildConfigBoxView(pht('Issues'), $issue_list);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($page);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn(array(
|
||||
$no_issues,
|
||||
$issue_list,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
private function buildIssueList(array $issues, $group, $fonticon) {
|
||||
|
||||
@@ -36,6 +36,8 @@ final class PhabricatorConfigIssueViewController
|
||||
$title = $issue->getShortName();
|
||||
}
|
||||
|
||||
$header = $this->buildHeaderView($title);
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
->setBorder(true)
|
||||
@@ -43,12 +45,16 @@ final class PhabricatorConfigIssueViewController
|
||||
->addTextCrumb($title, $request->getRequestURI())
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($content);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
private function renderIssue(PhabricatorSetupIssue $issue) {
|
||||
|
||||
@@ -11,28 +11,25 @@ final class PhabricatorConfigListController
|
||||
|
||||
$groups = PhabricatorApplicationConfigOptions::loadAll();
|
||||
$core_list = $this->buildConfigOptionsList($groups, 'core');
|
||||
$core_list = $this->buildConfigBoxView(pht('Core'), $core_list);
|
||||
|
||||
$title = pht('Core Settings');
|
||||
$header = $this->buildHeaderView($title);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true);
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
->addTextCrumb(pht('Core'))
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($core_list);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($core_list);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
private function buildConfigOptionsList(array $groups, $type) {
|
||||
|
||||
@@ -16,27 +16,26 @@ final class PhabricatorConfigModuleController
|
||||
$content = $module->renderModuleStatus($request);
|
||||
$title = $module->getModuleName();
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb($title);
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('module/'.$key.'/');
|
||||
$header = $this->buildHeaderView($title);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true);
|
||||
$view = $this->buildConfigBoxView($title, $content);
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($content);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($view);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,31 +7,30 @@ final class PhabricatorConfigVersionController
|
||||
$viewer = $request->getViewer();
|
||||
|
||||
$title = pht('Version Information');
|
||||
|
||||
$crumbs = $this
|
||||
->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$versions = $this->renderModuleStatus($viewer);
|
||||
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('version/');
|
||||
$header = $this->buildHeaderView($title);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setProfileHeader(true);
|
||||
$view = $this->buildConfigBoxView(
|
||||
pht('Installed Versions'),
|
||||
$versions);
|
||||
|
||||
$content = id(new PhabricatorConfigPageView())
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb($title)
|
||||
->setBorder(true);
|
||||
|
||||
$content = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setContent($versions);
|
||||
->setNavigation($nav)
|
||||
->setFixed(true)
|
||||
->setMainColumn($view);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($content)
|
||||
->addClass('white-background');
|
||||
->appendChild($content);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorConfigPageView extends AphrontTagView {
|
||||
|
||||
private $header;
|
||||
private $content;
|
||||
private $footer;
|
||||
|
||||
public function setHeader(PHUIHeaderView $header) {
|
||||
$this->header = $header;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setContent($content) {
|
||||
$this->content = $content;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setFooter($footer) {
|
||||
$this->footer = $footer;
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function getTagName() {
|
||||
return 'div';
|
||||
}
|
||||
|
||||
protected function getTagAttributes() {
|
||||
require_celerity_resource('config-page-css');
|
||||
|
||||
$classes = array();
|
||||
$classes[] = 'config-page';
|
||||
|
||||
return array(
|
||||
'class' => implode(' ', $classes),
|
||||
);
|
||||
}
|
||||
|
||||
protected function getTagContent() {
|
||||
|
||||
$header = null;
|
||||
if ($this->header) {
|
||||
$header = phutil_tag_div('config-page-header', $this->header);
|
||||
}
|
||||
|
||||
$content = null;
|
||||
if ($this->content) {
|
||||
$content = phutil_tag_div('config-page-content', $this->content);
|
||||
}
|
||||
|
||||
$footer = null;
|
||||
if ($this->footer) {
|
||||
$footer = phutil_tag_div('config-page-footer', $this->footer);
|
||||
}
|
||||
|
||||
return array($header, $content, $footer);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -35,6 +35,7 @@ final class PHUIObjectBoxView extends AphrontTagView {
|
||||
|
||||
const BLUE = 'phui-box-blue';
|
||||
const BLUE_PROPERTY = 'phui-box-blue-property';
|
||||
const WHITE_CONFIG = 'phui-box-white-config';
|
||||
const GREY = 'phui-box-grey';
|
||||
|
||||
public function addPropertyList(PHUIPropertyListView $property_list) {
|
||||
|
||||
Reference in New Issue
Block a user