Page MenuHomePhabricator

D14891.id.diff
No OneTemporary

D14891.id.diff

diff --git a/src/applications/project/controller/PhabricatorProjectController.php b/src/applications/project/controller/PhabricatorProjectController.php
--- a/src/applications/project/controller/PhabricatorProjectController.php
+++ b/src/applications/project/controller/PhabricatorProjectController.php
@@ -154,4 +154,22 @@
return $nav;
}
+ protected function buildApplicationCrumbs() {
+ $crumbs = parent::buildApplicationCrumbs();
+
+ $project = $this->getProject();
+ if ($project) {
+ $ancestors = $project->getAncestorProjects();
+ $ancestors = array_reverse($ancestors);
+ $ancestors[] = $project;
+ foreach ($ancestors as $ancestor) {
+ $crumbs->addTextCrumb(
+ $project->getName(),
+ $project->getURI());
+ }
+ }
+
+ return $crumbs;
+ }
+
}
diff --git a/src/applications/project/controller/PhabricatorProjectFeedController.php b/src/applications/project/controller/PhabricatorProjectFeedController.php
--- a/src/applications/project/controller/PhabricatorProjectFeedController.php
+++ b/src/applications/project/controller/PhabricatorProjectFeedController.php
@@ -37,11 +37,14 @@
$nav->selectFilter("feed/{$id}/");
$nav->appendChild($box);
- return $this->buildApplicationPage(
- $nav,
- array(
- 'title' => $project->getName(),
- ));
+ $crumbs = $this->buildApplicationCrumbs();
+ $crumbs->addTextCrumb(pht('Feed'));
+
+ return $this->newPage()
+ ->setNavigation($nav)
+ ->setCrumbs($crumbs)
+ ->setTitle(array($project->getName(), pht('Feed')))
+ ->appendChild($box);
}
private function renderStories(array $stories) {
diff --git a/src/applications/project/controller/PhabricatorProjectMembersEditController.php b/src/applications/project/controller/PhabricatorProjectMembersEditController.php
--- a/src/applications/project/controller/PhabricatorProjectMembersEditController.php
+++ b/src/applications/project/controller/PhabricatorProjectMembersEditController.php
@@ -95,14 +95,16 @@
$nav = $this->buildIconNavView($project);
$nav->selectFilter("members/{$id}/");
- $nav->appendChild($form_box);
- $nav->appendChild($member_list);
-
- return $this->buildApplicationPage(
- $nav,
- array(
- 'title' => $title,
- ));
+
+ $crumbs = $this->buildApplicationCrumbs();
+ $crumbs->addTextCrumb(pht('Members'));
+
+ return $this->newPage()
+ ->setNavigation($nav)
+ ->setCrumbs($crumbs)
+ ->setTitle(array($project->getName(), $title))
+ ->appendChild($form_box)
+ ->appendChild($member_list);
}
private function renderMemberList(
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
@@ -46,8 +46,11 @@
$nav = $this->buildIconNavView($project);
$nav->selectFilter("profile/{$id}/");
+ $crumbs = $this->buildApplicationCrumbs();
+
return $this->newPage()
->setNavigation($nav)
+ ->setCrumbs($crumbs)
->setTitle($project->getName())
->setPageObjectPHIDs(array($project->getPHID()))
->appendChild($object_box)
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
@@ -308,6 +308,11 @@
return $this->color;
}
+ public function getURI() {
+ $id = $this->getID();
+ return "/project/view/{$id}/";
+ }
+
public function save() {
if (!$this->getMailKey()) {
$this->setMailKey(Filesystem::readRandomCharacters(20));

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 20, 7:36 PM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6710581
Default Alt Text
D14891.id.diff (3 KB)

Event Timeline