2016-08-22 10:36:23 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
final class PhabricatorConfigApplicationController
|
|
|
|
|
extends PhabricatorConfigController {
|
|
|
|
|
|
|
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
|
|
|
$viewer = $request->getViewer();
|
|
|
|
|
|
|
|
|
|
$nav = $this->buildSideNavView();
|
|
|
|
|
$nav->selectFilter('application/');
|
|
|
|
|
|
|
|
|
|
$groups = PhabricatorApplicationConfigOptions::loadAll();
|
|
|
|
|
$apps_list = $this->buildConfigOptionsList($groups, 'apps');
|
2017-09-05 15:21:12 -07:00
|
|
|
$apps_list = $this->buildConfigBoxView(pht('Applications'), $apps_list);
|
2016-08-22 10:36:23 -07:00
|
|
|
|
Redesign Config Application
Summary: Ref T11132, significantly cleans up the Config app, new layout, icons, spacing, etc. Some minor todos around re-designing "issues", mobile support, and maybe another pass at actual Group pages.
Test Plan: Visit and test every page in the config app, set new items, resolve setup issues, etc.
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam, Korvin
Maniphest Tasks: T11132
Differential Revision: https://secure.phabricator.com/D16468
2016-08-29 15:36:13 -07:00
|
|
|
$title = pht('Application Settings');
|
2017-09-05 15:21:12 -07:00
|
|
|
$header = $this->buildHeaderView($title);
|
2016-08-22 10:36:23 -07:00
|
|
|
|
2017-09-05 15:21:12 -07:00
|
|
|
$content = id(new PHUITwoColumnView())
|
|
|
|
|
->setHeader($header)
|
|
|
|
|
->setNavigation($nav)
|
|
|
|
|
->setFixed(true)
|
|
|
|
|
->setMainColumn($apps_list);
|
2016-08-22 10:36:23 -07:00
|
|
|
|
2017-09-05 15:21:12 -07:00
|
|
|
$crumbs = $this->buildApplicationCrumbs()
|
|
|
|
|
->addTextCrumb($title)
|
Redesign Config Application
Summary: Ref T11132, significantly cleans up the Config app, new layout, icons, spacing, etc. Some minor todos around re-designing "issues", mobile support, and maybe another pass at actual Group pages.
Test Plan: Visit and test every page in the config app, set new items, resolve setup issues, etc.
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam, Korvin
Maniphest Tasks: T11132
Differential Revision: https://secure.phabricator.com/D16468
2016-08-29 15:36:13 -07:00
|
|
|
->setBorder(true);
|
2016-08-22 10:36:23 -07:00
|
|
|
|
|
|
|
|
return $this->newPage()
|
|
|
|
|
->setTitle($title)
|
|
|
|
|
->setCrumbs($crumbs)
|
2017-09-05 15:21:12 -07:00
|
|
|
->appendChild($content);
|
2016-08-22 10:36:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function buildConfigOptionsList(array $groups, $type) {
|
|
|
|
|
assert_instances_of($groups, 'PhabricatorApplicationConfigOptions');
|
|
|
|
|
|
|
|
|
|
$list = new PHUIObjectItemListView();
|
Redesign Config Application
Summary: Ref T11132, significantly cleans up the Config app, new layout, icons, spacing, etc. Some minor todos around re-designing "issues", mobile support, and maybe another pass at actual Group pages.
Test Plan: Visit and test every page in the config app, set new items, resolve setup issues, etc.
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam, Korvin
Maniphest Tasks: T11132
Differential Revision: https://secure.phabricator.com/D16468
2016-08-29 15:36:13 -07:00
|
|
|
$list->setBig(true);
|
2016-08-22 10:36:23 -07:00
|
|
|
$groups = msort($groups, 'getName');
|
|
|
|
|
foreach ($groups as $group) {
|
|
|
|
|
if ($group->getGroup() == $type) {
|
Redesign Config Application
Summary: Ref T11132, significantly cleans up the Config app, new layout, icons, spacing, etc. Some minor todos around re-designing "issues", mobile support, and maybe another pass at actual Group pages.
Test Plan: Visit and test every page in the config app, set new items, resolve setup issues, etc.
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam, Korvin
Maniphest Tasks: T11132
Differential Revision: https://secure.phabricator.com/D16468
2016-08-29 15:36:13 -07:00
|
|
|
$icon = id(new PHUIIconView())
|
|
|
|
|
->setIcon($group->getIcon())
|
|
|
|
|
->setBackground('bg-violet');
|
2016-08-22 10:36:23 -07:00
|
|
|
$item = id(new PHUIObjectItemView())
|
|
|
|
|
->setHeader($group->getName())
|
|
|
|
|
->setHref('/config/group/'.$group->getKey().'/')
|
|
|
|
|
->addAttribute($group->getDescription())
|
Redesign Config Application
Summary: Ref T11132, significantly cleans up the Config app, new layout, icons, spacing, etc. Some minor todos around re-designing "issues", mobile support, and maybe another pass at actual Group pages.
Test Plan: Visit and test every page in the config app, set new items, resolve setup issues, etc.
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam, Korvin
Maniphest Tasks: T11132
Differential Revision: https://secure.phabricator.com/D16468
2016-08-29 15:36:13 -07:00
|
|
|
->setImageIcon($icon);
|
2016-08-22 10:36:23 -07:00
|
|
|
$list->addItem($item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|