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

Fix dead column link and provide more milestone UI context

Summary:
Fixes T10287. Ref T10286.

- Link stuff properly.
- Generally, show "Parent (Milestone)" instead of "Milestone".
- This probably doesn't get 100% of `getName()` -> `getDisplayName()` swaps, but we can get those as we catch them.

Test Plan: See T10286. Also clicked stuff.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10286, T10287

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

+33 -9
+6 -2
src/applications/project/controller/PhabricatorProjectBoardViewController.php
··· 149 149 return $this->newPage() 150 150 ->setTitle( 151 151 array( 152 + $project->getDisplayName(), 152 153 pht('Workboard'), 153 - $project->getName(), 154 154 )) 155 155 ->setNavigation($nav) 156 156 ->setCrumbs($crumbs) ··· 371 371 $crumbs->addAction($manage_menu); 372 372 373 373 return $this->newPage() 374 - ->setTitle(pht('%s Board', $project->getName())) 374 + ->setTitle( 375 + array( 376 + $project->getDisplayName(), 377 + pht('Workboard'), 378 + )) 375 379 ->setPageObjectPHIDs(array($project->getPHID())) 376 380 ->setShowFooter(false) 377 381 ->setNavigation($nav)
+5 -1
src/applications/project/controller/PhabricatorProjectManageController.php
··· 51 51 return $this->newPage() 52 52 ->setNavigation($nav) 53 53 ->setCrumbs($crumbs) 54 - ->setTitle($project->getName()) 54 + ->setTitle( 55 + array( 56 + $project->getDisplayName(), 57 + pht('Manage'), 58 + )) 55 59 ->appendChild( 56 60 array( 57 61 $object_box,
+1 -1
src/applications/project/controller/PhabricatorProjectMembersViewController.php
··· 48 48 return $this->newPage() 49 49 ->setNavigation($nav) 50 50 ->setCrumbs($crumbs) 51 - ->setTitle(array($project->getName(), $title)) 51 + ->setTitle(array($project->getDisplayName(), $title)) 52 52 ->appendChild( 53 53 array( 54 54 $object_box,
+1 -1
src/applications/project/controller/PhabricatorProjectProfileController.php
··· 115 115 return $this->newPage() 116 116 ->setNavigation($nav) 117 117 ->setCrumbs($crumbs) 118 - ->setTitle($project->getName()) 118 + ->setTitle($project->getDisplayName()) 119 119 ->setPageObjectPHIDs(array($project->getPHID())) 120 120 ->appendChild( 121 121 array(
+3 -1
src/applications/project/events/PhabricatorProjectUIEventListener.php
··· 67 67 68 68 $annotation = array(); 69 69 foreach ($columns as $column) { 70 + $project_id = $column->getProject()->getID(); 71 + 70 72 $column_name = pht('(%s)', $column->getDisplayName()); 71 73 $column_link = phutil_tag( 72 74 'a', 73 75 array( 74 - 'href' => $handle->getURI().'board/', 76 + 'href' => "/project/board/{$project_id}/", 75 77 'class' => 'maniphest-board-link', 76 78 ), 77 79 $column_name);
+1 -1
src/applications/project/phid/PhabricatorProjectProjectPHIDType.php
··· 37 37 foreach ($handles as $phid => $handle) { 38 38 $project = $objects[$phid]; 39 39 40 - $name = $project->getName(); 40 + $name = $project->getDisplayName(); 41 41 $id = $project->getID(); 42 42 $slug = $project->getPrimarySlug(); 43 43
+14
src/applications/project/storage/PhabricatorProject.php
··· 490 490 return $number; 491 491 } 492 492 493 + public function getDisplayName() { 494 + $name = $this->getName(); 495 + 496 + // If this is a milestone, show it as "Parent > Sprint 99". 497 + if ($this->isMilestone()) { 498 + $name = pht( 499 + '%s (%s)', 500 + $this->getParentProject()->getName(), 501 + $name); 502 + } 503 + 504 + return $name; 505 + } 506 + 493 507 public function getDisplayIconKey() { 494 508 if ($this->isMilestone()) { 495 509 $key = PhabricatorProjectIconSet::getMilestoneIconKey();
+2 -2
src/applications/project/typeahead/PhabricatorProjectDatasource.php
··· 64 64 } 65 65 66 66 $all_strings = mpull($proj->getSlugs(), 'getSlug'); 67 - $all_strings[] = $proj->getName(); 67 + $all_strings[] = $proj->getDisplayName(); 68 68 $all_strings = implode(' ', $all_strings); 69 69 70 70 $proj_result = id(new PhabricatorTypeaheadResult()) 71 71 ->setName($all_strings) 72 - ->setDisplayName($proj->getName()) 72 + ->setDisplayName($proj->getDisplayName()) 73 73 ->setDisplayType(pht('Project')) 74 74 ->setURI($proj->getURI()) 75 75 ->setPHID($proj->getPHID())