Put some crumbs on some project pages
Summary: Ref T10010. This is primarily to make "Parent > Child > Grandchild" navigation more manageable for subprojects, at least for now. Test Plan: Viewed profile, members, feed; saw crumbs. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10010 Differential Revision: https://secure.phabricator.com/D14891
This commit is contained in:
@@ -154,4 +154,22 @@ abstract class PhabricatorProjectController extends PhabricatorController {
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user