mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 20:40:56 +01:00
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
This commit is contained in:
parent
58e35518b6
commit
5bc684ad36
2 changed files with 11 additions and 8 deletions
|
@ -34,7 +34,7 @@ abstract class PonderController extends PhabricatorController {
|
||||||
->addAction(
|
->addAction(
|
||||||
id(new PhabricatorMenuItemView())
|
id(new PhabricatorMenuItemView())
|
||||||
->setName(pht('New Question'))
|
->setName(pht('New Question'))
|
||||||
->setHref('question/ask')
|
->setHref('/ponder/question/ask')
|
||||||
->setIcon('create'));
|
->setIcon('create'));
|
||||||
|
|
||||||
return $crumbs;
|
return $crumbs;
|
||||||
|
|
|
@ -16,17 +16,22 @@ final class PonderFeedController extends PonderController {
|
||||||
$this->answerOffset = $request->getInt('aoff');
|
$this->answerOffset = $request->getInt('aoff');
|
||||||
|
|
||||||
$pages = array(
|
$pages = array(
|
||||||
'feed' => 'All Questions',
|
'feed' => pht('All Questions'),
|
||||||
'questions' => 'Your Questions',
|
'questions' => pht('Your Questions'),
|
||||||
'answers' => 'Your Answers',
|
'answers' => pht('Your Answers'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$side_nav = $this->buildSideNavView();
|
$side_nav = $this->buildSideNavView();
|
||||||
|
|
||||||
$this->page = $side_nav->selectFilter($this->page, 'feed');
|
$this->page = $side_nav->selectFilter($this->page, 'feed');
|
||||||
|
|
||||||
$title = $pages[$this->page];
|
$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) {
|
switch ($this->page) {
|
||||||
case 'feed':
|
case 'feed':
|
||||||
case 'questions':
|
case 'questions':
|
||||||
|
@ -53,8 +58,6 @@ final class PonderFeedController extends PonderController {
|
||||||
$view = $this->buildQuestionListView($questions);
|
$view = $this->buildQuestionListView($questions);
|
||||||
$view->setPager($pager);
|
$view->setPager($pager);
|
||||||
|
|
||||||
$side_nav->appendChild(
|
|
||||||
id(new PhabricatorHeaderView())->setHeader($title));
|
|
||||||
$side_nav->appendChild($view);
|
$side_nav->appendChild($view);
|
||||||
break;
|
break;
|
||||||
case 'answers':
|
case 'answers':
|
||||||
|
|
Loading…
Reference in a new issue