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:
epriestley
2013-12-18 17:47:34 -08:00
parent dc43123494
commit a5dc9067af
154 changed files with 304 additions and 770 deletions

View File

@@ -107,21 +107,16 @@ final class PhrictionDiffController
$crumbs->addCrumb($view);
}
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('History'))
->setHref(PhrictionDocument::getSlugURI($slug, 'history')));
$crumbs->addTextCrumb(
pht('History'),
PhrictionDocument::getSlugURI($slug, 'history'));
$title = pht("Version %s vs %s", $l, $r);
$header = id(new PHUIHeaderView())
->setHeader($title);
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName($title)
->setHref($request->getRequestURI()));
$crumbs->addTextCrumb($title, $request->getRequestURI());
$comparison_table = $this->renderComparisonTable(