mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +01:00
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
This commit is contained in:
parent
8e7e999cc3
commit
5092bcf533
8 changed files with 33 additions and 9 deletions
|
@ -149,8 +149,8 @@ final class PhabricatorProjectBoardViewController
|
|||
return $this->newPage()
|
||||
->setTitle(
|
||||
array(
|
||||
$project->getDisplayName(),
|
||||
pht('Workboard'),
|
||||
$project->getName(),
|
||||
))
|
||||
->setNavigation($nav)
|
||||
->setCrumbs($crumbs)
|
||||
|
@ -371,7 +371,11 @@ final class PhabricatorProjectBoardViewController
|
|||
$crumbs->addAction($manage_menu);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(pht('%s Board', $project->getName()))
|
||||
->setTitle(
|
||||
array(
|
||||
$project->getDisplayName(),
|
||||
pht('Workboard'),
|
||||
))
|
||||
->setPageObjectPHIDs(array($project->getPHID()))
|
||||
->setShowFooter(false)
|
||||
->setNavigation($nav)
|
||||
|
|
|
@ -51,7 +51,11 @@ final class PhabricatorProjectManageController
|
|||
return $this->newPage()
|
||||
->setNavigation($nav)
|
||||
->setCrumbs($crumbs)
|
||||
->setTitle($project->getName())
|
||||
->setTitle(
|
||||
array(
|
||||
$project->getDisplayName(),
|
||||
pht('Manage'),
|
||||
))
|
||||
->appendChild(
|
||||
array(
|
||||
$object_box,
|
||||
|
|
|
@ -48,7 +48,7 @@ final class PhabricatorProjectMembersViewController
|
|||
return $this->newPage()
|
||||
->setNavigation($nav)
|
||||
->setCrumbs($crumbs)
|
||||
->setTitle(array($project->getName(), $title))
|
||||
->setTitle(array($project->getDisplayName(), $title))
|
||||
->appendChild(
|
||||
array(
|
||||
$object_box,
|
||||
|
|
|
@ -115,7 +115,7 @@ final class PhabricatorProjectProfileController
|
|||
return $this->newPage()
|
||||
->setNavigation($nav)
|
||||
->setCrumbs($crumbs)
|
||||
->setTitle($project->getName())
|
||||
->setTitle($project->getDisplayName())
|
||||
->setPageObjectPHIDs(array($project->getPHID()))
|
||||
->appendChild(
|
||||
array(
|
||||
|
|
|
@ -67,11 +67,13 @@ final class PhabricatorProjectUIEventListener
|
|||
|
||||
$annotation = array();
|
||||
foreach ($columns as $column) {
|
||||
$project_id = $column->getProject()->getID();
|
||||
|
||||
$column_name = pht('(%s)', $column->getDisplayName());
|
||||
$column_link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $handle->getURI().'board/',
|
||||
'href' => "/project/board/{$project_id}/",
|
||||
'class' => 'maniphest-board-link',
|
||||
),
|
||||
$column_name);
|
||||
|
|
|
@ -37,7 +37,7 @@ final class PhabricatorProjectProjectPHIDType extends PhabricatorPHIDType {
|
|||
foreach ($handles as $phid => $handle) {
|
||||
$project = $objects[$phid];
|
||||
|
||||
$name = $project->getName();
|
||||
$name = $project->getDisplayName();
|
||||
$id = $project->getID();
|
||||
$slug = $project->getPrimarySlug();
|
||||
|
||||
|
|
|
@ -490,6 +490,20 @@ final class PhabricatorProject extends PhabricatorProjectDAO
|
|||
return $number;
|
||||
}
|
||||
|
||||
public function getDisplayName() {
|
||||
$name = $this->getName();
|
||||
|
||||
// If this is a milestone, show it as "Parent > Sprint 99".
|
||||
if ($this->isMilestone()) {
|
||||
$name = pht(
|
||||
'%s (%s)',
|
||||
$this->getParentProject()->getName(),
|
||||
$name);
|
||||
}
|
||||
|
||||
return $name;
|
||||
}
|
||||
|
||||
public function getDisplayIconKey() {
|
||||
if ($this->isMilestone()) {
|
||||
$key = PhabricatorProjectIconSet::getMilestoneIconKey();
|
||||
|
|
|
@ -64,12 +64,12 @@ final class PhabricatorProjectDatasource
|
|||
}
|
||||
|
||||
$all_strings = mpull($proj->getSlugs(), 'getSlug');
|
||||
$all_strings[] = $proj->getName();
|
||||
$all_strings[] = $proj->getDisplayName();
|
||||
$all_strings = implode(' ', $all_strings);
|
||||
|
||||
$proj_result = id(new PhabricatorTypeaheadResult())
|
||||
->setName($all_strings)
|
||||
->setDisplayName($proj->getName())
|
||||
->setDisplayName($proj->getDisplayName())
|
||||
->setDisplayType(pht('Project'))
|
||||
->setURI($proj->getURI())
|
||||
->setPHID($proj->getPHID())
|
||||
|
|
Loading…
Reference in a new issue