@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.

Pholio touchups

Summary: Added crumbs, phts some things, made mobile menus work.

Test Plan: Review Pholio in sb and ios.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2531

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

+42 -11
+22 -4
src/applications/pholio/controller/PholioController.php
··· 5 5 */ 6 6 abstract class PholioController extends PhabricatorController { 7 7 8 - public function buildSideNav() { 8 + public function buildSideNav($filter = null, $for_app = false) { 9 9 $nav = new AphrontSideNavFilterView(); 10 10 $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); 11 11 12 - $nav->addLabel('Create'); 13 - $nav->addFilter('new', pht('Create Mock')); 14 - 15 12 $nav->addLabel('Mocks'); 16 13 $nav->addFilter('view/all', pht('All Mocks')); 17 14 15 + if ($for_app) { 16 + $nav->addFilter('new/', pht('Create Mock')); 17 + } 18 + 18 19 return $nav; 19 20 } 21 + 22 + public function buildApplicationCrumbs() { 23 + $crumbs = parent::buildApplicationCrumbs(); 24 + 25 + $crumbs->addAction( 26 + id(new PhabricatorMenuItemView()) 27 + ->setName(pht('Create Mock')) 28 + ->setHref($this->getApplicationURI('new/')) 29 + ->setIcon('create')); 30 + 31 + return $crumbs; 32 + } 33 + 34 + public function buildApplicationMenu() { 35 + return $this->buildSideNav(null, true)->getMenu(); 36 + } 37 + 20 38 21 39 22 40 }
+2 -1
src/applications/pholio/controller/PholioMockEditController.php
··· 87 87 } 88 88 89 89 if (!$files) { 90 - $e_images = 'Required'; 90 + $e_images = pht('Required'); 91 91 $errors[] = pht('You must add at least one image to the mock.'); 92 92 } else { 93 93 $mock->setCoverPHID(head($files)->getPHID()); ··· 211 211 $nav, 212 212 array( 213 213 'title' => $title, 214 + 'device' => true, 214 215 )); 215 216 } 216 217
+10 -5
src/applications/pholio/controller/PholioMockListController.php
··· 25 25 switch ($filter) { 26 26 case 'view/all': 27 27 default: 28 - $title = 'All Mocks'; 28 + $title = pht('All Mocks'); 29 29 break; 30 30 } 31 31 ··· 44 44 ->setImageSize(220, 165)); 45 45 } 46 46 47 - $header = id(new PhabricatorHeaderView()) 48 - ->setHeader($title); 49 - 50 47 $content = array( 51 - $header, 52 48 $board, 53 49 $pager, 54 50 ); 55 51 56 52 $nav->appendChild($content); 57 53 54 + $crumbs = $this->buildApplicationCrumbs($this->buildSideNav()); 55 + $crumbs->addCrumb( 56 + id(new PhabricatorCrumbView()) 57 + ->setName($title) 58 + ->setHref($this->getApplicationURI()) 59 + ); 60 + $nav->setCrumbs($crumbs); 61 + 58 62 return $this->buildApplicationPage( 59 63 $nav, 60 64 array( 61 65 'title' => $title, 66 + 'device' => true, 62 67 )); 63 68 } 64 69
+8 -1
src/applications/pholio/controller/PholioMockViewController.php
··· 74 74 75 75 $add_comment = $this->buildAddCommentView($mock); 76 76 77 + $crumbs = $this->buildApplicationCrumbs($this->buildSideNav()); 78 + $crumbs->addCrumb( 79 + id(new PhabricatorCrumbView()) 80 + ->setName($title) 81 + ->setHref($this->getApplicationURI().'M'.$this->id) 82 + ); 83 + 77 84 $content = array( 85 + $crumbs, 78 86 $header, 79 87 $actions, 80 88 $properties, ··· 82 90 $xaction_view, 83 91 $add_comment, 84 92 ); 85 - 86 93 87 94 return $this->buildApplicationPage( 88 95 $content,