@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add mobile menu to Ponder

Summary: Ref T3578, adds mobile menus to Ponder

Test Plan: Test Ponder on mobile and desktop, click in Ask Question links

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D13784

+34 -13
+22 -10
src/applications/ponder/application/PhabricatorPonderApplication.php
··· 48 48 49 49 public function getRoutes() { 50 50 return array( 51 - '/Q(?P<id>[1-9]\d*)' => 'PonderQuestionViewController', 51 + '/Q(?P<id>[1-9]\d*)' 52 + => 'PonderQuestionViewController', 52 53 '/ponder/' => array( 53 - '(?:query/(?P<queryKey>[^/]+)/)?' => 'PonderQuestionListController', 54 - 'answer/add/' => 'PonderAnswerSaveController', 55 - 'answer/edit/(?P<id>\d+)/' => 'PonderAnswerEditController', 56 - 'answer/comment/(?P<id>\d+)/' => 'PonderAnswerCommentController', 57 - 'answer/history/(?P<id>\d+)/' => 'PonderAnswerHistoryController', 58 - 'question/edit/(?:(?P<id>\d+)/)?' => 'PonderQuestionEditController', 59 - 'question/comment/(?P<id>\d+)/' => 'PonderQuestionCommentController', 60 - 'question/history/(?P<id>\d+)/' => 'PonderQuestionHistoryController', 61 - 'preview/' => 'PhabricatorMarkupPreviewController', 54 + '(?:query/(?P<queryKey>[^/]+)/)?' 55 + => 'PonderQuestionListController', 56 + 'answer/add/' 57 + => 'PonderAnswerSaveController', 58 + 'answer/edit/(?P<id>\d+)/' 59 + => 'PonderAnswerEditController', 60 + 'answer/comment/(?P<id>\d+)/' 61 + => 'PonderAnswerCommentController', 62 + 'answer/history/(?P<id>\d+)/' 63 + => 'PonderAnswerHistoryController', 64 + 'question/edit/(?:(?P<id>\d+)/)?' 65 + => 'PonderQuestionEditController', 66 + 'question/create/' 67 + => 'PonderQuestionEditController', 68 + 'question/comment/(?P<id>\d+)/' 69 + => 'PonderQuestionCommentController', 70 + 'question/history/(?P<id>\d+)/' 71 + => 'PonderQuestionHistoryController', 72 + 'preview/' 73 + => 'PhabricatorMarkupPreviewController', 62 74 'question/(?P<status>open|close)/(?P<id>[1-9]\d*)/' 63 75 => 'PonderQuestionStatusController', 64 76 'vote/' => 'PonderVoteSaveController',
+12 -3
src/applications/ponder/controller/PonderController.php
··· 2 2 3 3 abstract class PonderController extends PhabricatorController { 4 4 5 - protected function buildSideNavView() { 5 + protected function buildSideNavView($for_app = false) { 6 6 $user = $this->getRequest()->getUser(); 7 7 8 8 $nav = new AphrontSideNavFilterView(); 9 9 $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); 10 10 11 + if ($for_app) { 12 + $nav->addFilter('question/create/', pht('Ask Question')); 13 + } 14 + 11 15 id(new PonderQuestionSearchEngine()) 12 16 ->setViewer($user) 13 17 ->addNavigationItems($nav->getMenu()); ··· 17 21 return $nav; 18 22 } 19 23 24 + public function buildApplicationMenu() { 25 + return $this->buildSideNavView($for_app = true)->getMenu(); 26 + } 27 + 20 28 protected function buildApplicationCrumbs() { 21 29 $crumbs = parent::buildApplicationCrumbs(); 30 + $href = $this->getApplicationURI('question/create/'); 22 31 $crumbs 23 32 ->addAction( 24 33 id(new PHUIListItemView()) 25 - ->setName(pht('Create Question')) 26 - ->setHref('/ponder/question/edit/') 34 + ->setName(pht('Ask Question')) 35 + ->setHref($href) 27 36 ->setIcon('fa-plus-square')); 28 37 29 38 return $crumbs;