Add empty subproject/milestone controllers
Summary: Ref T10010. These do nothing yet. Test Plan: Clicked 'em. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10010 Differential Revision: https://secure.phabricator.com/D14894
This commit is contained in:
@@ -2864,6 +2864,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorProjectMembersEditController' => 'applications/project/controller/PhabricatorProjectMembersEditController.php',
|
'PhabricatorProjectMembersEditController' => 'applications/project/controller/PhabricatorProjectMembersEditController.php',
|
||||||
'PhabricatorProjectMembersPolicyRule' => 'applications/project/policyrule/PhabricatorProjectMembersPolicyRule.php',
|
'PhabricatorProjectMembersPolicyRule' => 'applications/project/policyrule/PhabricatorProjectMembersPolicyRule.php',
|
||||||
'PhabricatorProjectMembersRemoveController' => 'applications/project/controller/PhabricatorProjectMembersRemoveController.php',
|
'PhabricatorProjectMembersRemoveController' => 'applications/project/controller/PhabricatorProjectMembersRemoveController.php',
|
||||||
|
'PhabricatorProjectMilestonesController' => 'applications/project/controller/PhabricatorProjectMilestonesController.php',
|
||||||
'PhabricatorProjectMoveController' => 'applications/project/controller/PhabricatorProjectMoveController.php',
|
'PhabricatorProjectMoveController' => 'applications/project/controller/PhabricatorProjectMoveController.php',
|
||||||
'PhabricatorProjectNameContextFreeGrammar' => 'applications/project/lipsum/PhabricatorProjectNameContextFreeGrammar.php',
|
'PhabricatorProjectNameContextFreeGrammar' => 'applications/project/lipsum/PhabricatorProjectNameContextFreeGrammar.php',
|
||||||
'PhabricatorProjectNoProjectsDatasource' => 'applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php',
|
'PhabricatorProjectNoProjectsDatasource' => 'applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php',
|
||||||
@@ -2883,6 +2884,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorProjectSlug' => 'applications/project/storage/PhabricatorProjectSlug.php',
|
'PhabricatorProjectSlug' => 'applications/project/storage/PhabricatorProjectSlug.php',
|
||||||
'PhabricatorProjectStandardCustomField' => 'applications/project/customfield/PhabricatorProjectStandardCustomField.php',
|
'PhabricatorProjectStandardCustomField' => 'applications/project/customfield/PhabricatorProjectStandardCustomField.php',
|
||||||
'PhabricatorProjectStatus' => 'applications/project/constants/PhabricatorProjectStatus.php',
|
'PhabricatorProjectStatus' => 'applications/project/constants/PhabricatorProjectStatus.php',
|
||||||
|
'PhabricatorProjectSubprojectsController' => 'applications/project/controller/PhabricatorProjectSubprojectsController.php',
|
||||||
'PhabricatorProjectTestDataGenerator' => 'applications/project/lipsum/PhabricatorProjectTestDataGenerator.php',
|
'PhabricatorProjectTestDataGenerator' => 'applications/project/lipsum/PhabricatorProjectTestDataGenerator.php',
|
||||||
'PhabricatorProjectTransaction' => 'applications/project/storage/PhabricatorProjectTransaction.php',
|
'PhabricatorProjectTransaction' => 'applications/project/storage/PhabricatorProjectTransaction.php',
|
||||||
'PhabricatorProjectTransactionEditor' => 'applications/project/editor/PhabricatorProjectTransactionEditor.php',
|
'PhabricatorProjectTransactionEditor' => 'applications/project/editor/PhabricatorProjectTransactionEditor.php',
|
||||||
@@ -7207,6 +7209,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorProjectMembersEditController' => 'PhabricatorProjectController',
|
'PhabricatorProjectMembersEditController' => 'PhabricatorProjectController',
|
||||||
'PhabricatorProjectMembersPolicyRule' => 'PhabricatorPolicyRule',
|
'PhabricatorProjectMembersPolicyRule' => 'PhabricatorPolicyRule',
|
||||||
'PhabricatorProjectMembersRemoveController' => 'PhabricatorProjectController',
|
'PhabricatorProjectMembersRemoveController' => 'PhabricatorProjectController',
|
||||||
|
'PhabricatorProjectMilestonesController' => 'PhabricatorProjectController',
|
||||||
'PhabricatorProjectMoveController' => 'PhabricatorProjectController',
|
'PhabricatorProjectMoveController' => 'PhabricatorProjectController',
|
||||||
'PhabricatorProjectNameContextFreeGrammar' => 'PhutilContextFreeGrammar',
|
'PhabricatorProjectNameContextFreeGrammar' => 'PhutilContextFreeGrammar',
|
||||||
'PhabricatorProjectNoProjectsDatasource' => 'PhabricatorTypeaheadDatasource',
|
'PhabricatorProjectNoProjectsDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||||
@@ -7229,6 +7232,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorStandardCustomFieldInterface',
|
'PhabricatorStandardCustomFieldInterface',
|
||||||
),
|
),
|
||||||
'PhabricatorProjectStatus' => 'Phobject',
|
'PhabricatorProjectStatus' => 'Phobject',
|
||||||
|
'PhabricatorProjectSubprojectsController' => 'PhabricatorProjectController',
|
||||||
'PhabricatorProjectTestDataGenerator' => 'PhabricatorTestDataGenerator',
|
'PhabricatorProjectTestDataGenerator' => 'PhabricatorTestDataGenerator',
|
||||||
'PhabricatorProjectTransaction' => 'PhabricatorApplicationTransaction',
|
'PhabricatorProjectTransaction' => 'PhabricatorApplicationTransaction',
|
||||||
'PhabricatorProjectTransactionEditor' => 'PhabricatorApplicationTransactionEditor',
|
'PhabricatorProjectTransactionEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
|
|||||||
@@ -60,6 +60,10 @@ final class PhabricatorProjectApplication extends PhabricatorApplication {
|
|||||||
'picture/(?P<id>[1-9]\d*)/'
|
'picture/(?P<id>[1-9]\d*)/'
|
||||||
=> 'PhabricatorProjectEditPictureController',
|
=> 'PhabricatorProjectEditPictureController',
|
||||||
'create/' => 'PhabricatorProjectEditDetailsController',
|
'create/' => 'PhabricatorProjectEditDetailsController',
|
||||||
|
'subprojects/(?P<id>[1-9]\d*)/'
|
||||||
|
=> 'PhabricatorProjectSubprojectsController',
|
||||||
|
'milestones/(?P<id>[1-9]\d*)/'
|
||||||
|
=> 'PhabricatorProjectMilestonesController',
|
||||||
'board/(?P<id>[1-9]\d*)/'.
|
'board/(?P<id>[1-9]\d*)/'.
|
||||||
'(?P<filter>filter/)?'.
|
'(?P<filter>filter/)?'.
|
||||||
'(?:query/(?P<queryKey>[^/]+)/)?'
|
'(?:query/(?P<queryKey>[^/]+)/)?'
|
||||||
|
|||||||
@@ -151,6 +151,12 @@ abstract class PhabricatorProjectController extends PhabricatorController {
|
|||||||
$nav->addIcon("members/{$id}/", pht('Members'), 'fa-group');
|
$nav->addIcon("members/{$id}/", pht('Members'), 'fa-group');
|
||||||
$nav->addIcon("details/{$id}/", pht('Edit Details'), 'fa-pencil');
|
$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;
|
return $nav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ final class PhabricatorProjectFeedController
|
|||||||
|
|
||||||
$nav = $this->buildIconNavView($project);
|
$nav = $this->buildIconNavView($project);
|
||||||
$nav->selectFilter("feed/{$id}/");
|
$nav->selectFilter("feed/{$id}/");
|
||||||
$nav->appendChild($box);
|
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb(pht('Feed'));
|
$crumbs->addTextCrumb(pht('Feed'));
|
||||||
|
|||||||
@@ -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')));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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')));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user