@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 a footer to PHUITwoColumnView

Summary: This allows setting of full-width content underneath the two column, or full column all by itself. Maybe these names are bad.

Test Plan: Using these in Differential / Diffusion conversions.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+23 -31
+23 -31
src/view/phui/PHUITwoColumnView.php
··· 8 8 private $fluid; 9 9 private $header; 10 10 private $subheader; 11 + private $footer; 11 12 private $propertySection = array(); 12 - private $actionList; 13 - private $propertyList; 14 13 private $curtain; 15 14 16 15 const DISPLAY_LEFT = 'phui-side-column-left'; ··· 36 35 return $this; 37 36 } 38 37 39 - public function addPropertySection($title, $section) { 40 - $this->propertySection[] = array($title, $section); 38 + public function setFooter($footer) { 39 + $this->footer = $footer; 41 40 return $this; 42 41 } 43 42 44 - public function setActionList(PhabricatorActionListView $list) { 45 - $this->actionList = $list; 46 - return $this; 47 - } 48 - 49 - public function setPropertyList(PHUIPropertyListView $list) { 50 - $this->propertyList = $list; 43 + public function addPropertySection($title, $section) { 44 + $this->propertySection[] = array($title, $section); 51 45 return $this; 52 46 } 53 47 ··· 101 95 102 96 $main = $this->buildMainColumn(); 103 97 $side = $this->buildSideColumn(); 98 + $footer = $this->buildFooter(); 99 + 104 100 $order = array($side, $main); 105 101 106 102 $inner = phutil_tag_div('phui-two-column-row grouped', $order); ··· 111 107 $curtain = $this->getCurtain(); 112 108 if ($curtain) { 113 109 $action_list = $curtain->getActionList(); 114 - } else { 115 - $action_list = $this->actionList; 116 - } 117 - 118 - if ($action_list) { 119 110 $this->header->setActionList($action_list); 120 111 } 121 112 ··· 138 129 $header, 139 130 $subheader, 140 131 $table, 132 + $footer, 141 133 )); 142 134 } 143 135 ··· 169 161 } 170 162 171 163 private function buildSideColumn() { 172 - $property_list = $this->propertyList; 173 - $action_list = $this->actionList; 174 - 175 - $properties = null; 176 - if ($property_list || $action_list) { 177 - if ($property_list) { 178 - $property_list->setStacked(true); 179 - } 180 - 181 - $properties = id(new PHUIObjectBoxView()) 182 - ->appendChild($action_list) 183 - ->appendChild($property_list) 184 - ->addClass('phui-two-column-properties'); 185 - } 186 164 187 165 $curtain = $this->getCurtain(); 188 166 ··· 192 170 'class' => 'phui-side-column', 193 171 ), 194 172 array( 195 - $properties, 196 173 $curtain, 197 174 $this->sideColumn, 198 175 )); 176 + } 177 + 178 + private function buildFooter() { 179 + 180 + $footer = $this->footer; 181 + 182 + return phutil_tag( 183 + 'div', 184 + array( 185 + 'class' => 'phui-two-column-content phui-two-column-footer', 186 + ), 187 + array( 188 + $footer, 189 + )); 190 + 199 191 } 200 192 }