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

Use PropertyListView in Diffusion's repository view

Summary: Precursor to adding ActionList. Ref T2231.

Test Plan: {F44153}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T2231

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

+16 -22
+16 -22
src/applications/diffusion/controller/DiffusionRepositoryController.php
··· 136 136 137 137 private function buildPropertiesTable(PhabricatorRepository $repository) { 138 138 139 - $properties = array(); 140 - $properties['Name'] = $repository->getName(); 141 - $properties['Callsign'] = $repository->getCallsign(); 142 - $properties['Description'] = $repository->getDetail('description'); 139 + $header = id(new PhabricatorHeaderView()) 140 + ->setHeader($repository->getName()); 141 + 142 + $view = new PhabricatorPropertyListView(); 143 + $view->addProperty(pht('Callsign'), $repository->getCallsign()); 144 + 143 145 switch ($repository->getVersionControlSystem()) { 144 146 case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: 145 147 case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: 146 - $properties['Clone URI'] = $repository->getPublicRemoteURI(); 148 + $view->addProperty( 149 + pht('Clone URI'), 150 + $repository->getPublicRemoteURI()); 147 151 break; 148 152 case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: 149 - $properties['Repository Root'] = $repository->getPublicRemoteURI(); 153 + $view->addProperty( 154 + pht('Repository Root'), 155 + $repository->getPublicRemoteURI()); 150 156 break; 151 157 } 152 158 153 - $rows = array(); 154 - foreach ($properties as $key => $value) { 155 - $rows[] = array($key, $value); 159 + $description = $repository->getDetail('description'); 160 + if (strlen($description)) { 161 + $view->addTextContent($description); 156 162 } 157 163 158 - $table = new AphrontTableView($rows); 159 - $table->setColumnClasses( 160 - array( 161 - 'header', 162 - 'wide', 163 - )); 164 - 165 - $panel = new AphrontPanelView(); 166 - $panel->setHeader(pht('Repository Properties')); 167 - $panel->appendChild($table); 168 - $panel->setNoBackground(); 169 - 170 - return $panel; 164 + return array($header, $view); 171 165 } 172 166 173 167 private function buildBranchListTable(DiffusionRequest $drequest) {