mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-01 11:12:42 +01:00
57e606b395
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
37 lines
910 B
PHP
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);
|
|
}
|
|
|
|
}
|