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:
@@ -51,19 +51,20 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
|
||||
$properties = $this->buildPropertyView($paste, $fork_phids);
|
||||
$source_code = $this->buildSourceCodeView($paste, $file);
|
||||
|
||||
$nav = $this->buildSideNavView($paste);
|
||||
$nav->selectFilter('paste');
|
||||
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView())
|
||||
->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName('P'.$paste->getID())
|
||||
->setHref('/P'.$paste->getID()));
|
||||
|
||||
$nav->appendChild(
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$header,
|
||||
$actions,
|
||||
$properties,
|
||||
$source_code,
|
||||
));
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
$nav,
|
||||
),
|
||||
array(
|
||||
'title' => $paste->getFullName(),
|
||||
'device' => true,
|
||||
@@ -87,6 +88,7 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
|
||||
PhabricatorPolicyCapability::CAN_EDIT);
|
||||
|
||||
$can_fork = $user->isLoggedIn();
|
||||
$fork_uri = $this->getApplicationURI('/create/?parent='.$paste->getID());
|
||||
|
||||
return id(new PhabricatorActionListView())
|
||||
->setUser($user)
|
||||
@@ -97,7 +99,7 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
|
||||
->setIcon('fork')
|
||||
->setDisabled(!$can_fork)
|
||||
->setWorkflow(!$can_fork)
|
||||
->setHref($this->getApplicationURI('?parent='.$paste->getID())))
|
||||
->setHref($fork_uri))
|
||||
->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('View Raw File'))
|
||||
|
||||
Reference in New Issue
Block a user