@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 Spaces to two column

Summary: Updates Spaces to new two column layout

Test Plan: Create a space, edit a space

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+43 -29
+17 -9
src/applications/spaces/controller/PhabricatorSpacesEditController.php
··· 162 162 ->addCancelButton($cancel_uri)); 163 163 164 164 $box = id(new PHUIObjectBoxView()) 165 - ->setHeaderText($header_text) 165 + ->setHeaderText(pht('Space')) 166 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 166 167 ->setValidationException($validation_exception) 167 168 ->appendChild($form); 168 169 ··· 173 174 $cancel_uri); 174 175 } 175 176 $crumbs->addTextCrumb($title); 177 + $crumbs->setBorder(true); 176 178 177 - return $this->buildApplicationPage( 178 - array( 179 - $crumbs, 180 - $box, 181 - ), 182 - array( 183 - 'title' => $title, 184 - )); 179 + $header = id(new PHUIHeaderView()) 180 + ->setHeader($header_text) 181 + ->setHeaderIcon('fa-pencil'); 182 + 183 + $view = id(new PHUITwoColumnView()) 184 + ->setHeader($header) 185 + ->setFooter(array( 186 + $box, 187 + )); 188 + 189 + return $this->newPage() 190 + ->setTitle($title) 191 + ->setCrumbs($crumbs) 192 + ->appendChild($view); 185 193 } 186 194 }
+26 -20
src/applications/spaces/controller/PhabricatorSpacesViewController.php
··· 18 18 return new Aphront404Response(); 19 19 } 20 20 21 - $action_list = $this->buildActionListView($space); 21 + $curtain = $this->buildCurtain($space); 22 22 $property_list = $this->buildPropertyListView($space); 23 - $property_list->setActionList($action_list); 23 + $title = array($space->getMonogram(), $space->getNamespaceName()); 24 24 25 25 $xactions = id(new PhabricatorSpacesNamespaceTransactionQuery()) 26 26 ->setViewer($viewer) ··· 35 35 $header = id(new PHUIHeaderView()) 36 36 ->setUser($viewer) 37 37 ->setHeader($space->getNamespaceName()) 38 - ->setPolicyObject($space); 38 + ->setPolicyObject($space) 39 + ->setHeaderIcon('fa-th-large'); 39 40 40 41 if ($space->getIsArchived()) { 41 42 $header->setStatus('fa-ban', 'red', pht('Archived')); ··· 44 45 } 45 46 46 47 $box = id(new PHUIObjectBoxView()) 47 - ->setHeader($header) 48 + ->setHeaderText(pht('DETAILS')) 49 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 48 50 ->addPropertyList($property_list); 49 51 50 52 $crumbs = $this->buildApplicationCrumbs(); 51 53 $crumbs->addTextCrumb($space->getMonogram()); 54 + $crumbs->setBorder(true); 52 55 53 - return $this->buildApplicationPage( 54 - array( 55 - $crumbs, 56 - $box, 57 - $timeline, 58 - ), 59 - array( 60 - 'title' => array($space->getMonogram(), $space->getNamespaceName()), 61 - )); 56 + $view = id(new PHUITwoColumnView()) 57 + ->setHeader($header) 58 + ->setMainColumn(array( 59 + $box, 60 + $timeline, 61 + )) 62 + ->setCurtain($curtain); 63 + 64 + return $this->newPage() 65 + ->setTitle($title) 66 + ->setCrumbs($crumbs) 67 + ->appendChild($view); 68 + 62 69 } 63 70 64 71 private function buildPropertyListView(PhabricatorSpacesNamespace $space) { ··· 93 100 return $list; 94 101 } 95 102 96 - private function buildActionListView(PhabricatorSpacesNamespace $space) { 103 + private function buildCurtain(PhabricatorSpacesNamespace $space) { 97 104 $viewer = $this->getRequest()->getUser(); 98 105 99 - $list = id(new PhabricatorActionListView()) 100 - ->setUser($viewer); 106 + $curtain = $this->newCurtainView($space); 101 107 102 108 $can_edit = PhabricatorPolicyFilter::hasCapability( 103 109 $viewer, 104 110 $space, 105 111 PhabricatorPolicyCapability::CAN_EDIT); 106 112 107 - $list->addAction( 113 + $curtain->addAction( 108 114 id(new PhabricatorActionView()) 109 115 ->setName(pht('Edit Space')) 110 116 ->setIcon('fa-pencil') ··· 115 121 $id = $space->getID(); 116 122 117 123 if ($space->getIsArchived()) { 118 - $list->addAction( 124 + $curtain->addAction( 119 125 id(new PhabricatorActionView()) 120 126 ->setName(pht('Activate Space')) 121 127 ->setIcon('fa-check') ··· 123 129 ->setDisabled(!$can_edit) 124 130 ->setWorkflow(true)); 125 131 } else { 126 - $list->addAction( 132 + $curtain->addAction( 127 133 id(new PhabricatorActionView()) 128 134 ->setName(pht('Archive Space')) 129 135 ->setIcon('fa-ban') ··· 132 138 ->setWorkflow(true)); 133 139 } 134 140 135 - return $list; 141 + return $curtain; 136 142 } 137 143 138 144 }