Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15468250
D14894.id35991.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
7 KB
Referenced Files
None
Subscribers
None
D14894.id35991.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2863,6 +2863,7 @@
'PhabricatorProjectMembersEditController' => 'applications/project/controller/PhabricatorProjectMembersEditController.php',
'PhabricatorProjectMembersPolicyRule' => 'applications/project/policyrule/PhabricatorProjectMembersPolicyRule.php',
'PhabricatorProjectMembersRemoveController' => 'applications/project/controller/PhabricatorProjectMembersRemoveController.php',
+ 'PhabricatorProjectMilestonesController' => 'applications/project/controller/PhabricatorProjectMilestonesController.php',
'PhabricatorProjectMoveController' => 'applications/project/controller/PhabricatorProjectMoveController.php',
'PhabricatorProjectNameContextFreeGrammar' => 'applications/project/lipsum/PhabricatorProjectNameContextFreeGrammar.php',
'PhabricatorProjectNoProjectsDatasource' => 'applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php',
@@ -2882,6 +2883,7 @@
'PhabricatorProjectSlug' => 'applications/project/storage/PhabricatorProjectSlug.php',
'PhabricatorProjectStandardCustomField' => 'applications/project/customfield/PhabricatorProjectStandardCustomField.php',
'PhabricatorProjectStatus' => 'applications/project/constants/PhabricatorProjectStatus.php',
+ 'PhabricatorProjectSubprojectsController' => 'applications/project/controller/PhabricatorProjectSubprojectsController.php',
'PhabricatorProjectTestDataGenerator' => 'applications/project/lipsum/PhabricatorProjectTestDataGenerator.php',
'PhabricatorProjectTransaction' => 'applications/project/storage/PhabricatorProjectTransaction.php',
'PhabricatorProjectTransactionEditor' => 'applications/project/editor/PhabricatorProjectTransactionEditor.php',
@@ -7205,6 +7207,7 @@
'PhabricatorProjectMembersEditController' => 'PhabricatorProjectController',
'PhabricatorProjectMembersPolicyRule' => 'PhabricatorPolicyRule',
'PhabricatorProjectMembersRemoveController' => 'PhabricatorProjectController',
+ 'PhabricatorProjectMilestonesController' => 'PhabricatorProjectController',
'PhabricatorProjectMoveController' => 'PhabricatorProjectController',
'PhabricatorProjectNameContextFreeGrammar' => 'PhutilContextFreeGrammar',
'PhabricatorProjectNoProjectsDatasource' => 'PhabricatorTypeaheadDatasource',
@@ -7227,6 +7230,7 @@
'PhabricatorStandardCustomFieldInterface',
),
'PhabricatorProjectStatus' => 'Phobject',
+ 'PhabricatorProjectSubprojectsController' => 'PhabricatorProjectController',
'PhabricatorProjectTestDataGenerator' => 'PhabricatorTestDataGenerator',
'PhabricatorProjectTransaction' => 'PhabricatorApplicationTransaction',
'PhabricatorProjectTransactionEditor' => 'PhabricatorApplicationTransactionEditor',
diff --git a/src/applications/project/application/PhabricatorProjectApplication.php b/src/applications/project/application/PhabricatorProjectApplication.php
--- a/src/applications/project/application/PhabricatorProjectApplication.php
+++ b/src/applications/project/application/PhabricatorProjectApplication.php
@@ -60,6 +60,10 @@
'picture/(?P<id>[1-9]\d*)/'
=> 'PhabricatorProjectEditPictureController',
'create/' => 'PhabricatorProjectEditDetailsController',
+ 'subprojects/(?P<id>[1-9]\d*)/'
+ => 'PhabricatorProjectSubprojectsController',
+ 'milestones/(?P<id>[1-9]\d*)/'
+ => 'PhabricatorProjectMilestonesController',
'board/(?P<id>[1-9]\d*)/'.
'(?P<filter>filter/)?'.
'(?:query/(?P<queryKey>[^/]+)/)?'
diff --git a/src/applications/project/controller/PhabricatorProjectController.php b/src/applications/project/controller/PhabricatorProjectController.php
--- a/src/applications/project/controller/PhabricatorProjectController.php
+++ b/src/applications/project/controller/PhabricatorProjectController.php
@@ -151,6 +151,12 @@
$nav->addIcon("members/{$id}/", pht('Members'), 'fa-group');
$nav->addIcon("details/{$id}/", pht('Edit Details'), 'fa-pencil');
+ if (PhabricatorEnv::getEnvConfig('phabricator.show-prototypes')) {
+ $nav->addIcon("subprojects/{$id}/", pht('Subprojects'), 'fa-sitemap');
+ $nav->addIcon("milestones/{$id}/", pht('Milestones'), 'fa-map-marker');
+ }
+
+
return $nav;
}
diff --git a/src/applications/project/controller/PhabricatorProjectFeedController.php b/src/applications/project/controller/PhabricatorProjectFeedController.php
--- a/src/applications/project/controller/PhabricatorProjectFeedController.php
+++ b/src/applications/project/controller/PhabricatorProjectFeedController.php
@@ -35,7 +35,6 @@
$nav = $this->buildIconNavView($project);
$nav->selectFilter("feed/{$id}/");
- $nav->appendChild($box);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Feed'));
diff --git a/src/applications/project/controller/PhabricatorProjectMilestonesController.php b/src/applications/project/controller/PhabricatorProjectMilestonesController.php
new file mode 100644
--- /dev/null
+++ b/src/applications/project/controller/PhabricatorProjectMilestonesController.php
@@ -0,0 +1,33 @@
+<?php
+
+final class PhabricatorProjectMilestonesController
+ extends PhabricatorProjectController {
+
+ public function shouldAllowPublic() {
+ return true;
+ }
+
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+
+ $response = $this->loadProject();
+ if ($response) {
+ return $response;
+ }
+
+ $project = $this->getProject();
+ $id = $project->getID();
+
+ $nav = $this->buildIconNavView($project);
+ $nav->selectFilter("milestones/{$id}/");
+
+ $crumbs = $this->buildApplicationCrumbs();
+ $crumbs->addTextCrumb(pht('Milestones'));
+
+ return $this->newPage()
+ ->setNavigation($nav)
+ ->setCrumbs($crumbs)
+ ->setTitle(array($project->getName(), pht('Milestones')));
+ }
+
+}
diff --git a/src/applications/project/controller/PhabricatorProjectSubprojectsController.php b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php
new file mode 100644
--- /dev/null
+++ b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php
@@ -0,0 +1,33 @@
+<?php
+
+final class PhabricatorProjectSubprojectsController
+ extends PhabricatorProjectController {
+
+ public function shouldAllowPublic() {
+ return true;
+ }
+
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+
+ $response = $this->loadProject();
+ if ($response) {
+ return $response;
+ }
+
+ $project = $this->getProject();
+ $id = $project->getID();
+
+ $nav = $this->buildIconNavView($project);
+ $nav->selectFilter("subprojects/{$id}/");
+
+ $crumbs = $this->buildApplicationCrumbs();
+ $crumbs->addTextCrumb(pht('Subprojects'));
+
+ return $this->newPage()
+ ->setNavigation($nav)
+ ->setCrumbs($crumbs)
+ ->setTitle(array($project->getName(), pht('Subprojects')));
+ }
+
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 4, 10:20 PM (2 d, 36 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7722067
Default Alt Text
D14894.id35991.diff (7 KB)
Attached To
Mode
D14894: Add empty subproject/milestone controllers
Attached
Detach File
Event Timeline
Log In to Comment