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

Update Fund for PHUITwoColumnView

Summary: Updates the Fund application to use a two column layout

Test Plan: Make an initiative.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+30 -21
+30 -21
src/applications/fund/controller/FundInitiativeViewController.php
··· 7 7 return true; 8 8 } 9 9 10 - 11 10 public function handleRequest(AphrontRequest $request) { 12 11 $viewer = $request->getViewer(); 13 12 $id = $request->getURIData('id'); ··· 22 21 23 22 $crumbs = $this->buildApplicationCrumbs(); 24 23 $crumbs->addTextCrumb($initiative->getMonogram()); 24 + $crumbs->setBorder(true); 25 25 26 26 $title = pht( 27 27 '%s %s', ··· 43 43 ->setHeader($initiative->getName()) 44 44 ->setUser($viewer) 45 45 ->setPolicyObject($initiative) 46 - ->setStatus($status_icon, $status_color, $status_name); 46 + ->setStatus($status_icon, $status_color, $status_name) 47 + ->setHeaderIcon('fa-heart'); 47 48 48 49 $properties = $this->buildPropertyListView($initiative); 49 50 $actions = $this->buildActionListView($initiative); 50 - $properties->setActionList($actions); 51 - 52 - $box = id(new PHUIObjectBoxView()) 53 - ->setHeader($header) 54 - ->addPropertyList($properties); 55 - 51 + $details = $this->buildPropertySectionView($initiative); 56 52 57 53 $timeline = $this->buildTransactionTimeline( 58 54 $initiative, 59 55 new FundInitiativeTransactionQuery()); 60 - $timeline 61 - ->setShouldTerminate(true); 56 + $timeline->setShouldTerminate(true); 57 + 58 + $view = id(new PHUITwoColumnView()) 59 + ->setHeader($header) 60 + ->setMainColumn($timeline) 61 + ->setPropertyList($properties) 62 + ->addPropertySection(pht('DETAILS'), $details) 63 + ->setActionList($actions); 62 64 63 - return $this->buildApplicationPage( 64 - array( 65 - $crumbs, 66 - $box, 67 - $timeline, 68 - ), 69 - array( 70 - 'title' => $title, 71 - 'pageObjects' => array($initiative->getPHID()), 65 + return $this->newPage() 66 + ->setTitle($title) 67 + ->setCrumbs($crumbs) 68 + ->setPageObjectPHIDs(array($initiative->getPHID())) 69 + ->appendChild( 70 + array( 71 + $view, 72 72 )); 73 73 } 74 74 ··· 79 79 ->setUser($viewer) 80 80 ->setObject($initiative); 81 81 82 + $view->invokeWillRenderEvent(); 83 + 84 + return $view; 85 + } 86 + 87 + private function buildPropertySectionView(FundInitiative $initiative) { 88 + $viewer = $this->getRequest()->getUser(); 89 + 90 + $view = id(new PHUIPropertyListView()) 91 + ->setUser($viewer); 92 + 82 93 $owner_phid = $initiative->getOwnerPHID(); 83 94 $merchant_phid = $initiative->getMerchantPHID(); 84 95 ··· 93 104 $view->addProperty( 94 105 pht('Total Funding'), 95 106 $initiative->getTotalAsCurrency()->formatForDisplay()); 96 - 97 - $view->invokeWillRenderEvent(); 98 107 99 108 $description = $initiative->getDescription(); 100 109 if (strlen($description)) {