Page MenuHomePhabricator

D15189.diff
No OneTemporary

D15189.diff

diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
@@ -149,8 +149,8 @@
return $this->newPage()
->setTitle(
array(
+ $project->getDisplayName(),
pht('Workboard'),
- $project->getName(),
))
->setNavigation($nav)
->setCrumbs($crumbs)
@@ -371,7 +371,11 @@
$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)
diff --git a/src/applications/project/controller/PhabricatorProjectManageController.php b/src/applications/project/controller/PhabricatorProjectManageController.php
--- a/src/applications/project/controller/PhabricatorProjectManageController.php
+++ b/src/applications/project/controller/PhabricatorProjectManageController.php
@@ -51,7 +51,11 @@
return $this->newPage()
->setNavigation($nav)
->setCrumbs($crumbs)
- ->setTitle($project->getName())
+ ->setTitle(
+ array(
+ $project->getDisplayName(),
+ pht('Manage'),
+ ))
->appendChild(
array(
$object_box,
diff --git a/src/applications/project/controller/PhabricatorProjectMembersViewController.php b/src/applications/project/controller/PhabricatorProjectMembersViewController.php
--- a/src/applications/project/controller/PhabricatorProjectMembersViewController.php
+++ b/src/applications/project/controller/PhabricatorProjectMembersViewController.php
@@ -48,7 +48,7 @@
return $this->newPage()
->setNavigation($nav)
->setCrumbs($crumbs)
- ->setTitle(array($project->getName(), $title))
+ ->setTitle(array($project->getDisplayName(), $title))
->appendChild(
array(
$object_box,
diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php
--- a/src/applications/project/controller/PhabricatorProjectProfileController.php
+++ b/src/applications/project/controller/PhabricatorProjectProfileController.php
@@ -115,7 +115,7 @@
return $this->newPage()
->setNavigation($nav)
->setCrumbs($crumbs)
- ->setTitle($project->getName())
+ ->setTitle($project->getDisplayName())
->setPageObjectPHIDs(array($project->getPHID()))
->appendChild(
array(
diff --git a/src/applications/project/events/PhabricatorProjectUIEventListener.php b/src/applications/project/events/PhabricatorProjectUIEventListener.php
--- a/src/applications/project/events/PhabricatorProjectUIEventListener.php
+++ b/src/applications/project/events/PhabricatorProjectUIEventListener.php
@@ -67,11 +67,13 @@
$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);
diff --git a/src/applications/project/phid/PhabricatorProjectProjectPHIDType.php b/src/applications/project/phid/PhabricatorProjectProjectPHIDType.php
--- a/src/applications/project/phid/PhabricatorProjectProjectPHIDType.php
+++ b/src/applications/project/phid/PhabricatorProjectProjectPHIDType.php
@@ -37,7 +37,7 @@
foreach ($handles as $phid => $handle) {
$project = $objects[$phid];
- $name = $project->getName();
+ $name = $project->getDisplayName();
$id = $project->getID();
$slug = $project->getPrimarySlug();
diff --git a/src/applications/project/storage/PhabricatorProject.php b/src/applications/project/storage/PhabricatorProject.php
--- a/src/applications/project/storage/PhabricatorProject.php
+++ b/src/applications/project/storage/PhabricatorProject.php
@@ -490,6 +490,20 @@
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();
diff --git a/src/applications/project/typeahead/PhabricatorProjectDatasource.php b/src/applications/project/typeahead/PhabricatorProjectDatasource.php
--- a/src/applications/project/typeahead/PhabricatorProjectDatasource.php
+++ b/src/applications/project/typeahead/PhabricatorProjectDatasource.php
@@ -64,12 +64,12 @@
}
$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())

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 6, 8:17 AM (3 w, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7734208
Default Alt Text
D15189.diff (5 KB)

Event Timeline