@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 Owners for PHUITwoColumn

Summary: Clean up owners a bit, move to two columns.

Test Plan:
Review a package, edit paths, remove all paths. Archive.

{F1139351}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+63 -31
+3 -3
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '3d58b25a', 10 + 'core.pkg.css' => 'd3b3a609', 11 11 'core.pkg.js' => '7d8faf57', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', ··· 123 123 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', 124 124 'rsrc/css/phui/phui-badge.css' => 'f25c3476', 125 125 'rsrc/css/phui/phui-big-info-view.css' => 'bd903741', 126 - 'rsrc/css/phui/phui-box.css' => 'c9e01148', 126 + 'rsrc/css/phui/phui-box.css' => '3830ab21', 127 127 'rsrc/css/phui/phui-button.css' => 'a64a8de6', 128 128 'rsrc/css/phui/phui-chart.css' => '6bf6f78e', 129 129 'rsrc/css/phui/phui-crumbs-view.css' => '79d536e5', ··· 803 803 'phui-action-panel-css' => '91c7b835', 804 804 'phui-badge-view-css' => 'f25c3476', 805 805 'phui-big-info-view-css' => 'bd903741', 806 - 'phui-box-css' => 'c9e01148', 806 + 'phui-box-css' => '3830ab21', 807 807 'phui-button-css' => 'a64a8de6', 808 808 'phui-calendar-css' => 'ccabe893', 809 809 'phui-calendar-day-css' => 'd1cf6f93',
+52 -28
src/applications/owners/controller/PhabricatorOwnersDetailController.php
··· 45 45 46 46 $actions = $this->buildPackageActionView($package); 47 47 $properties = $this->buildPackagePropertyView($package, $field_list); 48 - $properties->setActionList($actions); 48 + $details = $this->buildPackageDetailView($package, $field_list); 49 49 50 50 if ($package->isArchived()) { 51 51 $header_icon = 'fa-ban'; ··· 61 61 ->setUser($viewer) 62 62 ->setHeader($package->getName()) 63 63 ->setStatus($header_icon, $header_color, $header_name) 64 - ->setPolicyObject($package); 65 - 66 - $panel = id(new PHUIObjectBoxView()) 67 - ->setHeader($header) 68 - ->addPropertyList($properties); 64 + ->setPolicyObject($package) 65 + ->setHeaderIcon('fa-gift'); 69 66 70 67 $commit_views = array(); 71 68 ··· 91 88 92 89 $commit_views[] = array( 93 90 'view' => $view, 94 - 'header' => pht('Commits in this Package that Need Attention'), 91 + 'header' => pht('Needs Attention'), 92 + 'icon' => 'fa-warning', 95 93 'button' => id(new PHUIButtonView()) 96 94 ->setTag('a') 97 95 ->setHref($commit_uri->alter('status', $status_concern)) 98 - ->setText(pht('View All Problem Commits')), 96 + ->setIcon('fa-list-ul') 97 + ->setText(pht('View All')), 99 98 ); 100 99 101 100 $all_commits = id(new DiffusionCommitQuery()) ··· 112 111 113 112 $commit_views[] = array( 114 113 'view' => $view, 115 - 'header' => pht('Recent Commits in Package'), 114 + 'header' => pht('Recent Commits'), 115 + 'icon' => 'fa-code', 116 116 'button' => id(new PHUIButtonView()) 117 117 ->setTag('a') 118 118 ->setHref($commit_uri) 119 - ->setText(pht('View All Package Commits')), 119 + ->setIcon('fa-list-ul') 120 + ->setText(pht('View All')), 120 121 ); 121 122 122 123 $phids = array(); ··· 128 129 129 130 $commit_panels = array(); 130 131 foreach ($commit_views as $commit_view) { 131 - $commit_panel = new PHUIObjectBoxView(); 132 - $header = new PHUIHeaderView(); 133 - $header->setHeader($commit_view['header']); 132 + $commit_panel = id(new PHUIObjectBoxView()) 133 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 134 + $commit_header = id(new PHUIHeaderView()) 135 + ->setHeader($commit_view['header']) 136 + ->setHeaderIcon($commit_view['icon']); 134 137 if (isset($commit_view['button'])) { 135 - $header->addActionLink($commit_view['button']); 138 + $commit_header->addActionLink($commit_view['button']); 136 139 } 137 140 $commit_view['view']->setHandles($handles); 138 - $commit_panel->setHeader($header); 141 + $commit_panel->setHeader($commit_header); 139 142 $commit_panel->appendChild($commit_view['view']); 140 143 141 144 $commit_panels[] = $commit_panel; ··· 143 146 144 147 $crumbs = $this->buildApplicationCrumbs(); 145 148 $crumbs->addTextCrumb($package->getName()); 149 + $crumbs->setBorder(true); 146 150 147 151 $timeline = $this->buildTransactionTimeline( 148 152 $package, 149 153 new PhabricatorOwnersPackageTransactionQuery()); 150 154 $timeline->setShouldTerminate(true); 151 155 152 - return $this->buildApplicationPage( 153 - array( 154 - $crumbs, 155 - $panel, 156 + $view = id(new PHUITwoColumnView()) 157 + ->setHeader($header) 158 + ->setMainColumn(array( 156 159 $this->renderPathsTable($paths, $repositories), 157 160 $commit_panels, 158 161 $timeline, 159 - ), 160 - array( 161 - 'title' => $package->getName(), 162 + )) 163 + ->addPropertySection(pht('Details'), $details) 164 + ->setPropertyList($properties) 165 + ->setActionList($actions); 166 + 167 + return $this->newPage() 168 + ->setTitle($package->getName()) 169 + ->setCrumbs($crumbs) 170 + ->appendChild( 171 + array( 172 + $view, 162 173 )); 163 174 } 164 - 165 175 166 176 private function buildPackagePropertyView( 167 177 PhabricatorOwnersPackage $package, 168 178 PhabricatorCustomFieldList $field_list) { 169 179 170 180 $viewer = $this->getViewer(); 181 + $view = id(new PHUIPropertyListView()) 182 + ->setUser($viewer) 183 + ->setObject($package); 184 + $view->invokeWillRenderEvent(); 171 185 186 + return $view; 187 + } 188 + 189 + private function buildPackageDetailView( 190 + PhabricatorOwnersPackage $package, 191 + PhabricatorCustomFieldList $field_list) { 192 + 193 + $viewer = $this->getViewer(); 172 194 $view = id(new PHUIPropertyListView()) 173 195 ->setUser($viewer); 174 196 ··· 190 212 $description = $package->getDescription(); 191 213 if (strlen($description)) { 192 214 $description = new PHUIRemarkupView($viewer, $description); 193 - $view->addSectionHeader( 194 - pht('Description'), PHUIPropertyListView::ICON_SUMMARY); 215 + $view->addSectionHeader(pht('Description')); 195 216 $view->addTextContent($description); 196 217 } 197 - 198 - $view->invokeWillRenderEvent(); 199 218 200 219 $field_list->appendFieldsToPropertyList( 201 220 $package, ··· 314 333 'wide', 315 334 )); 316 335 336 + $header = id(new PHUIHeaderView()) 337 + ->setHeader(pht('Paths')) 338 + ->setHeaderIcon('fa-folder-open'); 339 + 317 340 $box = id(new PHUIObjectBoxView()) 318 - ->setHeaderText(pht('Paths')) 341 + ->setHeader($header) 342 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 319 343 ->setTable($table); 320 344 321 345 if ($info) {
+8
webroot/rsrc/css/phui/phui-box.css
··· 66 66 padding: 0; 67 67 } 68 68 69 + .phui-box.phui-box-blue-property .phui-header-header { 70 + text-transform: uppercase; 71 + } 72 + 73 + .phui-box.phui-box-blue-property .phui-header-header .phui-header-icon { 74 + margin-right: 6px; 75 + } 76 + 69 77 .phui-box.phui-box-blue-property .phui-header-action-link { 70 78 margin-top: 0; 71 79 margin-bottom: 0;