Add a breadcrumbs element
Summary:
Add a basic breadcrumbs element, and implement it in Paste.
This needs some polish but is most of the way there.
Test Plan:
{F26443}
{F26444}
{F26445}
(This element is not visible on devices.)
Reviewers: chad
Reviewed By: chad
CC: aran, btrahan
Maniphest Tasks: T1960
Differential Revision: https://secure.phabricator.com/D4087
This commit is contained in:
@@ -247,4 +247,28 @@ abstract class PhabricatorController extends AphrontController {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function buildApplicationCrumbs() {
|
||||
|
||||
$crumbs = array();
|
||||
|
||||
$application = $this->getCurrentApplication();
|
||||
if ($application) {
|
||||
$sprite = $application->getAutospriteName();
|
||||
if (!$sprite) {
|
||||
$sprite = 'default';
|
||||
}
|
||||
|
||||
$crumbs[] = id(new PhabricatorCrumbView())
|
||||
->setHref($this->getApplicationURI())
|
||||
->setIcon('temporary-icon-apps');
|
||||
}
|
||||
|
||||
$view = new PhabricatorCrumbsView();
|
||||
foreach ($crumbs as $crumb) {
|
||||
$view->addCrumb($crumb);
|
||||
}
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user