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

Convert Almanac Binding View to two columns

Summary: Moves over to the new layout. Fixes T10521

Test Plan: Make a binding, view page, add some properties.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10521

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

+32 -14
+32 -14
src/applications/almanac/controller/AlmanacBindingViewController.php
··· 26 26 27 27 $title = pht('Binding %s', $binding->getID()); 28 28 29 - $property_list = $this->buildPropertyList($binding); 30 - $action_list = $this->buildActionList($binding); 31 - $property_list->setActionList($action_list); 29 + $properties = $this->buildPropertyList($binding); 30 + $details = $this->buildPropertySection($binding); 31 + $actions = $this->buildActionList($binding); 32 32 33 33 $header = id(new PHUIHeaderView()) 34 34 ->setUser($viewer) 35 35 ->setHeader($title) 36 - ->setPolicyObject($binding); 36 + ->setPolicyObject($binding) 37 + ->setHeaderIcon('fa-object-group'); 37 38 38 39 if ($binding->getIsDisabled()) { 39 40 $header->setStatus('fa-ban', 'red', pht('Disabled')); 40 41 } 41 42 42 - $box = id(new PHUIObjectBoxView()) 43 - ->setHeader($header) 44 - ->addPropertyList($property_list); 45 - 43 + $issue = null; 46 44 if ($binding->getService()->isClusterService()) { 47 - $this->addClusterMessage( 48 - $box, 45 + $issue = $this->addClusterMessage( 49 46 pht('The service for this binding is a cluster service.'), 50 47 pht( 51 48 'The service for this binding is a cluster service. You do not '. ··· 56 53 $crumbs = $this->buildApplicationCrumbs(); 57 54 $crumbs->addTextCrumb($service->getName(), $service_uri); 58 55 $crumbs->addTextCrumb($title); 56 + $crumbs->setBorder(true); 59 57 60 58 $timeline = $this->buildTransactionTimeline( 61 59 $binding, 62 60 new AlmanacBindingTransactionQuery()); 63 61 $timeline->setShouldTerminate(true); 64 62 63 + $view = id(new PHUITwoColumnView()) 64 + ->setHeader($header) 65 + ->setMainColumn(array( 66 + $issue, 67 + $this->buildAlmanacPropertiesTable($binding), 68 + $timeline, 69 + )) 70 + ->setPropertyList($properties) 71 + ->addPropertySection(pht('DETAILS'), $details) 72 + ->setActionList($actions); 73 + 65 74 return $this->newPage() 66 75 ->setTitle($title) 67 76 ->setCrumbs($crumbs) 68 77 ->appendChild( 69 78 array( 70 - $box, 71 - $this->buildAlmanacPropertiesTable($binding), 72 - $timeline, 79 + $view, 73 80 )); 74 81 } 75 82 76 - private function buildPropertyList(AlmanacBinding $binding) { 83 + private function buildPropertySection(AlmanacBinding $binding) { 77 84 $viewer = $this->getViewer(); 78 85 79 86 $properties = id(new PHUIPropertyListView()) ··· 94 101 $properties->addProperty( 95 102 pht('Interface'), 96 103 $binding->getInterface()->renderDisplayAddress()); 104 + 105 + return $properties; 106 + } 107 + 108 + private function buildPropertyList(AlmanacBinding $binding) { 109 + $viewer = $this->getViewer(); 110 + 111 + $properties = id(new PHUIPropertyListView()) 112 + ->setUser($viewer) 113 + ->setObject($binding); 114 + $properties->invokeWillRenderEvent(); 97 115 98 116 return $properties; 99 117 }