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:
epriestley
2012-12-07 13:35:17 -08:00
parent f910e38ecc
commit 1c9a6be979
18 changed files with 354 additions and 179 deletions

View File

@@ -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;
}
}