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:
@@ -47,10 +47,9 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
|
||||
$timeline = $this->buildTransactionView($file, $xactions);
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->setActionList($actions);
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName('F'.$file->getID())
|
||||
->setHref($this->getApplicationURI("/info/{$phid}/")));
|
||||
$crumbs->addTextCrumb(
|
||||
'F'.$file->getID(),
|
||||
$this->getApplicationURI("/info/{$phid}/"));
|
||||
|
||||
$object_box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header);
|
||||
|
||||
Reference in New Issue
Block a user