1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 11:12:42 +01:00
phorge-phorge/src/applications/config/controller/PhabricatorConfigModuleController.php
Chad Little 57e606b395 Update Settings/Config UI
Summary: Testing out a new 'nav' layout in Settings / Config. Spent a few days here and couldn't find much better overall.

Test Plan: View each page in Settings and in Config. Save some config options. Test mobile, desktop, tablet.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15659
2016-04-08 22:00:38 +00:00

37 lines
910 B
PHP

<?php
final class PhabricatorConfigModuleController
extends PhabricatorConfigController {
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
$key = $request->getURIData('module');
$all_modules = PhabricatorConfigModule::getAllModules();
if (empty($all_modules[$key])) {
return new Aphront404Response();
}
$module = $all_modules[$key];
$content = $module->renderModuleStatus($request);
$title = $module->getModuleName();
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($title);
$nav = $this->buildSideNavView();
$nav->selectFilter('module/'.$key.'/');
$view = id(new PHUITwoColumnView())
->setNavigation($nav)
->setMainColumn(array(
$content,
));
return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->appendChild($view);
}
}