@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Carve out a separate "Modules/Extensions" section of Config

Summary:
Ref T13362. Config is currently doing a ton of stuff and fairly overwhelming. Separate out "Modules/Extensions" so it can live in its own section.

(This stuff is mostly useful for development and normal users rarely need to end up here.)

Test Plan: Visited seciton, clicked around. This is just a visual change.

Maniphest Tasks: T13362

Differential Revision: https://secure.phabricator.com/D20930

+22 -10
+1 -1
src/applications/config/application/PhabricatorConfigApplication.php
··· 63 63 'purge/' => 'PhabricatorConfigPurgeCacheController', 64 64 ), 65 65 'module/' => array( 66 - '(?P<module>[^/]+)/' => 'PhabricatorConfigModuleController', 66 + '(?:(?P<module>[^/]+)/)?' => 'PhabricatorConfigModuleController', 67 67 ), 68 68 'cluster/' => array( 69 69 'databases/' => 'PhabricatorConfigClusterDatabasesController',
-7
src/applications/config/controller/PhabricatorConfigController.php
··· 42 42 pht('Repository Servers'), null, 'fa-code'); 43 43 $nav->addFilter('cluster/search/', 44 44 pht('Search Servers'), null, 'fa-search'); 45 - $nav->addLabel(pht('Modules')); 46 - 47 - $modules = PhabricatorConfigModule::getAllModules(); 48 - foreach ($modules as $key => $module) { 49 - $nav->addFilter('module/'.$key.'/', 50 - $module->getModuleName(), null, 'fa-puzzle-piece'); 51 - } 52 45 53 46 return $nav; 54 47 }
+21 -2
src/applications/config/controller/PhabricatorConfigModuleController.php
··· 8 8 $key = $request->getURIData('module'); 9 9 10 10 $all_modules = PhabricatorConfigModule::getAllModules(); 11 + 12 + if (!strlen($key)) { 13 + $key = head_key($all_modules); 14 + } 15 + 11 16 if (empty($all_modules[$key])) { 12 17 return new Aphront404Response(); 13 18 } ··· 16 21 $content = $module->renderModuleStatus($request); 17 22 $title = $module->getModuleName(); 18 23 19 - $nav = $this->buildSideNavView(); 20 - $nav->selectFilter('module/'.$key.'/'); 24 + $nav = new AphrontSideNavFilterView(); 25 + $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); 26 + 27 + $modules_uri = $this->getApplicationURI('module/'); 28 + 29 + $modules = PhabricatorConfigModule::getAllModules(); 30 + 31 + foreach ($modules as $module_key => $module) { 32 + $nav->newLink($module_key) 33 + ->setName($module->getModuleName()) 34 + ->setHref(urisprintf('%s%s/', $modules_uri, $module_key)) 35 + ->setIcon('fa-puzzle-piece'); 36 + } 37 + 38 + $nav->selectFilter($key); 21 39 $header = $this->buildHeaderView($title); 22 40 23 41 $view = $this->buildConfigBoxView($title, $content); 24 42 25 43 $crumbs = $this->buildApplicationCrumbs() 44 + ->addTextCrumb(pht('Extensions/Modules'), $modules_uri) 26 45 ->addTextCrumb($title) 27 46 ->setBorder(true); 28 47