1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 02:12:41 +01:00

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

@ -70,13 +70,8 @@ final class PhabricatorAuthConfirmLinkController
$dialog->appendChild($form); $dialog->appendChild($form);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Confirm Link'), $panel_uri);
id(new PhabricatorCrumbView()) $crumbs->addTextCrumb($provider->getProviderName());
->setName(pht('Confirm Link'))
->setHref($panel_uri));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName($provider->getProviderName()));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -115,13 +115,8 @@ final class PhabricatorAuthLinkController
} }
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Link Account'), $panel_uri);
id(new PhabricatorCrumbView()) $crumbs->addTextCrumb($provider->getProviderName($name));
->setName(pht('Link Account'))
->setHref($panel_uri));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName($provider->getProviderName($name)));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -202,20 +202,12 @@ final class PhabricatorAuthLoginController
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
if ($this->getRequest()->getUser()->isLoggedIn()) { if ($this->getRequest()->getUser()->isLoggedIn()) {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Link Account'), $provider->getSettingsURI());
id(new PhabricatorCrumbView())
->setName(pht('Link Account'))
->setHref($provider->getSettingsURI()));
} else { } else {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Login'), $this->getApplicationURI('start/'));
id(new PhabricatorCrumbView())
->setName(pht('Login'))
->setHref($this->getApplicationURI('start/')));
} }
$crumbs->addCrumb( $crumbs->addTextCrumb($provider->getProviderName());
id(new PhabricatorCrumbView())
->setName($provider->getProviderName()));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -401,17 +401,11 @@ final class PhabricatorAuthRegisterController
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
if ($is_setup) { if ($is_setup) {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Setup Admin Account'));
id(new PhabricatorCrumbView())
->setName(pht('Setup Admin Account')));
$title = pht('Welcome to Phabricator'); $title = pht('Welcome to Phabricator');
} else { } else {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Register'));
id(new PhabricatorCrumbView()) $crumbs->addTextCrumb($provider->getProviderName());
->setName(pht('Register')));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName($provider->getProviderName()));
$title = pht('Phabricator Registration'); $title = pht('Phabricator Registration');
} }

View file

@ -126,9 +126,7 @@ final class PhabricatorAuthStartController
$login_message = phutil_safe_html($login_message); $login_message = phutil_safe_html($login_message);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Login'));
id(new PhabricatorCrumbView())
->setName(pht('Login')));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -133,9 +133,7 @@ EOBODY;
->setError($e_captcha)); ->setError($e_captcha));
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Reset Password'));
id(new PhabricatorCrumbView())
->setName(pht('Reset Password')));
$dialog = new AphrontDialogView(); $dialog = new AphrontDialogView();
$dialog->setUser($request->getUser()); $dialog->setUser($request->getUser());

View file

@ -82,9 +82,7 @@ final class PhabricatorEmailVerificationController
->appendChild($content); ->appendChild($content);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Verify Email'));
id(new PhabricatorCrumbView())
->setName(pht('Verify Email')));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -281,9 +281,7 @@ final class PhabricatorAuthEditController
} }
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($crumb);
id(new PhabricatorCrumbView())
->setName($crumb));
$xaction_view = null; $xaction_view = null;
if (!$is_new) { if (!$is_new) {

View file

@ -86,9 +86,7 @@ final class PhabricatorAuthListController
pht('Add Authentication Provider')))); pht('Add Authentication Provider'))));
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Auth Providers'));
id(new PhabricatorCrumbView())
->setName(pht('Auth Providers')));
$config_name = 'auth.email-domains'; $config_name = 'auth.email-domains';
$config_href = '/config/edit/'.$config_name.'/'; $config_href = '/config/edit/'.$config_name.'/';

View file

@ -87,9 +87,7 @@ final class PhabricatorAuthNewController
->setForm($form); ->setForm($form);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Add Provider'));
id(new PhabricatorCrumbView())
->setName(pht('Add Provider')));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -23,10 +23,7 @@ final class PhabricatorChatLogChannelListController
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs() ->buildApplicationCrumbs()
->addCrumb( ->addTextCrumb(pht('Channel List'), $this->getApplicationURI());
id(new PhabricatorCrumbView())
->setName(pht('Channel List'))
->setHref($this->getApplicationURI()));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -183,10 +183,7 @@ final class PhabricatorChatLogChannelLogController
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs() ->buildApplicationCrumbs()
->addCrumb( ->addTextCrumb($channel->getChannelName(), $uri);
id(new PhabricatorCrumbView())
->setName($channel->getChannelName())
->setHref($uri));
$form = id(new AphrontFormView()) $form = id(new AphrontFormView())
->setUser($user) ->setUser($user)

View file

@ -380,15 +380,9 @@ final class PhabricatorConduitAPIController
$method_uri = $this->getApplicationURI('method/'.$method.'/'); $method_uri = $this->getApplicationURI('method/'.$method.'/');
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs()
$crumbs ->addTextCrumb($method, $method_uri)
->addCrumb( ->addTextCrumb(pht('Call'));
id(new PhabricatorCrumbView())
->setName($method)
->setHref($method_uri))
->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Call')));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -116,9 +116,7 @@ final class PhabricatorConduitConsoleController
->setForm($form); ->setForm($form);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($method->getAPIMethodName());
id(new PhabricatorCrumbView())
->setName($method->getAPIMethodName()));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -40,9 +40,7 @@ final class PhabricatorConduitLogController
$table = $this->renderCallTable($calls, $conns); $table = $this->renderCallTable($calls, $conns);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Call Logs'));
id(new PhabricatorCrumbView())
->setName(pht('Call Logs')));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -49,9 +49,7 @@ final class PhabricatorConduitTokenController
->appendRemarkupInstructions($post_instructions); ->appendRemarkupInstructions($post_instructions);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Install Certificate'));
id(new PhabricatorCrumbView())
->setName(pht('Install Certificate')));
$object_box = id(new PHUIObjectBoxView()) $object_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Certificate Token')) ->setHeaderText(pht('Certificate Token'))

View file

@ -56,9 +56,7 @@ final class PhabricatorConfigAllController
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs() ->buildApplicationCrumbs()
->addCrumb( ->addTextCrumb($title);
id(new PhabricatorCrumbView())
->setName($title));
$panel = new AphrontPanelView(); $panel = new AphrontPanelView();
$panel->appendChild($table); $panel->appendChild($table);

View file

@ -199,22 +199,13 @@ final class PhabricatorConfigEditController
->setForm($form); ->setForm($form);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Config'), $this->getApplicationURI());
id(new PhabricatorCrumbView())
->setName(pht('Config'))
->setHref($this->getApplicationURI()));
if ($group) { if ($group) {
$crumbs->addCrumb( $crumbs->addTextCrumb($group->getName(), $group_uri);
id(new PhabricatorCrumbView())
->setName($group->getName())
->setHref($group_uri));
} }
$crumbs->addCrumb( $crumbs->addTextCrumb($this->key, '/config/edit/'.$this->key);
id(new PhabricatorCrumbView())
->setName($this->key)
->setHref('/config/edit/'.$this->key));
$xactions = id(new PhabricatorConfigTransactionQuery()) $xactions = id(new PhabricatorConfigTransactionQuery())
->withObjectPHIDs(array($config_entry->getPHID())) ->withObjectPHIDs(array($config_entry->getPHID()))

View file

@ -28,14 +28,8 @@ final class PhabricatorConfigGroupController
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs() ->buildApplicationCrumbs()
->addCrumb( ->addTextCrumb(pht('Config'), $this->getApplicationURI())
id(new PhabricatorCrumbView()) ->addTextCrumb($options->getName(), $this->getApplicationURI());
->setName(pht('Config'))
->setHref($this->getApplicationURI()))
->addCrumb(
id(new PhabricatorCrumbView())
->setName($options->getName())
->setHref($this->getApplicationURI()));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -30,10 +30,7 @@ final class PhabricatorConfigIssueListController
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs($nav) ->buildApplicationCrumbs($nav)
->addCrumb( ->addTextCrumb(pht('Setup'), $this->getApplicationURI('issue/'));
id(new PhabricatorCrumbView())
->setName(pht('Setup'))
->setHref($this->getApplicationURI('issue/')));
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);

View file

@ -38,14 +38,8 @@ final class PhabricatorConfigIssueViewController
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs() ->buildApplicationCrumbs()
->addCrumb( ->addTextCrumb(pht('Setup Issues'), $this->getApplicationURI('issue/'))
id(new PhabricatorCrumbView()) ->addTextCrumb($title, $request->getRequestURI());
->setName(pht('Setup Issues'))
->setHref($this->getApplicationURI('issue/')))
->addCrumb(
id(new PhabricatorCrumbView())
->setName($title)
->setHref($request->getRequestURI()));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -26,10 +26,7 @@ final class PhabricatorConfigListController
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs() ->buildApplicationCrumbs()
->addCrumb( ->addTextCrumb(pht('Config'), $this->getApplicationURI());
id(new PhabricatorCrumbView())
->setName(pht('Config'))
->setHref($this->getApplicationURI()));
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);

View file

@ -90,18 +90,11 @@ final class PhabricatorCountdownEditController
$cancel_uri = '/countdown/'; $cancel_uri = '/countdown/';
if ($countdown->getID()) { if ($countdown->getID()) {
$cancel_uri = '/countdown/'.$countdown->getID().'/'; $cancel_uri = '/countdown/'.$countdown->getID().'/';
$crumbs->addCrumb( $crumbs->addTextCrumb('C'.$countdown->getID(), $cancel_uri);
id(new PhabricatorCrumbView()) $crumbs->addTextCrumb(pht('Edit'));
->setName('C'.$countdown->getID())
->setHref($cancel_uri));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit')));
$submit_label = pht('Save Changes'); $submit_label = pht('Save Changes');
} else { } else {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Create Countdown'));
id(new PhabricatorCrumbView())
->setName(pht('Create Countdown')));
$submit_label = pht('Create Countdown'); $submit_label = pht('Create Countdown');
} }

View file

@ -36,9 +36,7 @@ final class PhabricatorCountdownViewController
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs() ->buildApplicationCrumbs()
->addCrumb( ->addTextCrumb("C{$id}");
id(new PhabricatorCrumbView())
->setName("C{$id}"));
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader($title) ->setHeader($title)

View file

@ -211,9 +211,7 @@ final class PhabricatorDaemonConsoleController
$queued_panel->setNoBackground(); $queued_panel->setNoBackground();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Console'));
id(new PhabricatorCrumbView())
->setName(pht('Console')));
$nav = $this->buildSideNavView(); $nav = $this->buildSideNavView();
$nav->selectFilter('/'); $nav->selectFilter('/');

View file

@ -29,14 +29,11 @@ final class PhabricatorDaemonLogEventViewController
$daemon_id = $event->getLogID(); $daemon_id = $event->getLogID();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs()
$crumbs->addCrumb( ->addTextCrumb(
id(new PhabricatorCrumbView()) pht('Daemon %s', $daemon_id),
->setName(pht('Daemon %s', $daemon_id)) $this->getApplicationURI("log/{$daemon_id}/"))
->setHref($this->getApplicationURI("log/{$daemon_id}/"))); ->addTextCrumb(pht('Event %s', $event->getID()));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Event %s', $event->getID())));
return $this->buildApplicationPage( return $this->buildApplicationPage(

View file

@ -19,9 +19,7 @@ final class PhabricatorDaemonLogListController
$daemon_table->setDaemonLogs($logs); $daemon_table->setDaemonLogs($logs);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('All Daemons'));
id(new PhabricatorCrumbView())
->setName(pht('All Daemons')));
$nav = $this->buildSideNavView(); $nav = $this->buildSideNavView();
$nav->selectFilter('log'); $nav->selectFilter('log');

View file

@ -26,9 +26,7 @@ final class PhabricatorDaemonLogViewController
$log->getID()); $log->getID());
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Daemon %s', $log->getID()));
id(new PhabricatorCrumbView())
->setName(pht('Daemon %s', $log->getID())));
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader($log->getDaemon()); ->setHeader($log->getDaemon());

View file

@ -58,9 +58,7 @@ final class PhabricatorWorkerTaskDetailController
} }
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title);
id(new PhabricatorCrumbView())
->setName($title));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -88,9 +88,7 @@ final class DifferentialDiffCreateController extends DifferentialController {
->setForm($form); ->setForm($form);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Create Diff'));
id(new PhabricatorCrumbView())
->setName(pht('Create Diff')));
if ($errors) { if ($errors) {
$errors = id(new AphrontErrorView()) $errors = id(new AphrontErrorView())

View file

@ -146,9 +146,7 @@ final class DifferentialDiffViewController extends DifferentialController {
->setUser($request->getUser()); ->setUser($request->getUser());
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Diff %d', $diff->getID()));
id(new PhabricatorCrumbView())
->setName(pht('Diff %d', $diff->getID())));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -153,16 +153,14 @@ final class DifferentialRevisionEditController extends DifferentialController {
if ($revision->getID()) { if ($revision->getID()) {
if ($diff) { if ($diff) {
$title = pht('Update Differential Revision'); $title = pht('Update Differential Revision');
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) 'D'.$revision->getID(),
->setName('D'.$revision->getID()) '/differential/diff/'.$diff->getID().'/');
->setHref('/differential/diff/'.$diff->getID().'/'));
} else { } else {
$title = pht('Edit Differential Revision'); $title = pht('Edit Differential Revision');
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) 'D'.$revision->getID(),
->setName('D'.$revision->getID()) '/D'.$revision->getID());
->setHref('/D'.$revision->getID()));
} }
} else { } else {
$title = pht('Create New Differential Revision'); $title = pht('Create New Differential Revision');
@ -173,9 +171,7 @@ final class DifferentialRevisionEditController extends DifferentialController {
->setFormError($error_view) ->setFormError($error_view)
->setForm($form); ->setForm($form);
$crumbs->addCrumb( $crumbs->addTextCrumb($title);
id(new PhabricatorCrumbView())
->setName($title));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -421,10 +421,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
); );
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($object_id, '/'.$object_id);
id(new PhabricatorCrumbView())
->setName($object_id)
->setHref('/'.$object_id));
$prefs = $user->loadPreferences(); $prefs = $user->loadPreferences();

View file

@ -139,9 +139,7 @@ final class DiffusionLintController extends DiffusionController {
if ($this->diffusionRequest) { if ($this->diffusionRequest) {
$title[] = $drequest->getCallsign(); $title[] = $drequest->getCallsign();
} else { } else {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('All Lint'));
id(new PhabricatorCrumbView())
->setName(pht('All Lint')));
} }
if ($this->diffusionRequest) { if ($this->diffusionRequest) {

View file

@ -181,9 +181,7 @@ final class DiffusionRepositoryCreateController
} }
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title);
id(new PhabricatorCrumbView())
->setName($title));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -59,9 +59,7 @@ final class DiffusionRepositoryEditActionsController
$content = array(); $content = array();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit Actions'));
id(new PhabricatorCrumbView())
->setName(pht('Edit Actions')));
$title = pht('Edit Actions (%s)', $repository->getName()); $title = pht('Edit Actions (%s)', $repository->getName());

View file

@ -67,9 +67,7 @@ final class DiffusionRepositoryEditBasicController
} }
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit Basics'));
id(new PhabricatorCrumbView())
->setName(pht('Edit Basics')));
$title = pht('Edit %s', $repository->getName()); $title = pht('Edit %s', $repository->getName());

View file

@ -88,9 +88,7 @@ final class DiffusionRepositoryEditBranchesController
$content = array(); $content = array();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit Branches'));
id(new PhabricatorCrumbView())
->setName(pht('Edit Branches')));
$title = pht('Edit Branches (%s)', $repository->getName()); $title = pht('Edit Branches (%s)', $repository->getName());

View file

@ -11,20 +11,12 @@ abstract class DiffusionRepositoryEditController
$repo_uri = $this->getRepositoryControllerURI($repository, ''); $repo_uri = $this->getRepositoryControllerURI($repository, '');
$edit_uri = $this->getRepositoryControllerURI($repository, 'edit/'); $edit_uri = $this->getRepositoryControllerURI($repository, 'edit/');
$crumbs->addCrumb( $crumbs->addTextCrumb('r'.$repository->getCallsign(), $repo_uri);
id(new PhabricatorCrumbView())
->setName('r'.$repository->getCallsign())
->setHref($repo_uri));
if ($is_main) { if ($is_main) {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit Repository'));
id(new PhabricatorCrumbView())
->setName(pht('Edit Repository')));
} else { } else {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit'), $edit_uri);
id(new PhabricatorCrumbView())
->setName(pht('Edit'))
->setHref($edit_uri));
} }
} }

View file

@ -57,9 +57,7 @@ final class DiffusionRepositoryEditEncodingController
} }
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit Encoding'));
id(new PhabricatorCrumbView())
->setName(pht('Edit Encoding')));
$title = pht('Edit %s', $repository->getName()); $title = pht('Edit %s', $repository->getName());

View file

@ -67,9 +67,7 @@ final class DiffusionRepositoryEditHostingController
} }
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit Hosting'));
id(new PhabricatorCrumbView())
->setName(pht('Edit Hosting')));
$title = pht('Edit Hosting (%s)', $repository->getName()); $title = pht('Edit Hosting (%s)', $repository->getName());
@ -172,9 +170,7 @@ final class DiffusionRepositoryEditHostingController
} }
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit Protocols'));
id(new PhabricatorCrumbView())
->setName(pht('Edit Protocols')));
$title = pht('Edit Protocols (%s)', $repository->getName()); $title = pht('Edit Protocols (%s)', $repository->getName());

View file

@ -29,9 +29,7 @@ final class DiffusionRepositoryEditLocalController
$errors = array(); $errors = array();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit Local'));
id(new PhabricatorCrumbView())
->setName(pht('Edit Local')));
$title = pht('Edit %s', $repository->getName()); $title = pht('Edit %s', $repository->getName());

View file

@ -67,9 +67,7 @@ final class DiffusionRepositoryEditPolicyController
$content = array(); $content = array();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit Policies'));
id(new PhabricatorCrumbView())
->setName(pht('Edit Policies')));
$title = pht('Edit Policies (%s)', $repository->getName()); $title = pht('Edit Policies (%s)', $repository->getName());

View file

@ -70,9 +70,7 @@ final class DiffusionRepositoryEditSubversionController
$content = array(); $content = array();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit Subversion Info'));
id(new PhabricatorCrumbView())
->setName(pht('Edit Subversion Info')));
$title = pht('Edit Subversion Info (%s)', $repository->getName()); $title = pht('Edit Subversion Info (%s)', $repository->getName());

View file

@ -67,9 +67,7 @@ final class DiffusionRepositoryNewController
->addCancelButton($this->getApplicationURI())); ->addCancelButton($this->getApplicationURI()));
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('New Repository'));
id(new PhabricatorCrumbView())
->setName(pht('New Repository')));
$form_box = id(new PHUIObjectBoxView()) $form_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Create or Import Repository')) ->setHeaderText(pht('Create or Import Repository'))

View file

@ -59,18 +59,15 @@ final class DivinerAtomController extends DivinerController {
$atom = $symbol->getAtom(); $atom = $symbol->getAtom();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) $book->getShortTitle(),
->setName($book->getShortTitle()) '/book/'.$book->getName().'/');
->setHref('/book/'.$book->getName().'/'));
$atom_short_title = $atom->getDocblockMetaValue( $atom_short_title = $atom->getDocblockMetaValue(
'short', 'short',
$symbol->getTitle()); $symbol->getTitle());
$crumbs->addCrumb( $crumbs->addTextCrumb($atom_short_title);
id(new PhabricatorCrumbView())
->setName($atom_short_title));
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader($this->renderFullSignature($symbol)) ->setHeader($this->renderFullSignature($symbol))

View file

@ -27,10 +27,9 @@ final class DivinerBookController extends DivinerController {
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) $book->getShortTitle(),
->setName($book->getShortTitle()) '/book/'.$book->getName().'/');
->setHref('/book/'.$book->getName().'/'));
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader($book->getTitle()) ->setHeader($book->getTitle())

View file

@ -43,9 +43,7 @@ final class DivinerLegacyController extends DivinerController {
} }
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Documentation'));
id(new PhabricatorCrumbView())
->setName(pht('Documentation')));
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader(pht('Documentation')); ->setHeader(pht('Documentation'));

View file

@ -80,12 +80,8 @@ final class DrydockBlueprintEditController extends DrydockController {
$title = pht('Edit Blueprint'); $title = pht('Edit Blueprint');
$header = pht('Edit Blueprint %d', $blueprint->getID()); $header = pht('Edit Blueprint %d', $blueprint->getID());
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Blueprint %d', $blueprint->getID()));
id(new PhabricatorCrumbView()) $crumbs->addTextCrumb(pht('Edit'));
->setName(pht('Blueprint %d', $blueprint->getID())));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit')));
if ($request->isAjax()) { if ($request->isAjax()) {
$dialog = id(new AphrontDialogView()) $dialog = id(new AphrontDialogView())

View file

@ -18,10 +18,7 @@ final class DrydockBlueprintListController extends DrydockController {
$blueprint_list = $this->buildBlueprintListView($blueprints); $blueprint_list = $this->buildBlueprintListView($blueprints);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title, $request->getRequestURI());
id(new PhabricatorCrumbView())
->setName($title)
->setHref($request->getRequestURI()));
$crumbs->addAction( $crumbs->addAction(
id(new PHUIListItemView()) id(new PHUIListItemView())

View file

@ -42,9 +42,7 @@ final class DrydockBlueprintViewController extends DrydockController {
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->setActionList($actions); $crumbs->setActionList($actions);
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Blueprint %d', $blueprint->getID()));
id(new PhabricatorCrumbView())
->setName(pht('Blueprint %d', $blueprint->getID())));
$object_box = id(new PHUIObjectBoxView()) $object_box = id(new PHUIObjectBoxView())
->setHeader($header) ->setHeader($header)

View file

@ -31,10 +31,7 @@ final class DrydockLeaseListController extends DrydockController {
)); ));
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title, $request->getRequestURI());
id(new PhabricatorCrumbView())
->setName($title)
->setHref($request->getRequestURI()));
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);
return $this->buildApplicationPage( return $this->buildApplicationPage(

View file

@ -40,10 +40,7 @@ final class DrydockLeaseViewController extends DrydockController {
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->setActionList($actions); $crumbs->setActionList($actions);
$crumbs->addCrumb( $crumbs->addTextCrumb($title, $lease_uri);
id(new PhabricatorCrumbView())
->setName($title)
->setHref($lease_uri));
$object_box = id(new PHUIObjectBoxView()) $object_box = id(new PHUIObjectBoxView())
->setHeader($header) ->setHeader($header)

View file

@ -43,10 +43,7 @@ final class DrydockLogController extends DrydockController {
)); ));
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title, $this->getApplicationURI('/logs/'));
id(new PhabricatorCrumbView())
->setName($title)
->setHref($this->getApplicationURI('/logs/')));
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);
return $this->buildApplicationPage( return $this->buildApplicationPage(

View file

@ -20,10 +20,7 @@ final class DrydockResourceListController extends DrydockController {
$resource_list = $this->buildResourceListView($resources); $resource_list = $this->buildResourceListView($resources);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title, $request->getRequestURI());
id(new PhabricatorCrumbView())
->setName($title)
->setHref($request->getRequestURI()));
$nav = $this->buildSideNav('resource'); $nav = $this->buildSideNav('resource');
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);

View file

@ -49,9 +49,7 @@ final class DrydockResourceViewController extends DrydockController {
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->setActionList($actions); $crumbs->setActionList($actions);
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Resource %d', $resource->getID()));
id(new PhabricatorCrumbView())
->setName(pht('Resource %d', $resource->getID())));
$object_box = id(new PHUIObjectBoxView()) $object_box = id(new PHUIObjectBoxView())
->setHeader($header) ->setHeader($header)

View file

@ -30,9 +30,7 @@ final class PhabricatorFeedDetailController extends PhabricatorFeedController {
$feed_view = phutil_tag_div('phabricator-feed-frame', $feed_view); $feed_view = phutil_tag_div('phabricator-feed-frame', $feed_view);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title);
id(new PhabricatorCrumbView())
->setName($title));
return $this->buildApplicationPage( return $this->buildApplicationPage(

View file

@ -47,10 +47,9 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
$timeline = $this->buildTransactionView($file, $xactions); $timeline = $this->buildTransactionView($file, $xactions);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->setActionList($actions); $crumbs->setActionList($actions);
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) 'F'.$file->getID(),
->setName('F'.$file->getID()) $this->getApplicationURI("/info/{$phid}/"));
->setHref($this->getApplicationURI("/info/{$phid}/")));
$object_box = id(new PHUIObjectBoxView()) $object_box = id(new PHUIObjectBoxView())
->setHeader($header); ->setHeader($header);

View file

@ -60,10 +60,7 @@ final class PhabricatorFileUploadController extends PhabricatorFileController {
->appendChild($instructions); ->appendChild($instructions);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Upload'), $request->getRequestURI());
id(new PhabricatorCrumbView())
->setName(pht('Upload'))
->setHref($request->getRequestURI()));
$title = pht('Upload File'); $title = pht('Upload File');

View file

@ -37,9 +37,7 @@ final class HarbormasterBuildViewController
$this->buildPropertyLists($box, $build, $actions); $this->buildPropertyLists($box, $build, $actions);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title);
id(new PhabricatorCrumbView())
->setName($title));
$build_targets = id(new HarbormasterBuildTargetQuery()) $build_targets = id(new HarbormasterBuildTargetQuery())
->setViewer($viewer) ->setViewer($viewer)

View file

@ -119,18 +119,11 @@ final class HarbormasterBuildableEditController
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
if ($is_new) { if ($is_new) {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('New Buildable'));
id(new PhabricatorCrumbView())
->setName(pht('New Buildable')));
} else { } else {
$id = $buildable->getID(); $id = $buildable->getID();
$crumbs->addCrumb( $crumbs->addTextCrumb("B{$id}", "/B{$id}");
id(new PhabricatorCrumbView()) $crumbs->addTextCrumb(pht('Edit'));
->setName("B{$id}")
->setHref("/B{$id}"));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit')));
} }
return $this->buildApplicationPage( return $this->buildApplicationPage(

View file

@ -94,9 +94,7 @@ final class HarbormasterBuildableViewController
$this->buildPropertyLists($box, $buildable, $actions); $this->buildPropertyLists($box, $buildable, $actions);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb("B{$id}");
id(new PhabricatorCrumbView())
->setName("B{$id}"));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -5,10 +5,9 @@ abstract class HarbormasterPlanController extends PhabricatorController {
public function buildApplicationCrumbs() { public function buildApplicationCrumbs() {
$crumbs = parent::buildApplicationCrumbs(); $crumbs = parent::buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) pht('Build Plans'),
->setName(pht('Build Plans')) $this->getApplicationURI('plan/'));
->setHref($this->getApplicationURI('plan/')));
return $crumbs; return $crumbs;
} }

View file

@ -93,18 +93,13 @@ final class HarbormasterPlanEditController
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
if ($is_new) { if ($is_new) {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('New Build Plan'));
id(new PhabricatorCrumbView())
->setName(pht('New Build Plan')));
} else { } else {
$id = $plan->getID(); $id = $plan->getID();
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) pht("Plan %d", $id),
->setName(pht("Plan %d", $id)) $this->getApplicationURI("plan/{$id}/"));
->setHref($this->getApplicationURI("plan/{$id}/"))); $crumbs->addTextCrumb(pht('Edit'));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit')));
} }
return $this->buildApplicationPage( return $this->buildApplicationPage(

View file

@ -51,9 +51,7 @@ final class HarbormasterPlanViewController
$this->buildPropertyLists($box, $plan, $actions); $this->buildPropertyLists($box, $plan, $actions);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht("Plan %d", $id));
id(new PhabricatorCrumbView())
->setName(pht("Plan %d", $id)));
$step_list = $this->buildStepList($plan); $step_list = $this->buildStepList($plan);

View file

@ -132,13 +132,10 @@ final class HarbormasterStepEditController
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$id = $plan->getID(); $id = $plan->getID();
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) pht("Plan %d", $id),
->setName(pht("Plan %d", $id)) $this->getApplicationURI("plan/{$id}/"));
->setHref($this->getApplicationURI("plan/{$id}/"))); $crumbs->addTextCrumb(pht('Edit Step'));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit Step')));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -89,9 +89,7 @@ final class HeraldNewController extends HeraldController {
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs() ->buildApplicationCrumbs()
->addCrumb( ->addTextCrumb(pht('Create Rule'));
id(new PhabricatorCrumbView())
->setName(pht('Create Rule')));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -194,9 +194,7 @@ final class HeraldRuleController extends HeraldController {
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs() ->buildApplicationCrumbs()
->addCrumb( ->addTextCrumb($title);
id(new PhabricatorCrumbView())
->setName($title));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -37,10 +37,9 @@ final class HeraldRuleEditHistoryController extends HeraldController {
$crumbs = $this $crumbs = $this
->buildApplicationCrumbs($can_create = false) ->buildApplicationCrumbs($can_create = false)
->addCrumb( ->addTextCrumb(
id(new PhabricatorCrumbView()) pht('Edit History'),
->setName(pht('Edit History')) $this->getApplicationURI('herald/history'));
->setHref($this->getApplicationURI('herald/history')));
$nav = $this->buildSideNavView(); $nav = $this->buildSideNavView();
$nav->selectFilter('history'); $nav->selectFilter('history');

View file

@ -44,9 +44,7 @@ final class HeraldRuleViewController extends HeraldController {
$id = $rule->getID(); $id = $rule->getID();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb("H{$id}");
id(new PhabricatorCrumbView())
->setName("H{$id}"));
$object_box = id(new PHUIObjectBoxView()) $object_box = id(new PHUIObjectBoxView())
->setHeader($header) ->setHeader($header)

View file

@ -112,13 +112,10 @@ final class HeraldTestConsoleController extends HeraldController {
->setForm($form); ->setForm($form);
$crumbs = id($this->buildApplicationCrumbs()) $crumbs = id($this->buildApplicationCrumbs())
->addCrumb( ->addTextCrumb(
id(new PhabricatorCrumbView()) pht('Transcripts'),
->setName(pht('Transcripts')) $this->getApplicationURI('/transcript/'))
->setHref($this->getApplicationURI('/transcript/'))) ->addTextCrumb(pht('Test Console'));
->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Test Console')));
return $this->buildApplicationPage( return $this->buildApplicationPage(
$box, $box,

View file

@ -97,13 +97,10 @@ final class HeraldTranscriptController extends HeraldController {
} }
$crumbs = id($this->buildApplicationCrumbs()) $crumbs = id($this->buildApplicationCrumbs())
->addCrumb( ->addTextCrumb(
id(new PhabricatorCrumbView()) pht('Transcripts'),
->setName(pht('Transcripts')) $this->getApplicationURI('/transcript/'))
->setHref($this->getApplicationURI('/transcript/'))) ->addTextCrumb($xscript->getID());
->addCrumb(
id(new PhabricatorCrumbView())
->setName($xscript->getID()));
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);
return $this->buildApplicationPage( return $this->buildApplicationPage(

View file

@ -72,9 +72,7 @@ final class HeraldTranscriptListController extends HeraldController {
$nav->appendChild($panel); $nav->appendChild($panel);
$crumbs = id($this->buildApplicationCrumbs()) $crumbs = id($this->buildApplicationCrumbs())
->addCrumb( ->addTextCrumb(pht('Transcripts'));
id(new PhabricatorCrumbView())
->setName(pht('Transcripts')));
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);
return $this->buildApplicationPage( return $this->buildApplicationPage(

View file

@ -173,8 +173,7 @@ final class LegalpadDocumentEditController extends LegalpadController {
->setForm($form); ->setForm($form);
$crumbs = $this->buildApplicationCrumbs($this->buildSideNav()); $crumbs = $this->buildApplicationCrumbs($this->buildSideNav());
$crumbs->addCrumb( $crumbs->addTextCrumb($short);
id(new PhabricatorCrumbView())->setName($short));
$preview = id(new PHUIRemarkupPreviewPanel()) $preview = id(new PHUIRemarkupPreviewPanel())

View file

@ -81,10 +81,9 @@ final class LegalpadDocumentViewController extends LegalpadController {
$crumbs = $this->buildApplicationCrumbs($this->buildSideNav()); $crumbs = $this->buildApplicationCrumbs($this->buildSideNav());
$crumbs->setActionList($actions); $crumbs->setActionList($actions);
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) 'L'.$document->getID(),
->setName('L'.$document->getID()) $this->getApplicationURI('view/'.$document->getID()));
->setHref($this->getApplicationURI('view/'.$document->getID())));
$object_box = id(new PHUIObjectBoxView()) $object_box = id(new PHUIObjectBoxView())
->setHeader($header) ->setHeader($header)

View file

@ -132,15 +132,8 @@ final class PhabricatorMacroAudioController
$title = pht('Edit Audio Behavior'); $title = pht('Edit Audio Behavior');
$crumb = pht('Edit Audio'); $crumb = pht('Edit Audio');
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Macro "%s"', $macro->getName()), $view_uri);
id(new PhabricatorCrumbView()) $crumbs->addTextCrumb($crumb, $request->getRequestURI());
->setHref($view_uri)
->setName(pht('Macro "%s"', $macro->getName())));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setHref($request->getRequestURI())
->setName($crumb));
$upload_form = id(new AphrontFormView()) $upload_form = id(new AphrontFormView())
->setEncType('multipart/form-data') ->setEncType('multipart/form-data')

View file

@ -219,19 +219,13 @@ final class PhabricatorMacroEditController
$title = pht('Edit Image Macro'); $title = pht('Edit Image Macro');
$crumb = pht('Edit Macro'); $crumb = pht('Edit Macro');
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Macro "%s"', $macro->getName()), $view_uri);
id(new PhabricatorCrumbView())
->setHref($view_uri)
->setName(pht('Macro "%s"', $macro->getName())));
} else { } else {
$title = pht('Create Image Macro'); $title = pht('Create Image Macro');
$crumb = pht('Create Macro'); $crumb = pht('Create Macro');
} }
$crumbs->addCrumb( $crumbs->addCrumb($crumb, $request->getRequestURI());
id(new PhabricatorCrumbView())
->setHref($request->getRequestURI())
->setName($crumb));
$upload = null; $upload = null;
if ($macro->getID()) { if ($macro->getID()) {

View file

@ -30,10 +30,9 @@ final class PhabricatorMacroViewController
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->setActionList($actions); $crumbs->setActionList($actions);
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) $title_short,
->setHref($this->getApplicationURI('/view/'.$macro->getID().'/')) $this->getApplicationURI('/view/'.$macro->getID().'/'));
->setName($title_short));
$properties = $this->buildPropertyView($macro, $actions); $properties = $this->buildPropertyView($macro, $actions);
if ($file) { if ($file) {

View file

@ -117,13 +117,9 @@ final class PhabricatorMailingListsEditController
->addCancelButton($this->getApplicationURI())); ->addCancelButton($this->getApplicationURI()));
if ($list->getID()) { if ($list->getID()) {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit Mailing List'));
id(new PhabricatorCrumbView())
->setName(pht('Edit Mailing List')));
} else { } else {
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Create Mailing List'));
id(new PhabricatorCrumbView())
->setName(pht('Create Mailing List')));
} }
$form_box = id(new PHUIObjectBoxView()) $form_box = id(new PHUIObjectBoxView())

View file

@ -144,9 +144,7 @@ final class ManiphestBatchEditController extends ManiphestController {
$title = pht('Batch Editor'); $title = pht('Batch Editor');
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title);
id(new PhabricatorCrumbView())
->setName($title));
$form_box = id(new PHUIObjectBoxView()) $form_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Batch Edit Tasks')) ->setHeaderText(pht('Batch Edit Tasks'))

View file

@ -55,9 +55,7 @@ final class ManiphestReportController extends ManiphestController {
$nav->appendChild($core); $nav->appendChild($core);
$nav->setCrumbs( $nav->setCrumbs(
$this->buildApplicationCrumbs() $this->buildApplicationCrumbs()
->addCrumb( ->addTextCrumb(pht('Reports')));
id(new PhabricatorCrumbView())
->setName(pht('Reports'))));
return $this->buildApplicationPage( return $this->buildApplicationPage(
$nav, $nav,

View file

@ -367,11 +367,8 @@ final class ManiphestTaskDetailController extends ManiphestController {
$object_name = 'T'.$task->getID(); $object_name = 'T'.$task->getID();
$actions = $this->buildActionView($task); $actions = $this->buildActionView($task);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs()
$crumbs->addCrumb( ->addTextCrumb($object_name, '/'.$object_name)
id(new PhabricatorCrumbView())
->setName($object_name)
->setHref('/'.$object_name))
->setActionList($actions); ->setActionList($actions);
$header = $this->buildHeaderView($task); $header = $this->buildHeaderView($task);

View file

@ -667,15 +667,10 @@ final class ManiphestTaskEditController extends ManiphestController {
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
if ($task->getID()) { if ($task->getID()) {
$crumbs->addCrumb( $crumbs->addTextCrumb('T'.$task->getID(), '/T'.$task->getID());
id(new PhabricatorCrumbView())
->setName('T'.$task->getID())
->setHref('/T'.$task->getID()));
} }
$crumbs->addCrumb( $crumbs->addTextCrumb($header_name);
id(new PhabricatorCrumbView())
->setName($header_name));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -24,9 +24,7 @@ final class PhabricatorApplicationDetailViewController
$title = $selected->getName(); $title = $selected->getName();
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($selected->getName());
id(new PhabricatorCrumbView())
->setName($selected->getName()));
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader($title) ->setHeader($title)

View file

@ -146,13 +146,8 @@ final class PhabricatorApplicationEditController
->addCancelButton($view_uri)); ->addCancelButton($view_uri));
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($application->getName(), $view_uri);
id(new PhabricatorCrumbView()) $crumbs->addTextCrumb(pht('Edit Policies'));
->setName($application->getName())
->setHref($view_uri));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit Policies')));
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader(pht('Edit Policies: %s', $application->getName())); ->setHeader(pht('Edit Policies: %s', $application->getName()));

View file

@ -47,9 +47,7 @@ final class NuanceSourceViewController extends NuanceController {
$title = pht('%s', $source->getName()); $title = pht('%s', $source->getName());
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title);
id(new PhabricatorCrumbView())
->setName($title));
$header = $this->buildHeaderView($source); $header = $this->buildHeaderView($source);
$actions = $this->buildActionView($source); $actions = $this->buildActionView($source);

View file

@ -45,9 +45,7 @@ abstract class PhabricatorOwnersController extends PhabricatorController {
} }
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title);
id(new PhabricatorCrumbView())
->setName($title));
$crumbs->addAction( $crumbs->addAction(
id(new PHUIListItemView()) id(new PHUIListItemView())

View file

@ -55,9 +55,7 @@ final class PassphraseCredentialCreateController extends PassphraseController {
$title = pht('New Credential'); $title = pht('New Credential');
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Create'));
id(new PhabricatorCrumbView())
->setName(pht('Create')));
$box = id(new PHUIObjectBoxView()) $box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Create New Credential')) ->setHeaderText(pht('Create New Credential'))

View file

@ -219,19 +219,14 @@ final class PassphraseCredentialEditController extends PassphraseController {
if ($is_new) { if ($is_new) {
$title = pht('Create Credential'); $title = pht('Create Credential');
$header = pht('Create New Credential'); $header = pht('Create New Credential');
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Create'));
id(new PhabricatorCrumbView())
->setName(pht('Create')));
} else { } else {
$title = pht('Edit Credential'); $title = pht('Edit Credential');
$header = pht('Edit Credential %s', 'K'.$credential->getID()); $header = pht('Edit Credential %s', 'K'.$credential->getID());
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) 'K'.$credential->getID(),
->setName('K'.$credential->getID()) '/K'.$credential->getID());
->setHref('/K'.$credential->getID())); $crumbs->addTextCrumb(pht('Edit'));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit')));
} }
if ($request->isAjax()) { if ($request->isAjax()) {

View file

@ -41,9 +41,7 @@ final class PassphraseCredentialViewController extends PassphraseController {
$title = pht('%s %s', 'K'.$credential->getID(), $credential->getName()); $title = pht('%s %s', 'K'.$credential->getID(), $credential->getName());
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb('K'.$credential->getID());
id(new PhabricatorCrumbView())
->setName('K'.$credential->getID()));
$header = $this->buildHeaderView($credential); $header = $this->buildHeaderView($credential);
$actions = $this->buildActionView($credential); $actions = $this->buildActionView($credential);

View file

@ -212,13 +212,9 @@ final class PhabricatorPasteEditController extends PhabricatorPasteController {
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView()); $crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
if (!$is_create) { if (!$is_create) {
$crumbs->addCrumb( $crumbs->addTextCrumb('P'.$paste->getID(), '/P'.$paste->getID());
id(new PhabricatorCrumbView())
->setName('P'.$paste->getID())
->setHref('/P'.$paste->getID()));
} }
$crumbs->addCrumb( $crumbs->addTextCrumb($short);
id(new PhabricatorCrumbView())->setName($short));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -88,10 +88,7 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView()) $crumbs = $this->buildApplicationCrumbs($this->buildSideNavView())
->setActionList($actions) ->setActionList($actions)
->addCrumb( ->addTextCrumb('P'.$paste->getID(), '/P'.$paste->getID());
id(new PhabricatorCrumbView())
->setName('P'.$paste->getID())
->setHref('/P'.$paste->getID()));
$xactions = id(new PhabricatorPasteTransactionQuery()) $xactions = id(new PhabricatorPasteTransactionQuery())
->setViewer($request->getUser()) ->setViewer($request->getUser())

View file

@ -23,21 +23,12 @@ final class PhabricatorPeopleEditController
return new Aphront404Response(); return new Aphront404Response();
} }
$base_uri = '/people/edit/'.$user->getID().'/'; $base_uri = '/people/edit/'.$user->getID().'/';
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Edit User'), '/people/edit/');
id(new PhabricatorCrumbView()) $crumbs->addTextCrumb($user->getFullName(), $base_uri);
->setName(pht('Edit User'))
->setHref('/people/edit/'));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName($user->getFullName())
->setHref($base_uri));
} else { } else {
$user = new PhabricatorUser(); $user = new PhabricatorUser();
$base_uri = '/people/edit/'; $base_uri = '/people/edit/';
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Create New User'), $base_uri);
id(new PhabricatorCrumbView())
->setName(pht('Create New User'))
->setHref($base_uri));
} }
$nav = new AphrontSideNavFilterView(); $nav = new AphrontSideNavFilterView();

View file

@ -38,10 +38,9 @@ final class PhabricatorPeopleLdapController
->appendChild($form); ->appendChild($form);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb(
id(new PhabricatorCrumbView()) pht('Import Ldap Users'),
->setName(pht('Import Ldap Users')) $this->getApplicationURI('/ldap/'));
->setHref($this->getApplicationURI('/ldap/')));
$nav = $this->buildSideNavView(); $nav = $this->buildSideNavView();
$nav->setCrumbs($crumbs); $nav->setCrumbs($crumbs);

View file

@ -207,10 +207,7 @@ final class PhabricatorPeopleLogsController
$filter = new AphrontListFilterView(); $filter = new AphrontListFilterView();
$filter->appendChild($form); $filter->appendChild($form);
$crumbs = $this->buildApplicationCrumbs($this->buildSideNavView()); $crumbs = $this->buildApplicationCrumbs($this->buildSideNavView());
$crumbs->addCrumb( $crumbs->addTextCrumb(pht('Activity Logs'), '/people/logs/');
id(new PhabricatorCrumbView())
->setName(pht('Activity Logs'))
->setHref('/people/logs/'));
$nav = $this->buildSideNavView(); $nav = $this->buildSideNavView();
$nav->selectFilter('logs'); $nav->selectFilter('logs');

View file

@ -71,9 +71,7 @@ final class PhabricatorPeopleProfileController
$properties = $this->buildPropertyView($user, $actions); $properties = $this->buildPropertyView($user, $actions);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($user->getUsername());
id(new PhabricatorCrumbView())
->setName($user->getUsername()));
$feed = $this->renderUserFeed($user); $feed = $this->renderUserFeed($user);
$object_box = id(new PHUIObjectBoxView()) $object_box = id(new PHUIObjectBoxView())

View file

@ -61,13 +61,8 @@ final class PhabricatorPeopleProfileEditController
$title = pht('Edit Profile'); $title = pht('Edit Profile');
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($user->getUsername(), $profile_uri);
id(new PhabricatorCrumbView()) $crumbs->addTextCrumb($title);
->setName($user->getUsername())
->setHref($profile_uri));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName($title));
$form = id(new AphrontFormView()) $form = id(new AphrontFormView())
->setUser($viewer); ->setUser($viewer);

View file

@ -91,13 +91,8 @@ final class PhabricatorPeopleProfilePictureController
$title = pht('Edit Profile Picture'); $title = pht('Edit Profile Picture');
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($user->getUsername(), $profile_uri);
id(new PhabricatorCrumbView()) $crumbs->addTextCrumb($title);
->setName($user->getUsername())
->setHref($profile_uri));
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName($title));
$form = id(new PHUIFormLayoutView()) $form = id(new PHUIFormLayoutView())
->setUser($viewer); ->setUser($viewer);

View file

@ -176,10 +176,7 @@ final class PhameBlogEditController
->setForm($form); ->setForm($form);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($page_title, $this->getApplicationURI('blog/new'));
id(new PhabricatorCrumbView())
->setName($page_title)
->setHref($this->getApplicationURI('blog/new')));
$nav = $this->renderSideNavFilterView(); $nav = $this->renderSideNavFilterView();
$nav->selectFilter($this->id ? null : 'blog/new'); $nav->selectFilter($this->id ? null : 'blog/new');

View file

@ -48,10 +48,7 @@ final class PhameBlogListController extends PhameController {
$blog_list->setPager($pager); $blog_list->setPager($pager);
$crumbs = $this->buildApplicationCrumbs(); $crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb( $crumbs->addTextCrumb($title, $this->getApplicationURI());
id(new PhabricatorCrumbView())
->setName($title)
->setHref($this->getApplicationURI()));
$nav->appendChild( $nav->appendChild(
array( array(

Some files were not shown because too many files have changed in this diff Show more