From 5bc684ad3633b25a19cec53fb4cd764f4633801d Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 17 Apr 2013 15:02:32 -0700 Subject: [PATCH] Fix Ponder missing menu items. Summary: Not sure what happened here, maybe crumbs got clobbered. Test Plan: Tested 'Ask Question' on all pages. Tested mobile. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5725 --- .../ponder/controller/PonderController.php | 2 +- .../ponder/controller/PonderFeedController.php | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/applications/ponder/controller/PonderController.php b/src/applications/ponder/controller/PonderController.php index 037cf0bcbd..1122d56c2a 100644 --- a/src/applications/ponder/controller/PonderController.php +++ b/src/applications/ponder/controller/PonderController.php @@ -34,7 +34,7 @@ abstract class PonderController extends PhabricatorController { ->addAction( id(new PhabricatorMenuItemView()) ->setName(pht('New Question')) - ->setHref('question/ask') + ->setHref('/ponder/question/ask') ->setIcon('create')); return $crumbs; diff --git a/src/applications/ponder/controller/PonderFeedController.php b/src/applications/ponder/controller/PonderFeedController.php index e669e05a54..5553fb872c 100644 --- a/src/applications/ponder/controller/PonderFeedController.php +++ b/src/applications/ponder/controller/PonderFeedController.php @@ -16,17 +16,22 @@ final class PonderFeedController extends PonderController { $this->answerOffset = $request->getInt('aoff'); $pages = array( - 'feed' => 'All Questions', - 'questions' => 'Your Questions', - 'answers' => 'Your Answers', + 'feed' => pht('All Questions'), + 'questions' => pht('Your Questions'), + 'answers' => pht('Your Answers'), ); $side_nav = $this->buildSideNavView(); - $this->page = $side_nav->selectFilter($this->page, 'feed'); - $title = $pages[$this->page]; + $crumbs = $this->buildApplicationCrumbs($this->buildSideNavView()); + $crumbs->addCrumb( + id(new PhabricatorCrumbView()) + ->setName($title) + ->setHref($this->getApplicationURI())); + $side_nav->setCrumbs($crumbs); + switch ($this->page) { case 'feed': case 'questions': @@ -53,8 +58,6 @@ final class PonderFeedController extends PonderController { $view = $this->buildQuestionListView($questions); $view->setPager($pager); - $side_nav->appendChild( - id(new PhabricatorHeaderView())->setHeader($title)); $side_nav->appendChild($view); break; case 'answers':