1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 20:40:56 +01:00

Make "Home" a formal application

Summary: Ref T3979. Currently, the home page lives in an old application called "directory" and is informally defined. Make it a real application called "Home", with a formal definition. It isn't launchable and can't be uninstalled.

Test Plan: Loaded home, saw exact same stuff.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T3979

Differential Revision: https://secure.phabricator.com/D8074
This commit is contained in:
epriestley 2014-01-26 12:26:13 -08:00
parent e26fbbf973
commit 6fdbc406b7
5 changed files with 40 additions and 10 deletions

View file

@ -1087,6 +1087,7 @@ phutil_register_library_map(array(
'PhabricatorApplicationFlags' => 'applications/flag/application/PhabricatorApplicationFlags.php',
'PhabricatorApplicationHarbormaster' => 'applications/harbormaster/application/PhabricatorApplicationHarbormaster.php',
'PhabricatorApplicationHerald' => 'applications/herald/application/PhabricatorApplicationHerald.php',
'PhabricatorApplicationHome' => 'applications/home/application/PhabricatorApplicationHome.php',
'PhabricatorApplicationLaunchView' => 'applications/meta/view/PhabricatorApplicationLaunchView.php',
'PhabricatorApplicationLegalpad' => 'applications/legalpad/application/PhabricatorApplicationLegalpad.php',
'PhabricatorApplicationMacro' => 'applications/macro/application/PhabricatorApplicationMacro.php',
@ -1385,8 +1386,6 @@ phutil_register_library_map(array(
'PhabricatorDifferentialConfigOptions' => 'applications/differential/config/PhabricatorDifferentialConfigOptions.php',
'PhabricatorDifferentialRevisionTestDataGenerator' => 'applications/differential/lipsum/PhabricatorDifferentialRevisionTestDataGenerator.php',
'PhabricatorDiffusionConfigOptions' => 'applications/diffusion/config/PhabricatorDiffusionConfigOptions.php',
'PhabricatorDirectoryController' => 'applications/directory/controller/PhabricatorDirectoryController.php',
'PhabricatorDirectoryMainController' => 'applications/directory/controller/PhabricatorDirectoryMainController.php',
'PhabricatorDisabledUserController' => 'applications/auth/controller/PhabricatorDisabledUserController.php',
'PhabricatorDisqusConfigOptions' => 'applications/config/option/PhabricatorDisqusConfigOptions.php',
'PhabricatorDraft' => 'applications/draft/storage/PhabricatorDraft.php',
@ -1528,6 +1527,8 @@ phutil_register_library_map(array(
'PhabricatorHashTestCase' => 'infrastructure/util/__tests__/PhabricatorHashTestCase.php',
'PhabricatorHelpController' => 'applications/help/controller/PhabricatorHelpController.php',
'PhabricatorHelpKeyboardShortcutController' => 'applications/help/controller/PhabricatorHelpKeyboardShortcutController.php',
'PhabricatorHomeController' => 'applications/home/controller/PhabricatorHomeController.php',
'PhabricatorHomeMainController' => 'applications/home/controller/PhabricatorHomeMainController.php',
'PhabricatorHovercardExample' => 'applications/uiexample/examples/PhabricatorHovercardExample.php',
'PhabricatorHovercardView' => 'view/widget/hovercard/PhabricatorHovercardView.php',
'PhabricatorIRCBot' => 'infrastructure/daemon/bot/PhabricatorIRCBot.php',
@ -3671,6 +3672,7 @@ phutil_register_library_map(array(
'PhabricatorApplicationFlags' => 'PhabricatorApplication',
'PhabricatorApplicationHarbormaster' => 'PhabricatorApplication',
'PhabricatorApplicationHerald' => 'PhabricatorApplication',
'PhabricatorApplicationHome' => 'PhabricatorApplication',
'PhabricatorApplicationLaunchView' => 'AphrontView',
'PhabricatorApplicationLegalpad' => 'PhabricatorApplication',
'PhabricatorApplicationMacro' => 'PhabricatorApplication',
@ -4010,8 +4012,6 @@ phutil_register_library_map(array(
'PhabricatorDifferentialConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorDifferentialRevisionTestDataGenerator' => 'PhabricatorTestDataGenerator',
'PhabricatorDiffusionConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorDirectoryController' => 'PhabricatorController',
'PhabricatorDirectoryMainController' => 'PhabricatorDirectoryController',
'PhabricatorDisabledUserController' => 'PhabricatorAuthController',
'PhabricatorDisqusConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorDraft' => 'PhabricatorDraftDAO',
@ -4173,6 +4173,8 @@ phutil_register_library_map(array(
'PhabricatorHashTestCase' => 'PhabricatorTestCase',
'PhabricatorHelpController' => 'PhabricatorController',
'PhabricatorHelpKeyboardShortcutController' => 'PhabricatorHelpController',
'PhabricatorHomeController' => 'PhabricatorController',
'PhabricatorHomeMainController' => 'PhabricatorHomeController',
'PhabricatorHovercardExample' => 'PhabricatorUIExample',
'PhabricatorHovercardView' => 'AphrontView',
'PhabricatorIRCBot' => 'PhabricatorDaemon',

View file

@ -16,9 +16,6 @@ class AphrontDefaultApplicationConfiguration
public function getURIMap() {
return $this->getResourceURIMapRules() + array(
'/(?:(?P<filter>(?:jump))/)?' =>
'PhabricatorDirectoryMainController',
'/typeahead/' => array(
'common/(?P<type>\w+)/'
=> 'PhabricatorTypeaheadCommonDatasourceController',

View file

@ -0,0 +1,31 @@
<?php
final class PhabricatorApplicationHome extends PhabricatorApplication {
public function getBaseURI() {
return '/';
}
public function getShortDescription() {
return pht('Where the Heart Is');
}
public function getIconName() {
return 'home';
}
public function getRoutes() {
return array(
'/(?:(?P<filter>(?:jump))/)?' => 'PhabricatorHomeMainController',
);
}
public function shouldAppearInLaunchView() {
return false;
}
public function canUninstall() {
return false;
}
}

View file

@ -1,6 +1,6 @@
<?php
abstract class PhabricatorDirectoryController extends PhabricatorController {
abstract class PhabricatorHomeController extends PhabricatorController {
public function buildStandardPageResponse($view, array $data) {
$page = $this->buildStandardPageView();

View file

@ -1,7 +1,7 @@
<?php
final class PhabricatorDirectoryMainController
extends PhabricatorDirectoryController {
final class PhabricatorHomeMainController
extends PhabricatorHomeController {
private $filter;
private $minipanels = array();