Files
phabricator/src/applications/config/controller/settings/PhabricatorConfigSettingsController.php
epriestley 530145ba3b Give "Config" a full-width, hierarchical layout
Summary:
Depends on D20933. Ref T13362. This reorganizes Config a bit and attempts to simplify it.

Subsections are now in a landing page console and groupings have been removed. We "only" have 75 values you can edit from the web UI nowadays, which is still a lot, but less overwhelming than it was in the past. And the trend is generally downward, as config is removed/simplified or moved into application settings.

This also gets rid of the "gigantic blobs of JSON in the UI".

Test Plan: Browsed all Config sections.

Maniphest Tasks: T13362

Differential Revision: https://secure.phabricator.com/D20934
2020-02-04 06:59:51 -08:00

52 lines
1.3 KiB
PHP

<?php
abstract class PhabricatorConfigSettingsController
extends PhabricatorConfigController {
public function newNavigation($select_filter) {
$settings_uri = $this->getApplicationURI('settings/');
$nav = id(new AphrontSideNavFilterView())
->setBaseURI(new PhutilURI($settings_uri));
$nav->addLabel(pht('Configuration'));
$nav->newLink('settings')
->setName(pht('Core Settings'))
->setIcon('fa-wrench')
->setHref($settings_uri);
$nav->newLink('advanced')
->setName(pht('Advanced Settings'))
->setIcon('fa-cogs')
->setHref(urisprintf('%s%s/', $settings_uri, 'advanced'));
$nav->newLink('all')
->setName(pht('All Settings'))
->setIcon('fa-list')
->setHref(urisprintf('%s%s/', $settings_uri, 'all'));
$nav->addLabel(pht('History'));
$nav->newLink('history')
->setName(pht('View History'))
->setIcon('fa-history')
->setHref(urisprintf('%s%s/', $settings_uri, 'history'));
if ($select_filter) {
$nav->selectFilter($select_filter);
}
return $nav;
}
public function newCrumbs() {
$settings_uri = $this->getApplicationURI('settings/');
return $this->buildApplicationCrumbs()
->addTextCrumb(pht('Settings'), $settings_uri)
->setBorder(true);
}
}