Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2682509
D25687.1734662117.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
2 KB
Referenced Files
None
Subscribers
None
D25687.1734662117.diff
View Options
diff --git a/src/applications/people/controller/PhabricatorPeopleController.php b/src/applications/people/controller/PhabricatorPeopleController.php
--- a/src/applications/people/controller/PhabricatorPeopleController.php
+++ b/src/applications/people/controller/PhabricatorPeopleController.php
@@ -6,39 +6,33 @@
return true;
}
+ /**
+ * return AphrontSideNavFilterView
+ */
public function buildSideNavView($for_app = false) {
+ // we are on /people/*
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
- $name = null;
- if ($for_app) {
- $name = $this->getRequest()->getURIData('username');
- if ($name) {
- $nav->setBaseURI(new PhutilURI('/p/'));
- $nav->addFilter("{$name}/", $name);
- if (id(new PhabricatorCalendarApplication())->isInstalled()) {
- $nav->addFilter("{$name}/calendar/", pht('Calendar'));
- }
- }
- }
+ $viewer = $this->getRequest()->getUser();
+ id(new PhabricatorPeopleSearchEngine())
+ ->setViewer($viewer)
+ ->addNavigationItems($nav->getMenu());
- if (!$name) {
- $viewer = $this->getRequest()->getUser();
- id(new PhabricatorPeopleSearchEngine())
- ->setViewer($viewer)
- ->addNavigationItems($nav->getMenu());
-
- if ($viewer->getIsAdmin()) {
- $nav->addLabel(pht('User Administration'));
- $nav->addFilter('logs', pht('Activity Logs'));
- $nav->addFilter('invite', pht('Email Invitations'));
- }
+ if ($viewer->getIsAdmin()) {
+ $nav->addLabel(pht('User Administration'));
+ $nav->addFilter('logs', pht('Activity Logs'));
+ $nav->addFilter('invite', pht('Email Invitations'));
}
return $nav;
}
public function buildApplicationMenu() {
+ if ($this->getRequest()->getURIData('username')) {
+ // we are on /p/name/ so return the default user profile sidebar
+ return parent::buildApplicationMenu();
+ }
return $this->buildSideNavView(true)->getMenu();
}
diff --git a/src/applications/search/engine/PhabricatorProfileMenuEngine.php b/src/applications/search/engine/PhabricatorProfileMenuEngine.php
--- a/src/applications/search/engine/PhabricatorProfileMenuEngine.php
+++ b/src/applications/search/engine/PhabricatorProfileMenuEngine.php
@@ -87,6 +87,9 @@
abstract public function getItemURI($path);
abstract protected function isMenuEngineConfigurable();
+ /**
+ * @return array of PhabricatorProfileMenuItemConfiguration objects
+ */
abstract protected function getBuiltinProfileItems($object);
protected function getBuiltinCustomProfileItems(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 02:35 (21 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1016400
Default Alt Text
D25687.1734662117.diff (2 KB)
Attached To
Mode
D25687: Display same items in mobile menu on User Profile page as on desktop
Attached
Detach File
Event Timeline
Log In to Comment