1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 02:02:41 +01:00
phorge-phorge/src/applications/config/controller/PhabricatorConfigAllController.php
Chad Little 34076fae38 Config style updates.
Summary: Minor spacing tweaks to Config app. Added label for consistency.

Test Plan: Review pages in the Config app for spacing.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4523
2013-01-18 18:08:06 -08:00

75 lines
1.7 KiB
PHP

<?php
final class PhabricatorConfigAllController
extends PhabricatorConfigController {
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$rows = array();
$options = PhabricatorApplicationConfigOptions::loadAllOptions();
ksort($options);
foreach ($options as $option) {
$key = $option->getKey();
if ($option->getMasked()) {
$value = '<em>'.pht('Masked').'</em>';
} else if ($option->getHidden()) {
$value = '<em>'.pht('Hidden').'</em>';
} else {
$value = PhabricatorEnv::getEnvConfig($key);
$value = PhabricatorConfigJSON::prettyPrintJSON($value);
$value = phutil_escape_html($value);
}
$rows[] = array(
phutil_render_tag(
'a',
array(
'href' => $this->getApplicationURI('edit/'.$key.'/'),
),
phutil_escape_html($key)),
$value,
);
}
$table = id(new AphrontTableView($rows))
->setDeviceReadyTable(true)
->setColumnClasses(
array(
'',
'wide',
))
->setHeaders(
array(
pht('Key'),
pht('Value'),
));
$title = pht('Current Settings');
$crumbs = $this
->buildApplicationCrumbs()
->addCrumb(
id(new PhabricatorCrumbView())
->setName($title));
$panel = new AphrontPanelView();
$panel->appendChild($table);
$panel->setNoBackground();
$nav = $this->buildSideNavView();
$nav->selectFilter('all/');
$nav->setCrumbs($crumbs);
$nav->appendChild($panel);
return $this->buildApplicationPage(
$nav,
array(
'title' => $title,
'device' => true,
)
);
}
}