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:
@@ -401,17 +401,11 @@ final class PhabricatorAuthRegisterController
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
|
||||
if ($is_setup) {
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName(pht('Setup Admin Account')));
|
||||
$crumbs->addTextCrumb(pht('Setup Admin Account'));
|
||||
$title = pht('Welcome to Phabricator');
|
||||
} else {
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName(pht('Register')));
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName($provider->getProviderName()));
|
||||
$crumbs->addTextCrumb(pht('Register'));
|
||||
$crumbs->addTextCrumb($provider->getProviderName());
|
||||
$title = pht('Phabricator Registration');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user