Provide convenience method addTextCrumb() to PhabricatorCrumbsView
Summary: We currently have a lot of calls to `addCrumb(id(new PhabricatorCrumbView())->...)` which can be expressed much more simply with a convenience method. Nearly all crumbs are only textual. Test Plan: - This was mostly automated, then I cleaned up a few unusual sites manually. - Bunch of grep / randomly clicking around. Reviewers: btrahan, chad Reviewed By: btrahan CC: hach-que, aran Differential Revision: https://secure.phabricator.com/D7787
This commit is contained in:
@@ -37,14 +37,11 @@ final class PhabricatorProjectHistoryController
|
||||
->setObjectPHID($project->getPHID())
|
||||
->setTransactions($xactions);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName($project->getName())
|
||||
->setHref($this->getApplicationURI("view/{$id}/")));
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName(pht('History')));
|
||||
$crumbs = $this->buildApplicationCrumbs()
|
||||
->addTextCrumb(
|
||||
$project->getName(),
|
||||
$this->getApplicationURI("view/{$id}/"))
|
||||
->addTextCrumb(pht('History'));
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user