@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.

Put "Subprojects" on top of "Milestones" in the Project UI

Summary:
Depends on D19550. Ref T13164. See T12144#226172, mostly. We get some requests to make milestones reorderable, but in most cases users probably wanted subprojects, not milestones.

One reason to end up here is that we put "Milestones" on top. Instead, put "Subprojects" on top, since they're the less specialized option and we aren't terribly consistent about it anyway.

Test Plan: Viewed project subprojects page, saw "Subprojects" above "Milestones".

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13164

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

+31 -32
+31 -32
src/applications/project/controller/PhabricatorProjectSubprojectsController.php
··· 106 106 ->addClass('project-view-people-home') 107 107 ->setMainColumn(array( 108 108 $info_view, 109 - $milestone_list, 110 109 $subproject_list, 110 + $milestone_list, 111 111 )); 112 112 113 113 return $this->newPage() ··· 132 132 $project, 133 133 PhabricatorPolicyCapability::CAN_EDIT); 134 134 135 - $allows_milestones = $project->supportsMilestones(); 136 135 $allows_subprojects = $project->supportsSubprojects(); 136 + $allows_milestones = $project->supportsMilestones(); 137 137 138 138 $curtain = $this->newCurtainView(); 139 139 140 - if ($allows_milestones && $milestones) { 141 - $milestone_text = pht('Create Next Milestone'); 142 - } else { 143 - $milestone_text = pht('Create Milestone'); 144 - } 145 - 146 - $can_milestone = ($can_create && $can_edit && $allows_milestones); 147 - $milestone_href = "/project/edit/?milestone={$id}"; 148 - 149 - $curtain->addAction( 150 - id(new PhabricatorActionView()) 151 - ->setName($milestone_text) 152 - ->setIcon('fa-plus') 153 - ->setHref($milestone_href) 154 - ->setDisabled(!$can_milestone) 155 - ->setWorkflow(!$can_milestone)); 156 - 157 140 $can_subproject = ($can_create && $can_edit && $allows_subprojects); 158 141 159 142 // If we're offering to create the first subproject, we're going to warn ··· 176 159 ->setDisabled($subproject_disabled) 177 160 ->setWorkflow($subproject_workflow)); 178 161 162 + if ($allows_milestones && $milestones) { 163 + $milestone_text = pht('Create Next Milestone'); 164 + } else { 165 + $milestone_text = pht('Create Milestone'); 166 + } 179 167 180 - if (!$project->supportsMilestones()) { 168 + $can_milestone = ($can_create && $can_edit && $allows_milestones); 169 + $milestone_href = "/project/edit/?milestone={$id}"; 170 + 171 + $curtain->addAction( 172 + id(new PhabricatorActionView()) 173 + ->setName($milestone_text) 174 + ->setIcon('fa-plus') 175 + ->setHref($milestone_href) 176 + ->setDisabled(!$can_milestone) 177 + ->setWorkflow(!$can_milestone)); 178 + 179 + if (!$project->supportsSubprojects()) { 181 180 $note = pht( 182 - 'This project is already a milestone, and milestones may not '. 183 - 'have their own milestones.'); 181 + 'This project is a milestone, and milestones may not have '. 182 + 'subprojects.'); 184 183 } else { 185 - if (!$milestones) { 186 - $note = pht('Milestones can be created for this project.'); 184 + if (!$subprojects) { 185 + $note = pht('Subprojects can be created for this project.'); 187 186 } else { 188 - $note = pht('This project has milestones.'); 187 + $note = pht('This project has subprojects.'); 189 188 } 190 189 } 191 190 192 191 $curtain->newPanel() 193 - ->setHeaderText(pht('Milestones')) 192 + ->setHeaderText(pht('Subprojects')) 194 193 ->appendChild($note); 195 194 196 195 if (!$project->supportsSubprojects()) { 197 196 $note = pht( 198 - 'This project is a milestone, and milestones may not have '. 199 - 'subprojects.'); 197 + 'This project is already a milestone, and milestones may not '. 198 + 'have their own milestones.'); 200 199 } else { 201 - if (!$subprojects) { 202 - $note = pht('Subprojects can be created for this project.'); 200 + if (!$milestones) { 201 + $note = pht('Milestones can be created for this project.'); 203 202 } else { 204 - $note = pht('This project has subprojects.'); 203 + $note = pht('This project has milestones.'); 205 204 } 206 205 } 207 206 208 207 $curtain->newPanel() 209 - ->setHeaderText(pht('Subprojects')) 208 + ->setHeaderText(pht('Milestones')) 210 209 ->appendChild($note); 211 210 212 211 return $curtain;