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:
@@ -173,27 +173,35 @@ final class PhabricatorPasteEditController extends PhabricatorPasteController {
|
||||
|
||||
if (!$is_create) {
|
||||
$submit->addCancelButton($paste->getURI());
|
||||
$submit->setValue('Save Paste');
|
||||
$title = 'Edit '.$paste->getFullName();
|
||||
$submit->setValue(pht('Save Paste'));
|
||||
$title = pht('Edit %s', $paste->getFullName());
|
||||
$short = pht('Edit');
|
||||
} else {
|
||||
$submit->setValue('Create Paste');
|
||||
$title = 'Create Paste';
|
||||
$submit->setValue(pht('Create Paste'));
|
||||
$title = pht('Create Paste');
|
||||
$short = pht('Create');
|
||||
}
|
||||
|
||||
$form
|
||||
->appendChild($submit);
|
||||
|
||||
$nav = $this->buildSideNavView();
|
||||
$nav->selectFilter('edit');
|
||||
$nav->appendChild(
|
||||
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
|
||||
if (!$is_create) {
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName('P'.$paste->getID())
|
||||
->setHref('/P'.$paste->getID()));
|
||||
}
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())->setName($short));
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
id(new PhabricatorHeaderView())->setHeader($title),
|
||||
$error_view,
|
||||
$form,
|
||||
));
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
$nav,
|
||||
),
|
||||
array(
|
||||
'title' => $title,
|
||||
'device' => true,
|
||||
|
||||
Reference in New Issue
Block a user