Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14317460
D20930.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D20930.diff
View Options
diff --git a/src/applications/config/application/PhabricatorConfigApplication.php b/src/applications/config/application/PhabricatorConfigApplication.php
--- a/src/applications/config/application/PhabricatorConfigApplication.php
+++ b/src/applications/config/application/PhabricatorConfigApplication.php
@@ -63,7 +63,7 @@
'purge/' => 'PhabricatorConfigPurgeCacheController',
),
'module/' => array(
- '(?P<module>[^/]+)/' => 'PhabricatorConfigModuleController',
+ '(?:(?P<module>[^/]+)/)?' => 'PhabricatorConfigModuleController',
),
'cluster/' => array(
'databases/' => 'PhabricatorConfigClusterDatabasesController',
diff --git a/src/applications/config/controller/PhabricatorConfigController.php b/src/applications/config/controller/PhabricatorConfigController.php
--- a/src/applications/config/controller/PhabricatorConfigController.php
+++ b/src/applications/config/controller/PhabricatorConfigController.php
@@ -42,13 +42,6 @@
pht('Repository Servers'), null, 'fa-code');
$nav->addFilter('cluster/search/',
pht('Search Servers'), null, 'fa-search');
- $nav->addLabel(pht('Modules'));
-
- $modules = PhabricatorConfigModule::getAllModules();
- foreach ($modules as $key => $module) {
- $nav->addFilter('module/'.$key.'/',
- $module->getModuleName(), null, 'fa-puzzle-piece');
- }
return $nav;
}
diff --git a/src/applications/config/controller/PhabricatorConfigModuleController.php b/src/applications/config/controller/PhabricatorConfigModuleController.php
--- a/src/applications/config/controller/PhabricatorConfigModuleController.php
+++ b/src/applications/config/controller/PhabricatorConfigModuleController.php
@@ -8,6 +8,11 @@
$key = $request->getURIData('module');
$all_modules = PhabricatorConfigModule::getAllModules();
+
+ if (!strlen($key)) {
+ $key = head_key($all_modules);
+ }
+
if (empty($all_modules[$key])) {
return new Aphront404Response();
}
@@ -16,13 +21,27 @@
$content = $module->renderModuleStatus($request);
$title = $module->getModuleName();
- $nav = $this->buildSideNavView();
- $nav->selectFilter('module/'.$key.'/');
+ $nav = new AphrontSideNavFilterView();
+ $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
+
+ $modules_uri = $this->getApplicationURI('module/');
+
+ $modules = PhabricatorConfigModule::getAllModules();
+
+ foreach ($modules as $module_key => $module) {
+ $nav->newLink($module_key)
+ ->setName($module->getModuleName())
+ ->setHref(urisprintf('%s%s/', $modules_uri, $module_key))
+ ->setIcon('fa-puzzle-piece');
+ }
+
+ $nav->selectFilter($key);
$header = $this->buildHeaderView($title);
$view = $this->buildConfigBoxView($title, $content);
$crumbs = $this->buildApplicationCrumbs()
+ ->addTextCrumb(pht('Extensions/Modules'), $modules_uri)
->addTextCrumb($title)
->setBorder(true);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 8:07 AM (20 h, 52 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6906756
Default Alt Text
D20930.diff (2 KB)
Attached To
Mode
D20930: Carve out a separate "Modules/Extensions" section of Config
Attached
Detach File
Event Timeline
Log In to Comment