@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 Diffusion UI

Summary: This updates (all?) of Diffusion/Audit to new UI, included edit and other extra form pages. It's fairly complete but I don't know all the nooks and crannies so to speak to fully verify I didn't mess anything up.

Test Plan: Tested creating new repositories, browsing, searching, auditing. Need more eyes.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+1049 -659
+18 -18
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '225e8ac7', 10 + 'core.pkg.css' => 'a93de192', 11 11 'core.pkg.js' => '7d8faf57', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '7ba78475', 14 14 'differential.pkg.js' => 'd0cd0df6', 15 - 'diffusion.pkg.css' => 'f45955ed', 15 + 'diffusion.pkg.css' => 'dc8e0cc2', 16 16 'diffusion.pkg.js' => '3a9a8bfa', 17 17 'maniphest.pkg.css' => '4845691a', 18 18 'maniphest.pkg.js' => '949a7498', ··· 64 64 'rsrc/css/application/differential/revision-history.css' => '0e8eb855', 65 65 'rsrc/css/application/differential/revision-list.css' => 'f3c47d33', 66 66 'rsrc/css/application/differential/table-of-contents.css' => 'ae4b7a55', 67 - 'rsrc/css/application/diffusion/diffusion-icons.css' => '2941baf1', 67 + 'rsrc/css/application/diffusion/diffusion-icons.css' => '3311444d', 68 68 'rsrc/css/application/diffusion/diffusion-readme.css' => '356a4f3c', 69 - 'rsrc/css/application/diffusion/diffusion-source.css' => '075ba788', 69 + 'rsrc/css/application/diffusion/diffusion-source.css' => '68b30fd3', 70 70 'rsrc/css/application/feed/feed.css' => 'ecd4ec57', 71 71 'rsrc/css/application/files/global-drag-and-drop.css' => '5c1b47c2', 72 72 'rsrc/css/application/flag/flag.css' => '5337623f', ··· 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' => '96a10c5d', 126 + 'rsrc/css/phui/phui-box.css' => 'b2d49bae', 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', ··· 135 135 'rsrc/css/phui/phui-fontkit.css' => '9cda225e', 136 136 'rsrc/css/phui/phui-form-view.css' => '4a1a0f5e', 137 137 'rsrc/css/phui/phui-form.css' => 'aac1d51d', 138 - 'rsrc/css/phui/phui-head-thing.css' => '31638812', 139 - 'rsrc/css/phui/phui-header-view.css' => '26cffd3d', 138 + 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', 139 + 'rsrc/css/phui/phui-header-view.css' => '230254d3', 140 140 'rsrc/css/phui/phui-hovercard.css' => 'de1a2119', 141 141 'rsrc/css/phui/phui-icon-set-selector.css' => '1ab67aad', 142 142 'rsrc/css/phui/phui-icon.css' => '3f33ab57', 143 143 'rsrc/css/phui/phui-image-mask.css' => 'a8498f9c', 144 144 'rsrc/css/phui/phui-info-panel.css' => '27ea50a1', 145 - 'rsrc/css/phui/phui-info-view.css' => '6d7c3509', 145 + 'rsrc/css/phui/phui-info-view.css' => '28efab79', 146 146 'rsrc/css/phui/phui-list.css' => '9da2aa00', 147 147 'rsrc/css/phui/phui-object-box.css' => '6b487c57', 148 148 'rsrc/css/phui/phui-object-item-list-view.css' => '18b2ce8e', 149 149 'rsrc/css/phui/phui-pager.css' => 'bea33d23', 150 150 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', 151 151 'rsrc/css/phui/phui-profile-menu.css' => '7e92a89a', 152 - 'rsrc/css/phui/phui-property-list-view.css' => 'b12e801c', 152 + 'rsrc/css/phui/phui-property-list-view.css' => '1d42ee7c', 153 153 'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591', 154 154 'rsrc/css/phui/phui-segment-bar-view.css' => '46342871', 155 155 'rsrc/css/phui/phui-spacing.css' => '042804d6', 156 156 'rsrc/css/phui/phui-status.css' => '37309046', 157 157 'rsrc/css/phui/phui-tag-view.css' => '6bbd83e2', 158 158 'rsrc/css/phui/phui-timeline-view.css' => 'a0173eba', 159 - 'rsrc/css/phui/phui-two-column-view.css' => '61dd6d38', 159 + 'rsrc/css/phui/phui-two-column-view.css' => 'c110d0c3', 160 160 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7', 161 161 'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647', 162 162 'rsrc/css/phui/workboards/phui-workcard.css' => '3646fb96', ··· 553 553 'differential-revision-history-css' => '0e8eb855', 554 554 'differential-revision-list-css' => 'f3c47d33', 555 555 'differential-table-of-contents-css' => 'ae4b7a55', 556 - 'diffusion-icons-css' => '2941baf1', 556 + 'diffusion-icons-css' => '3311444d', 557 557 'diffusion-readme-css' => '356a4f3c', 558 - 'diffusion-source-css' => '075ba788', 558 + 'diffusion-source-css' => '68b30fd3', 559 559 'diviner-shared-css' => 'aa3656aa', 560 560 'font-aleo' => '8bdb2835', 561 561 'font-fontawesome' => 'c43323c5', ··· 805 805 'phui-action-panel-css' => '91c7b835', 806 806 'phui-badge-view-css' => 'f25c3476', 807 807 'phui-big-info-view-css' => 'bd903741', 808 - 'phui-box-css' => '96a10c5d', 808 + 'phui-box-css' => 'b2d49bae', 809 809 'phui-button-css' => 'a64a8de6', 810 810 'phui-calendar-css' => 'ccabe893', 811 811 'phui-calendar-day-css' => 'd1cf6f93', ··· 822 822 'phui-fontkit-css' => '9cda225e', 823 823 'phui-form-css' => 'aac1d51d', 824 824 'phui-form-view-css' => '4a1a0f5e', 825 - 'phui-head-thing-view-css' => '31638812', 826 - 'phui-header-view-css' => '26cffd3d', 825 + 'phui-head-thing-view-css' => 'fd311e5f', 826 + 'phui-header-view-css' => '230254d3', 827 827 'phui-hovercard' => '1bd28176', 828 828 'phui-hovercard-view-css' => 'de1a2119', 829 829 'phui-icon-set-selector-css' => '1ab67aad', 830 830 'phui-icon-view-css' => '3f33ab57', 831 831 'phui-image-mask-css' => 'a8498f9c', 832 832 'phui-info-panel-css' => '27ea50a1', 833 - 'phui-info-view-css' => '6d7c3509', 833 + 'phui-info-view-css' => '28efab79', 834 834 'phui-inline-comment-view-css' => '5953c28e', 835 835 'phui-list-view-css' => '9da2aa00', 836 836 'phui-object-box-css' => '6b487c57', ··· 838 838 'phui-pager-css' => 'bea33d23', 839 839 'phui-pinboard-view-css' => '2495140e', 840 840 'phui-profile-menu-css' => '7e92a89a', 841 - 'phui-property-list-view-css' => 'b12e801c', 841 + 'phui-property-list-view-css' => '1d42ee7c', 842 842 'phui-remarkup-preview-css' => '1a8f2591', 843 843 'phui-segment-bar-view-css' => '46342871', 844 844 'phui-spacing-css' => '042804d6', ··· 846 846 'phui-tag-view-css' => '6bbd83e2', 847 847 'phui-theme-css' => '027ba77e', 848 848 'phui-timeline-view-css' => 'a0173eba', 849 - 'phui-two-column-view-css' => '61dd6d38', 849 + 'phui-two-column-view-css' => 'c110d0c3', 850 850 'phui-workboard-color-css' => 'ac6fe6a7', 851 851 'phui-workboard-view-css' => 'e6d89647', 852 852 'phui-workcard-view-css' => '3646fb96',
+5 -3
src/applications/audit/constants/PhabricatorAuditCommitStatusConstants.php
··· 37 37 $color = 'red'; 38 38 break; 39 39 case self::NEEDS_AUDIT: 40 - case self::PARTIALLY_AUDITED: 41 40 $color = 'orange'; 41 + break; 42 + case self::PARTIALLY_AUDITED: 43 + $color = 'yellow'; 42 44 break; 43 45 case self::FULLY_AUDITED: 44 46 $color = 'green'; ··· 53 55 public static function getStatusIcon($code) { 54 56 switch ($code) { 55 57 case self::CONCERN_RAISED: 56 - $icon = 'fa-exclamation-triangle'; 58 + $icon = 'fa-exclamation-circle'; 57 59 break; 58 60 case self::NEEDS_AUDIT: 59 61 case self::PARTIALLY_AUDITED: 60 - $icon = 'fa-exclamation-triangle'; 62 + $icon = 'fa-exclamation-circle'; 61 63 break; 62 64 case self::FULLY_AUDITED: 63 65 $icon = 'fa-check';
+15
src/applications/differential/constants/DifferentialChangeType.php
··· 81 81 return idx($icons, $type, 'fa-file'); 82 82 } 83 83 84 + public static function getIconColorForFileType($type) { 85 + static $icons = array( 86 + self::FILE_TEXT => 'black', 87 + self::FILE_IMAGE => 'black', 88 + self::FILE_BINARY => 'green', 89 + self::FILE_DIRECTORY => 'blue', 90 + self::FILE_SYMLINK => 'blue', 91 + self::FILE_DELETED => 'red', 92 + self::FILE_NORMAL => 'black', 93 + self::FILE_SUBMODULE => 'blue', 94 + ); 95 + 96 + return idx($icons, $type, 'black'); 97 + } 98 + 84 99 public static function isOldLocationChangeType($type) { 85 100 static $types = array( 86 101 self::TYPE_MOVE_AWAY => true,
+13 -3
src/applications/differential/view/DifferentialChangesetListView.php
··· 9 9 private $renderURI = '/differential/changeset/'; 10 10 private $whitespace; 11 11 private $background; 12 + private $header; 12 13 13 14 private $standaloneURI; 14 15 private $leftRawFileURI; ··· 115 116 116 117 public function setBackground($background) { 117 118 $this->background = $background; 119 + return $this; 120 + } 121 + 122 + public function setHeader($header) { 123 + $this->header = $header; 118 124 return $this; 119 125 } 120 126 ··· 246 252 )); 247 253 } 248 254 249 - $header = id(new PHUIHeaderView()) 250 - ->setHeader($this->getTitle()); 255 + if ($this->header) { 256 + $header = $this->header; 257 + } else { 258 + $header = id(new PHUIHeaderView()) 259 + ->setHeader($this->getTitle()); 260 + } 251 261 252 262 $content = phutil_tag( 253 263 'div', ··· 259 269 260 270 $object_box = id(new PHUIObjectBoxView()) 261 271 ->setHeader($header) 262 - ->setCollapsed(true) 263 272 ->setBackground($this->background) 273 + ->setCollapsed(true) 264 274 ->appendChild($content); 265 275 266 276 return $object_box;
+18 -8
src/applications/diffusion/controller/DiffusionBranchTableController.php
··· 48 48 ->withRepository($repository) 49 49 ->execute(); 50 50 51 - $view = id(new DiffusionBranchTableView()) 51 + $table = id(new DiffusionBranchTableView()) 52 52 ->setUser($viewer) 53 53 ->setBranches($branches) 54 54 ->setCommits($commits) 55 55 ->setDiffusionRequest($drequest); 56 56 57 - $panel = id(new PHUIObjectBoxView()) 58 - ->setHeaderText(pht('Branches')) 59 - ->setTable($view); 60 - 61 - $content = $panel; 57 + $content = id(new PHUIObjectBoxView()) 58 + ->setHeaderText($repository->getName()) 59 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 60 + ->setTable($table); 62 61 } 63 62 64 63 $crumbs = $this->buildCrumbs( 65 64 array( 66 65 'branches' => true, 67 66 )); 67 + $crumbs->setBorder(true); 68 68 69 69 $pager_box = $this->renderTablePagerBox($pager); 70 70 71 + $header = id(new PHUIHeaderView()) 72 + ->setHeader(pht('Branches')) 73 + ->setHeaderIcon('fa-code-fork'); 74 + 75 + $view = id(new PHUITwoColumnView()) 76 + ->setHeader($header) 77 + ->setFooter(array( 78 + $content, 79 + $pager_box, 80 + )); 81 + 71 82 return $this->newPage() 72 83 ->setTitle( 73 84 array( ··· 77 88 ->setCrumbs($crumbs) 78 89 ->appendChild( 79 90 array( 80 - $content, 81 - $pager_box, 91 + $view, 82 92 )); 83 93 } 84 94
+171 -147
src/applications/diffusion/controller/DiffusionBrowseController.php
··· 55 55 } 56 56 57 57 private function browseSearch() { 58 + 58 59 $drequest = $this->getDiffusionRequest(); 60 + $header = $this->buildHeaderView($drequest); 59 61 60 - $actions = $this->buildActionView($drequest); 61 - $properties = $this->buildPropertyView($drequest, $actions); 62 + $search_form = $this->renderSearchForm(); 63 + $search_results = $this->renderSearchResults(); 62 64 63 - $object_box = id(new PHUIObjectBoxView()) 64 - ->setHeader($this->buildHeaderView($drequest)) 65 - ->addPropertyList($properties); 66 - 67 - $content = array(); 68 - 69 - $content[] = $object_box; 70 - $content[] = $this->renderSearchForm($collapsed = false); 71 - $content[] = $this->renderSearchResults(); 65 + $search_form = id(new PHUIObjectBoxView()) 66 + ->setHeaderText(pht('Search')) 67 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 68 + ->appendChild($search_form); 72 69 73 70 $crumbs = $this->buildCrumbs( 74 71 array( ··· 76 73 'path' => true, 77 74 'view' => 'browse', 78 75 )); 76 + $crumbs->setBorder(true); 77 + 78 + $view = id(new PHUITwoColumnView()) 79 + ->setHeader($header) 80 + ->setFooter(array( 81 + $search_form, 82 + $search_results, 83 + )); 79 84 80 85 return $this->newPage() 81 86 ->setTitle( ··· 84 89 $drequest->getRepository()->getDisplayName(), 85 90 )) 86 91 ->setCrumbs($crumbs) 87 - ->appendChild($content); 92 + ->appendChild($view); 88 93 } 89 94 90 95 private function browseFile() { ··· 218 223 require_celerity_resource('diffusion-source-css'); 219 224 220 225 // Render the page. 221 - $view = $this->buildActionView($drequest); 222 - $action_list = $this->enrichActionView( 226 + $view = $this->buildCurtain($drequest); 227 + $curtain = $this->enrichCurtain( 223 228 $view, 224 229 $drequest, 225 230 $show_blame, 226 231 $show_color); 227 232 228 - $properties = $this->buildPropertyView($drequest, $action_list); 229 - $object_box = id(new PHUIObjectBoxView()) 230 - ->setHeader($this->buildHeaderView($drequest)) 231 - ->addPropertyList($properties); 233 + $properties = $this->buildPropertyView($drequest); 234 + $header = $this->buildHeaderView($drequest); 235 + $header->setHeaderIcon('fa-file-code-o'); 232 236 233 237 $content = array(); 234 - $content[] = $object_box; 235 238 236 239 $follow = $request->getStr('follow'); 237 240 if ($follow) { ··· 277 280 'path' => true, 278 281 'view' => 'browse', 279 282 )); 283 + $crumbs->setBorder(true); 280 284 281 285 $basename = basename($this->getDiffusionRequest()->getPath()); 282 286 287 + $view = id(new PHUITwoColumnView()) 288 + ->setHeader($header) 289 + ->setCurtain($curtain) 290 + ->setMainColumn(array( 291 + $content, 292 + )); 293 + 294 + if ($properties) { 295 + $view->addPropertySection(pht('DETAILS'), $properties); 296 + } 297 + 298 + $title = array($basename, $repository->getDisplayName()); 299 + 283 300 return $this->newPage() 284 - ->setTitle( 301 + ->setTitle($title) 302 + ->setCrumbs($crumbs) 303 + ->appendChild( 285 304 array( 286 - $basename, 287 - $repository->getDisplayName(), 288 - )) 289 - ->setCrumbs($crumbs) 290 - ->appendChild($content); 305 + $view, 306 + )); 307 + 291 308 } 292 309 293 310 public function browseDirectory( ··· 300 317 301 318 $reason = $results->getReasonForEmptyResultSet(); 302 319 303 - $content = array(); 304 - $actions = $this->buildActionView($drequest); 305 - $properties = $this->buildPropertyView($drequest, $actions); 320 + $curtain = $this->buildCurtain($drequest); 321 + $details = $this->buildPropertyView($drequest); 306 322 307 - $object_box = id(new PHUIObjectBoxView()) 308 - ->setHeader($this->buildHeaderView($drequest)) 309 - ->addPropertyList($properties); 323 + $header = $this->buildHeaderView($drequest); 324 + $header->setHeaderIcon('fa-folder-open'); 310 325 311 - $content[] = $object_box; 312 - $content[] = $this->renderSearchForm($collapsed = true); 326 + $search_form = $this->renderSearchForm(); 313 327 328 + $empty_result = null; 329 + $browse_panel = null; 314 330 if (!$results->isValidResults()) { 315 331 $empty_result = new DiffusionEmptyResultView(); 316 332 $empty_result->setDiffusionRequest($drequest); 317 333 $empty_result->setDiffusionBrowseResultSet($results); 318 334 $empty_result->setView($request->getStr('view')); 319 - $content[] = $empty_result; 320 335 } else { 321 336 $phids = array(); 322 337 foreach ($results->getPaths() as $result) { ··· 331 346 $phids = array_keys($phids); 332 347 $handles = $this->loadViewerHandles($phids); 333 348 334 - $browse_table = new DiffusionBrowseTableView(); 335 - $browse_table->setDiffusionRequest($drequest); 336 - $browse_table->setHandles($handles); 337 - $browse_table->setPaths($results->getPaths()); 338 - $browse_table->setUser($request->getUser()); 349 + $browse_table = id(new DiffusionBrowseTableView()) 350 + ->setDiffusionRequest($drequest) 351 + ->setHandles($handles) 352 + ->setPaths($results->getPaths()) 353 + ->setUser($request->getUser()); 339 354 340 - $browse_panel = new PHUIObjectBoxView(); 341 - $browse_panel->setHeaderText($drequest->getPath(), '/'); 342 - $browse_panel->setTable($browse_table); 355 + $browse_header = id(new PHUIHeaderView()) 356 + ->setHeader(nonempty(basename($drequest->getPath()), '/')) 357 + ->setHeaderIcon('fa-folder-open'); 343 358 344 - $content[] = $browse_panel; 359 + $browse_panel = id(new PHUIObjectBoxView()) 360 + ->setHeader($browse_header) 361 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 362 + ->setTable($browse_table); 363 + 364 + $browse_panel->setShowHide( 365 + array(pht('Show Search')), 366 + pht('Hide Search'), 367 + $search_form, 368 + '#'); 345 369 } 346 370 347 - $content[] = $this->buildOpenRevisions(); 348 - $content[] = $this->renderDirectoryReadme($results); 371 + $open_revisions = $this->buildOpenRevisions(); 372 + $readme = $this->renderDirectoryReadme($results); 349 373 350 374 $crumbs = $this->buildCrumbs( 351 375 array( ··· 355 379 )); 356 380 357 381 $pager_box = $this->renderTablePagerBox($pager); 382 + $crumbs->setBorder(true); 383 + 384 + $view = id(new PHUITwoColumnView()) 385 + ->setHeader($header) 386 + ->setCurtain($curtain) 387 + ->setMainColumn(array( 388 + $empty_result, 389 + $browse_panel, 390 + )) 391 + ->setFooter(array( 392 + $open_revisions, 393 + $readme, 394 + $pager_box, 395 + )); 396 + 397 + if ($details) { 398 + $view->addPropertySection(pht('DETAILS'), $details); 399 + } 358 400 359 401 return $this->newPage() 360 - ->setTitle( 361 - array( 402 + ->setTitle(array( 362 403 nonempty(basename($drequest->getPath()), '/'), 363 404 $repository->getDisplayName(), 364 405 )) 365 406 ->setCrumbs($crumbs) 366 407 ->appendChild( 367 408 array( 368 - $content, 369 - $pager_box, 409 + $view, 370 410 )); 371 411 } 372 412 ··· 431 471 432 472 $box = id(new PHUIObjectBoxView()) 433 473 ->setHeaderText($header) 474 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 434 475 ->setTable($table); 435 476 436 477 $pager_box = $this->renderTablePagerBox($pager); ··· 697 738 $edit = $this->renderEditButton(); 698 739 $file = $this->renderFileButton(); 699 740 $header = id(new PHUIHeaderView()) 700 - ->setHeader(pht('File Contents')) 741 + ->setHeader(basename($this->getDiffusionRequest()->getPath())) 742 + ->setHeaderIcon('fa-file-code-o') 701 743 ->addActionLink($edit) 702 744 ->addActionLink($file); 703 745 704 746 $corpus = id(new PHUIObjectBoxView()) 705 747 ->setHeader($header) 748 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 706 749 ->appendChild($corpus) 707 750 ->setCollapsed(true); 708 751 ··· 737 780 return $corpus; 738 781 } 739 782 740 - private function enrichActionView( 741 - PhabricatorActionListView $view, 783 + private function enrichCurtain( 784 + PHUICurtainView $curtain, 742 785 DiffusionRequest $drequest, 743 786 $show_blame, 744 787 $show_color) { 745 788 746 - $viewer = $this->getRequest()->getUser(); 789 + $viewer = $this->getViewer(); 747 790 $base_uri = $this->getRequest()->getRequestURI(); 748 791 749 - $view->addAction( 792 + $curtain->addAction( 750 793 id(new PhabricatorActionView()) 751 794 ->setName(pht('Show Last Change')) 752 795 ->setHref( ··· 766 809 $blame_value = 1; 767 810 } 768 811 769 - $view->addAction( 812 + $curtain->addAction( 770 813 id(new PhabricatorActionView()) 771 814 ->setName($blame_text) 772 815 ->setHref($base_uri->alter('blame', $blame_value)) ··· 784 827 $highlight_value = 1; 785 828 } 786 829 787 - $view->addAction( 830 + $curtain->addAction( 788 831 id(new PhabricatorActionView()) 789 832 ->setName($highlight_text) 790 833 ->setHref($base_uri->alter('color', $highlight_value)) ··· 809 852 ))->alter('lint', ''); 810 853 } 811 854 812 - $view->addAction( 855 + $curtain->addAction( 813 856 id(new PhabricatorActionView()) 814 857 ->setName($lint_text) 815 858 ->setHref($href) 816 859 ->setIcon('fa-exclamation-triangle') 817 860 ->setDisabled(!$href)); 818 861 819 - return $view; 862 + 863 + $repository = $drequest->getRepository(); 864 + 865 + $owners = 'PhabricatorOwnersApplication'; 866 + if (PhabricatorApplication::isClassInstalled($owners)) { 867 + $package_query = id(new PhabricatorOwnersPackageQuery()) 868 + ->setViewer($viewer) 869 + ->withStatuses(array(PhabricatorOwnersPackage::STATUS_ACTIVE)) 870 + ->withControl( 871 + $repository->getPHID(), 872 + array( 873 + $drequest->getPath(), 874 + )); 875 + 876 + $package_query->execute(); 877 + 878 + $packages = $package_query->getControllingPackagesForPath( 879 + $repository->getPHID(), 880 + $drequest->getPath()); 881 + 882 + if ($packages) { 883 + $ownership = id(new PHUIStatusListView()) 884 + ->setUser($viewer); 885 + 886 + foreach ($packages as $package) { 887 + $icon = 'fa-list-alt'; 888 + $color = 'grey'; 889 + 890 + $item = id(new PHUIStatusItemView()) 891 + ->setIcon($icon, $color) 892 + ->setTarget($viewer->renderHandle($package->getPHID())); 893 + 894 + $ownership->addItem($item); 895 + } 896 + } else { 897 + $ownership = phutil_tag('em', array(), pht('None')); 898 + } 899 + 900 + $curtain->newPanel() 901 + ->setHeaderText(pht('Owners')) 902 + ->appendChild($ownership); 903 + } 904 + 905 + return $curtain; 820 906 } 821 907 822 908 private function renderEditButton() { ··· 1265 1351 1266 1352 $file = $this->renderFileButton($file_uri); 1267 1353 $header = id(new PHUIHeaderView()) 1268 - ->setHeader(pht('Image')) 1269 - ->addActionLink($file); 1354 + ->setHeader(basename($this->getDiffusionRequest()->getPath())) 1355 + ->addActionLink($file) 1356 + ->setHeaderIcon('fa-file-image-o'); 1270 1357 1271 1358 return id(new PHUIObjectBoxView()) 1272 1359 ->setHeader($header) 1360 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 1273 1361 ->addPropertyList($properties); 1274 1362 } 1275 1363 ··· 1282 1370 1283 1371 $file = $this->renderFileButton($file_uri); 1284 1372 $header = id(new PHUIHeaderView()) 1285 - ->setHeader(pht('Details')) 1373 + ->setHeader(pht('DETAILS')) 1286 1374 ->addActionLink($file); 1287 1375 1288 1376 $box = id(new PHUIObjectBoxView()) 1289 1377 ->setHeader($header) 1378 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 1290 1379 ->appendChild($text); 1291 1380 1292 1381 return $box; ··· 1298 1387 ->appendChild($message); 1299 1388 1300 1389 $header = id(new PHUIHeaderView()) 1301 - ->setHeader(pht('Details')); 1390 + ->setHeader(pht('DETAILS')); 1302 1391 1303 1392 $box = id(new PHUIObjectBoxView()) 1304 1393 ->setHeader($header) ··· 1461 1550 return "{$summary}\n{$date} \xC2\xB7 {$author}"; 1462 1551 } 1463 1552 1464 - protected function renderSearchForm($collapsed) { 1553 + protected function renderSearchForm() { 1465 1554 $drequest = $this->getDiffusionRequest(); 1466 1555 1467 1556 $forms = array(); 1468 1557 $form = id(new AphrontFormView()) 1469 - ->setUser($this->getRequest()->getUser()) 1558 + ->setUser($this->getViewer()) 1470 1559 ->setMethod('GET'); 1471 1560 1472 1561 switch ($drequest->getRepository()->getVersionControlSystem()) { ··· 1492 1581 break; 1493 1582 } 1494 1583 1495 - $filter = new AphrontListFilterView(); 1496 - $filter->appendChild($forms); 1497 - 1498 - if ($collapsed) { 1499 - $filter->setCollapsed( 1500 - pht('Show Search'), 1501 - pht('Hide Search'), 1502 - pht('Search for file names or content in this directory.'), 1503 - '#'); 1504 - } 1505 - 1506 - $filter = id(new PHUIBoxView()) 1507 - ->addClass('mlt mlb') 1508 - ->appendChild($filter); 1584 + require_celerity_resource('diffusion-icons-css'); 1585 + $form_box = phutil_tag_div('diffusion-search-boxen', $forms); 1509 1586 1510 - return $filter; 1587 + return $form_box; 1511 1588 } 1512 1589 1513 1590 protected function markupText($text) { ··· 1526 1603 } 1527 1604 1528 1605 protected function buildHeaderView(DiffusionRequest $drequest) { 1529 - $viewer = $this->getRequest()->getUser(); 1606 + $viewer = $this->getViewer(); 1607 + 1608 + $tag = $this->renderCommitHashTag($drequest); 1530 1609 1531 1610 $header = id(new PHUIHeaderView()) 1532 1611 ->setUser($viewer) 1533 1612 ->setHeader($this->renderPathLinks($drequest, $mode = 'browse')) 1534 - ->setPolicyObject($drequest->getRepository()); 1613 + ->addTag($tag); 1535 1614 1536 1615 return $header; 1537 1616 } 1538 1617 1539 - protected function buildActionView(DiffusionRequest $drequest) { 1540 - $viewer = $this->getRequest()->getUser(); 1618 + protected function buildCurtain(DiffusionRequest $drequest) { 1619 + $viewer = $this->getViewer(); 1541 1620 1542 - $view = id(new PhabricatorActionListView()) 1543 - ->setUser($viewer); 1621 + $curtain = $this->newCurtainView($drequest); 1544 1622 1545 1623 $history_uri = $drequest->generateURI( 1546 1624 array( 1547 1625 'action' => 'history', 1548 1626 )); 1549 1627 1550 - $view->addAction( 1628 + $curtain->addAction( 1551 1629 id(new PhabricatorActionView()) 1552 1630 ->setName(pht('View History')) 1553 1631 ->setHref($history_uri) ··· 1559 1637 'commit' => '', 1560 1638 'action' => 'browse', 1561 1639 )); 1562 - $view->addAction( 1640 + $curtain->addAction( 1563 1641 id(new PhabricatorActionView()) 1564 1642 ->setName(pht('Jump to HEAD')) 1565 1643 ->setHref($head_uri) 1566 1644 ->setIcon('fa-home') 1567 1645 ->setDisabled(!$behind_head)); 1568 1646 1569 - return $view; 1647 + return $curtain; 1570 1648 } 1571 1649 1572 1650 protected function buildPropertyView( 1573 - DiffusionRequest $drequest, 1574 - PhabricatorActionListView $actions) { 1651 + DiffusionRequest $drequest) { 1575 1652 1576 1653 $viewer = $this->getViewer(); 1577 - 1578 1654 $view = id(new PHUIPropertyListView()) 1579 - ->setUser($viewer) 1580 - ->setActionList($actions); 1581 - 1582 - $stable_commit = $drequest->getStableCommit(); 1583 - 1584 - $view->addProperty( 1585 - pht('Commit'), 1586 - phutil_tag( 1587 - 'a', 1588 - array( 1589 - 'href' => $drequest->generateURI( 1590 - array( 1591 - 'action' => 'commit', 1592 - 'commit' => $stable_commit, 1593 - )), 1594 - ), 1595 - $drequest->getRepository()->formatCommitName($stable_commit))); 1655 + ->setUser($viewer); 1596 1656 1597 1657 if ($drequest->getSymbolicType() == 'tag') { 1598 1658 $symbolic = $drequest->getSymbolicCommit(); ··· 1616 1676 } 1617 1677 } 1618 1678 1619 - $repository = $drequest->getRepository(); 1620 - 1621 - $owners = 'PhabricatorOwnersApplication'; 1622 - if (PhabricatorApplication::isClassInstalled($owners)) { 1623 - $package_query = id(new PhabricatorOwnersPackageQuery()) 1624 - ->setViewer($viewer) 1625 - ->withStatuses(array(PhabricatorOwnersPackage::STATUS_ACTIVE)) 1626 - ->withControl( 1627 - $repository->getPHID(), 1628 - array( 1629 - $drequest->getPath(), 1630 - )); 1631 - 1632 - $package_query->execute(); 1633 - 1634 - $packages = $package_query->getControllingPackagesForPath( 1635 - $repository->getPHID(), 1636 - $drequest->getPath()); 1637 - 1638 - if ($packages) { 1639 - $ownership = id(new PHUIStatusListView()) 1640 - ->setUser($viewer); 1641 - 1642 - foreach ($packages as $package) { 1643 - $icon = 'fa-list-alt'; 1644 - $color = 'grey'; 1645 - 1646 - $item = id(new PHUIStatusItemView()) 1647 - ->setIcon($icon, $color) 1648 - ->setTarget($viewer->renderHandle($package->getPHID())); 1649 - 1650 - $ownership->addItem($item); 1651 - } 1652 - } else { 1653 - $ownership = phutil_tag('em', array(), pht('None')); 1654 - } 1655 - 1656 - $view->addProperty(pht('Packages'), $ownership); 1679 + if ($view->hasAnyProperties()) { 1680 + return $view; 1657 1681 } 1658 1682 1659 - return $view; 1683 + return null; 1660 1684 } 1661 1685 1662 1686 private function buildOpenRevisions() {
+42 -26
src/applications/diffusion/controller/DiffusionChangeController.php
··· 15 15 $viewer = $this->getViewer(); 16 16 $drequest = $this->getDiffusionRequest(); 17 17 18 - $content = array(); 19 - 20 18 $data = $this->callConduitWithDiffusionRequest( 21 19 'diffusion.diffquery', 22 20 array( ··· 42 40 0 => $changeset, 43 41 ); 44 42 43 + $changeset_header = $this->buildChangesetHeader($drequest); 44 + 45 45 $changeset_view = new DifferentialChangesetListView(); 46 - $changeset_view->setTitle(pht('Change')); 47 46 $changeset_view->setChangesets($changesets); 47 + $changeset_view->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 48 48 $changeset_view->setVisibleChangesets($changesets); 49 49 $changeset_view->setRenderingReferences( 50 50 array( ··· 68 68 $changeset_view->setWhitespace( 69 69 DifferentialChangesetParser::WHITESPACE_SHOW_ALL); 70 70 $changeset_view->setUser($viewer); 71 + $changeset_view->setHeader($changeset_header); 71 72 72 73 // TODO: This is pretty awkward, unify the CSS between Diffusion and 73 74 // Differential better. 74 75 require_celerity_resource('differential-core-view-css'); 75 - $content[] = $changeset_view->render(); 76 76 77 77 $crumbs = $this->buildCrumbs( 78 78 array( ··· 80 80 'path' => true, 81 81 'view' => 'change', 82 82 )); 83 + $crumbs->setBorder(true); 83 84 84 85 $links = $this->renderPathLinks($drequest, $mode = 'browse'); 85 - 86 - $header = id(new PHUIHeaderView()) 87 - ->setHeader($links) 88 - ->setUser($viewer) 89 - ->setPolicyObject($drequest->getRepository()); 90 - $actions = $this->buildActionView($drequest); 91 - $properties = $this->buildPropertyView($drequest, $actions); 86 + $header = $this->buildHeader($drequest, $links); 92 87 93 - $object_box = id(new PHUIObjectBoxView()) 88 + $view = id(new PHUITwoColumnView()) 94 89 ->setHeader($header) 95 - ->addPropertyList($properties); 90 + ->setMainColumn(array( 91 + )) 92 + ->setFooter(array( 93 + $changeset_view, 94 + )); 96 95 97 96 return $this->newPage() 98 97 ->setTitle( ··· 103 102 ->setCrumbs($crumbs) 104 103 ->appendChild( 105 104 array( 106 - $object_box, 107 - $content, 105 + $view, 108 106 )); 109 107 } 110 108 111 - private function buildActionView(DiffusionRequest $drequest) { 112 - $viewer = $this->getRequest()->getUser(); 109 + private function buildHeader( 110 + DiffusionRequest $drequest, 111 + $links) { 112 + $viewer = $this->getViewer(); 113 113 114 - $view = id(new PhabricatorActionListView()) 115 - ->setUser($viewer); 114 + $tag = $this->renderCommitHashTag($drequest); 115 + 116 + $header = id(new PHUIHeaderView()) 117 + ->setHeader($links) 118 + ->setUser($viewer) 119 + ->setPolicyObject($drequest->getRepository()) 120 + ->addTag($tag); 121 + 122 + return $header; 123 + } 124 + 125 + private function buildChangesetHeader(DiffusionRequest $drequest) { 126 + $viewer = $this->getViewer(); 127 + 128 + $header = id(new PHUIHeaderView()) 129 + ->setHeader(pht('Changes')); 116 130 117 131 $history_uri = $drequest->generateURI( 118 132 array( 119 133 'action' => 'history', 120 134 )); 121 135 122 - $view->addAction( 123 - id(new PhabricatorActionView()) 124 - ->setName(pht('View History')) 136 + $header->addActionLink( 137 + id(new PHUIButtonView()) 138 + ->setTag('a') 139 + ->setText(pht('View History')) 125 140 ->setHref($history_uri) 126 141 ->setIcon('fa-clock-o')); 127 142 ··· 130 145 'action' => 'browse', 131 146 )); 132 147 133 - $view->addAction( 134 - id(new PhabricatorActionView()) 135 - ->setName(pht('Browse Content')) 148 + $header->addActionLink( 149 + id(new PHUIButtonView()) 150 + ->setTag('a') 151 + ->setText(pht('Browse Content')) 136 152 ->setHref($browse_uri) 137 153 ->setIcon('fa-files-o')); 138 154 139 - return $view; 155 + return $header; 140 156 } 141 157 142 158 protected function buildPropertyView(
+202 -156
src/applications/diffusion/controller/DiffusionCommitController.php
··· 24 24 } 25 25 26 26 $drequest = $this->getDiffusionRequest(); 27 - 28 - $user = $request->getUser(); 27 + $viewer = $request->getUser(); 29 28 30 29 if ($request->getStr('diff')) { 31 30 return $this->buildRawDiffResponse($drequest); ··· 33 32 34 33 $repository = $drequest->getRepository(); 35 34 36 - $content = array(); 37 35 $commit = id(new DiffusionCommitQuery()) 38 - ->setViewer($request->getUser()) 36 + ->setViewer($viewer) 39 37 ->withRepository($repository) 40 38 ->withIdentifiers(array($drequest->getCommit())) 41 39 ->needCommitData(true) ··· 45 43 $crumbs = $this->buildCrumbs(array( 46 44 'commit' => true, 47 45 )); 46 + $crumbs->setBorder(true); 48 47 49 48 if (!$commit) { 50 49 if (!$this->getCommitExists()) { ··· 70 69 71 70 $audit_requests = $commit->getAudits(); 72 71 $this->auditAuthorityPHIDs = 73 - PhabricatorAuditCommentEditor::loadAuditPHIDsForUser($user); 72 + PhabricatorAuditCommentEditor::loadAuditPHIDsForUser($viewer); 74 73 75 74 $commit_data = $commit->getCommitData(); 76 75 $is_foreign = $commit_data->getCommitDetail('foreign-svn-stub'); 76 + $error_panel = null; 77 77 if ($is_foreign) { 78 78 $subpath = $commit_data->getCommitDetail('svn-subpath'); 79 79 ··· 87 87 "didn't affect the tracked subdirectory ('%s'), so no ". 88 88 "information is available.", 89 89 $subpath)); 90 - $content[] = $error_panel; 91 90 } else { 92 91 $engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine(); 93 - $engine->setConfig('viewer', $user); 92 + $engine->setConfig('viewer', $viewer); 94 93 95 - $headsup_view = id(new PHUIHeaderView()) 94 + $commit_tag = $this->renderCommitHashTag($drequest); 95 + $header = id(new PHUIHeaderView()) 96 96 ->setHeader(nonempty($commit->getSummary(), pht('Commit Detail'))) 97 - ->setSubheader(pht('Commit: %s', $commit->getCommitIdentifier())); 97 + ->setHeaderIcon('fa-code-fork') 98 + ->addTag($commit_tag); 99 + 100 + if ($commit->getAuditStatus()) { 101 + $icon = PhabricatorAuditCommitStatusConstants::getStatusIcon( 102 + $commit->getAuditStatus()); 103 + $color = PhabricatorAuditCommitStatusConstants::getStatusColor( 104 + $commit->getAuditStatus()); 105 + $status = PhabricatorAuditCommitStatusConstants::getStatusName( 106 + $commit->getAuditStatus()); 98 107 99 - $headsup_actions = $this->renderHeadsupActionList($commit, $repository); 108 + $header->setStatus($icon, $color, $status); 109 + } 100 110 101 - $commit_properties = $this->loadCommitProperties( 111 + $curtain = $this->buildCurtain($commit, $repository); 112 + $subheader = $this->buildSubheaderView($commit, $commit_data); 113 + $details = $this->buildPropertyListView( 102 114 $commit, 103 115 $commit_data, 104 116 $audit_requests); 105 - $property_list = id(new PHUIPropertyListView()) 106 - ->setHasKeyboardShortcuts(true) 107 - ->setUser($user) 108 - ->setObject($commit); 109 - foreach ($commit_properties as $key => $value) { 110 - $property_list->addProperty($key, $value); 111 - } 112 117 113 118 $message = $commit_data->getCommitMessage(); 114 119 115 120 $revision = $commit->getCommitIdentifier(); 116 121 $message = $this->linkBugtraq($message); 117 - 118 122 $message = $engine->markupText($message); 119 - 120 - $property_list->invokeWillRenderEvent(); 121 - $property_list->setActionList($headsup_actions); 122 123 123 124 $detail_list = new PHUIPropertyListView(); 124 - $detail_list->addSectionHeader( 125 - pht('Description'), 126 - PHUIPropertyListView::ICON_SUMMARY); 127 125 $detail_list->addTextContent( 128 126 phutil_tag( 129 127 'div', ··· 132 130 ), 133 131 $message)); 134 132 135 - $headsup_view->setTall(true); 136 - 137 - $object_box = id(new PHUIObjectBoxView()) 138 - ->setHeader($headsup_view) 139 - ->setFormErrors($this->getCommitErrors()) 140 - ->addPropertyList($property_list) 141 - ->addPropertyList($detail_list); 142 - 143 - $content[] = $object_box; 133 + if ($this->getCommitErrors()) { 134 + $error_panel = id(new PHUIInfoView()) 135 + ->appendChild($this->getCommitErrors()) 136 + ->setSeverity(PHUIInfoView::SEVERITY_WARNING); 137 + } 144 138 } 145 139 146 - $content[] = $this->buildComments($commit); 147 - 140 + $timeline = $this->buildComments($commit); 148 141 $hard_limit = 1000; 149 142 150 143 if ($commit->isImported()) { ··· 161 154 $changes = array_slice($changes, 0, $hard_limit); 162 155 } 163 156 164 - $content[] = $this->buildMergesTable($commit); 157 + $merge_table = $this->buildMergesTable($commit); 165 158 166 159 $highlighted_audits = $commit->getAuthorityAudits( 167 - $user, 160 + $viewer, 168 161 $this->auditAuthorityPHIDs); 169 162 170 163 $count = count($changes); ··· 179 172 } 180 173 181 174 $show_changesets = false; 175 + $info_panel = null; 176 + $change_list = null; 177 + $change_table = null; 182 178 if ($bad_commit) { 183 - $content[] = $this->renderStatusMessage( 179 + $info_panel = $this->renderStatusMessage( 184 180 pht('Bad Commit'), 185 181 $bad_commit['description']); 186 182 } else if ($is_foreign) { 187 183 // Don't render anything else. 188 184 } else if (!$commit->isImported()) { 189 - $content[] = $this->renderStatusMessage( 185 + $info_panel = $this->renderStatusMessage( 190 186 pht('Still Importing...'), 191 187 pht( 192 188 'This commit is still importing. Changes will be visible once '. 193 189 'the import finishes.')); 194 190 } else if (!count($changes)) { 195 - $content[] = $this->renderStatusMessage( 191 + $info_panel = $this->renderStatusMessage( 196 192 pht('Empty Commit'), 197 193 pht( 198 194 'This commit is empty and does not affect any paths.')); 199 195 } else if ($was_limited) { 200 - $content[] = $this->renderStatusMessage( 196 + $info_panel = $this->renderStatusMessage( 201 197 pht('Enormous Commit'), 202 198 pht( 203 199 'This commit is enormous, and affects more than %d files. '. 204 200 'Changes are not shown.', 205 201 $hard_limit)); 206 202 } else if (!$this->getCommitExists()) { 207 - $content[] = $this->renderStatusMessage( 203 + $info_panel = $this->renderStatusMessage( 208 204 pht('Commit No Longer Exists'), 209 205 pht('This commit no longer exists in the repository.')); 210 206 } else { ··· 214 210 // changes inline even if there are more than the soft limit. 215 211 $show_all_details = $request->getBool('show_all'); 216 212 217 - $header = id(new PHUIHeaderView()) 213 + $change_header = id(new PHUIHeaderView()) 218 214 ->setHeader(pht('Changes (%s)', new PhutilNumber($count))); 219 215 220 216 $warning_view = null; ··· 228 224 $warning_view = id(new PHUIInfoView()) 229 225 ->setSeverity(PHUIInfoView::SEVERITY_WARNING) 230 226 ->setTitle(pht('Very Large Commit')) 231 - ->addButton($button) 232 227 ->appendChild( 233 228 pht('This commit is very large. Load each file individually.')); 229 + 230 + $change_header->addActionLink($button); 234 231 } 235 232 236 233 $changesets = DiffusionPathChange::convertToDifferentialChangesets( 237 - $user, 234 + $viewer, 238 235 $changes); 239 236 240 237 // TODO: This table and panel shouldn't really be separate, but we need 241 238 // to clean up the "Load All Files" interaction first. 242 239 $change_table = $this->buildTableOfContents( 243 240 $changesets, 244 - $header, 241 + $change_header, 245 242 $warning_view); 246 - 247 - $content[] = $change_table; 248 243 249 244 $vcs = $repository->getVersionControlSystem(); 250 245 switch ($vcs) { ··· 291 286 } else { 292 287 $visible_changesets = array(); 293 288 $inlines = PhabricatorAuditInlineComment::loadDraftAndPublishedComments( 294 - $user, 289 + $viewer, 295 290 $commit->getPHID()); 296 291 $path_ids = mpull($inlines, null, 'getPathID'); 297 292 foreach ($changesets as $key => $changeset) { ··· 308 303 $change_list->setChangesets($changesets); 309 304 $change_list->setVisibleChangesets($visible_changesets); 310 305 $change_list->setRenderingReferences($references); 311 - $change_list->setRenderURI( 312 - $repository->getPathURI('diff/')); 306 + $change_list->setRenderURI($repository->getPathURI('diff/')); 313 307 $change_list->setRepository($repository); 314 - $change_list->setUser($user); 308 + $change_list->setUser($viewer); 309 + $change_list->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 315 310 316 311 // TODO: Try to setBranch() to something reasonable here? 317 312 ··· 327 322 $change_list->setInlineCommentControllerURI( 328 323 '/diffusion/inline/edit/'.phutil_escape_uri($commit->getPHID()).'/'); 329 324 330 - $content[] = $change_list->render(); 331 325 } 332 326 333 - $content[] = $this->renderAddCommentPanel($commit, $audit_requests); 327 + $add_comment = $this->renderAddCommentPanel($commit, $audit_requests); 334 328 335 - $prefs = $user->loadPreferences(); 329 + $prefs = $viewer->loadPreferences(); 336 330 $pref_filetree = PhabricatorUserPreferences::PREFERENCE_DIFF_FILETREE; 337 331 $pref_collapse = PhabricatorUserPreferences::PREFERENCE_NAV_COLLAPSED; 338 332 $show_filetree = $prefs->getPreference($pref_filetree); 339 333 $collapsed = $prefs->getPreference($pref_collapse); 340 334 335 + $nav = null; 341 336 if ($show_changesets && $show_filetree) { 342 337 $nav = id(new DifferentialChangesetFileTreeSideNavBuilder()) 343 338 ->setTitle($commit->getDisplayName()) 344 339 ->setBaseURI(new PhutilURI($commit->getURI())) 345 340 ->build($changesets) 346 341 ->setCrumbs($crumbs) 347 - ->setCollapsed((bool)$collapsed) 348 - ->appendChild($content); 349 - $content = $nav; 350 - } else { 351 - $content = array($crumbs, $content); 342 + ->setCollapsed((bool)$collapsed); 352 343 } 353 344 354 - return $this->buildApplicationPage( 355 - $content, 356 - array( 357 - 'title' => $commit->getDisplayName(), 358 - 'pageObjects' => array($commit->getPHID()), 345 + $view = id(new PHUITwoColumnView()) 346 + ->setHeader($header) 347 + ->setSubheader($subheader) 348 + ->setMainColumn(array( 349 + $error_panel, 350 + $timeline, 351 + $merge_table, 352 + $info_panel, 353 + )) 354 + ->setFooter(array( 355 + $change_table, 356 + $change_list, 357 + $add_comment, 358 + )) 359 + ->addPropertySection(pht('DESCRIPTION'), $detail_list) 360 + ->addPropertySection(pht('DETAILS'), $details) 361 + ->setCurtain($curtain); 362 + 363 + $page = $this->newPage() 364 + ->setTitle($commit->getDisplayName()) 365 + ->setCrumbs($crumbs) 366 + ->setPageObjectPHIDS(array($commit->getPHID())) 367 + ->appendChild( 368 + array( 369 + $view, 359 370 )); 371 + 372 + if ($nav) { 373 + $page->setNavigation($nav); 374 + } 375 + 376 + return $page; 377 + 360 378 } 361 379 362 - private function loadCommitProperties( 380 + private function buildPropertyListView( 363 381 PhabricatorRepositoryCommit $commit, 364 382 PhabricatorRepositoryCommitData $data, 365 383 array $audit_requests) { 366 384 367 - $viewer = $this->getRequest()->getUser(); 385 + $viewer = $this->getViewer(); 368 386 $commit_phid = $commit->getPHID(); 369 387 $drequest = $this->getDiffusionRequest(); 370 388 $repository = $drequest->getRepository(); 389 + 390 + $view = id(new PHUIPropertyListView()) 391 + ->setUser($this->getRequest()->getUser()); 371 392 372 393 $edge_query = id(new PhabricatorEdgeQuery()) 373 394 ->withSourcePHIDs(array($commit_phid)) ··· 432 453 433 454 $props = array(); 434 455 435 - if ($commit->getAuditStatus()) { 436 - $status = PhabricatorAuditCommitStatusConstants::getStatusName( 437 - $commit->getAuditStatus()); 438 - $tag = id(new PHUITagView()) 439 - ->setType(PHUITagView::TYPE_STATE) 440 - ->setName($status); 441 - 442 - switch ($commit->getAuditStatus()) { 443 - case PhabricatorAuditCommitStatusConstants::NEEDS_AUDIT: 444 - $tag->setBackgroundColor(PHUITagView::COLOR_ORANGE); 445 - break; 446 - case PhabricatorAuditCommitStatusConstants::CONCERN_RAISED: 447 - $tag->setBackgroundColor(PHUITagView::COLOR_RED); 448 - break; 449 - case PhabricatorAuditCommitStatusConstants::PARTIALLY_AUDITED: 450 - $tag->setBackgroundColor(PHUITagView::COLOR_BLUE); 451 - break; 452 - case PhabricatorAuditCommitStatusConstants::FULLY_AUDITED: 453 - $tag->setBackgroundColor(PHUITagView::COLOR_GREEN); 454 - break; 455 - } 456 - 457 - $props['Status'] = $tag; 458 - } 459 - 460 456 if ($audit_requests) { 461 457 $user_requests = array(); 462 458 $other_requests = array(); ··· 469 465 } 470 466 471 467 if ($user_requests) { 472 - $props['Auditors'] = $this->renderAuditStatusView( 473 - $user_requests); 468 + $view->addProperty( 469 + pht('Auditors'), 470 + $this->renderAuditStatusView($user_requests)); 474 471 } 475 472 476 473 if ($other_requests) { 477 - $props['Project/Package Auditors'] = $this->renderAuditStatusView( 478 - $other_requests); 474 + $view->addProperty( 475 + pht('Project/Package Auditors'), 476 + $this->renderAuditStatusView($other_requests)); 479 477 } 480 478 } 481 479 482 480 $author_phid = $data->getCommitDetail('authorPHID'); 483 481 $author_name = $data->getAuthorName(); 484 - 485 - if (!$repository->isSVN()) { 486 - $authored_info = id(new PHUIStatusItemView()); 487 - 488 - $author_epoch = $data->getCommitDetail('authorEpoch'); 489 - if ($author_epoch !== null) { 490 - $authored_info->setNote( 491 - phabricator_datetime($author_epoch, $viewer)); 492 - } 493 - 494 - if ($author_phid) { 495 - $authored_info->setTarget($handles[$author_phid]->renderLink()); 496 - } else if (strlen($author_name)) { 497 - $authored_info->setTarget($author_name); 498 - } 499 - 500 - $props['Authored'] = id(new PHUIStatusListView()) 501 - ->addItem($authored_info); 502 - } 482 + $author_epoch = $data->getCommitDetail('authorEpoch'); 503 483 504 484 $committed_info = id(new PHUIStatusItemView()) 505 485 ->setNote(phabricator_datetime($commit->getEpoch(), $viewer)); ··· 516 496 $committed_info->setTarget($author_name); 517 497 } 518 498 519 - $props['Committed'] = id(new PHUIStatusListView()) 520 - ->addItem($committed_info); 499 + $view->addProperty( 500 + pht('Committed'), 501 + $committed_info); 521 502 522 503 if ($push_logs) { 523 504 $pushed_list = new PHUIStatusListView(); ··· 529 510 $pushed_list->addItem($pushed_item); 530 511 } 531 512 532 - $props['Pushed'] = $pushed_list; 513 + $view->addProperty( 514 + pht('Pushed'), 515 + $pushed_list); 533 516 } 534 517 535 518 $reviewer_phid = $data->getCommitDetail('reviewerPHID'); 536 519 if ($reviewer_phid) { 537 - $props['Reviewer'] = $handles[$reviewer_phid]->renderLink(); 520 + $view->addProperty( 521 + pht('Reviewer'), 522 + $handles[$reviewer_phid]->renderLink()); 538 523 } 539 524 540 525 if ($revision_phid) { 541 - $props['Differential Revision'] = $handles[$revision_phid]->renderLink(); 526 + $view->addProperty( 527 + pht('Differential Revision'), 528 + $handles[$revision_phid]->renderLink()); 542 529 } 543 530 544 531 $parents = $this->getCommitParents(); 545 532 if ($parents) { 546 - $props['Parents'] = $viewer->renderHandleList(mpull($parents, 'getPHID')); 533 + $view->addProperty( 534 + pht('Parents'), 535 + $viewer->renderHandleList(mpull($parents, 'getPHID'))); 547 536 } 548 537 549 538 if ($this->getCommitExists()) { 550 - $props['Branches'] = phutil_tag( 539 + $view->addProperty( 540 + pht('Branches'), 541 + phutil_tag( 551 542 'span', 552 543 array( 553 544 'id' => 'commit-branches', 554 545 ), 555 - pht('Unknown')); 556 - $props['Tags'] = phutil_tag( 546 + pht('Unknown'))); 547 + 548 + $view->addProperty( 549 + pht('Tags'), 550 + phutil_tag( 557 551 'span', 558 552 array( 559 553 'id' => 'commit-tags', 560 554 ), 561 - pht('Unknown')); 555 + pht('Unknown'))); 562 556 563 557 $identifier = $commit->getCommitIdentifier(); 564 558 $root = $repository->getPathURI("commit/{$identifier}"); ··· 581 575 ), 582 576 $ref_data['ref']); 583 577 } 584 - $props['References'] = phutil_implode_html(', ', $ref_links); 578 + $view->addProperty( 579 + pht('References'), 580 + phutil_implode_html(', ', $ref_links)); 585 581 } 586 582 587 583 if ($reverts_phids) { 588 - $props[pht('Reverts')] = $viewer->renderHandleList($reverts_phids); 584 + $view->addProperty( 585 + pht('Reverts'), 586 + $viewer->renderHandleList($reverts_phids)); 589 587 } 590 588 591 589 if ($reverted_by_phids) { 592 - $props[pht('Reverted By')] = $viewer->renderHandleList( 593 - $reverted_by_phids); 590 + $view->addProperty( 591 + pht('Reverted By'), 592 + $viewer->renderHandleList($reverted_by_phids)); 594 593 } 595 594 596 595 if ($task_phids) { ··· 599 598 $task_list[] = $handles[$phid]->renderLink(); 600 599 } 601 600 $task_list = phutil_implode_html(phutil_tag('br'), $task_list); 602 - $props['Tasks'] = $task_list; 601 + $view->addProperty( 602 + pht('Tasks'), 603 + $task_list); 604 + } 605 + 606 + return $view; 607 + } 608 + 609 + private function buildSubheaderView( 610 + PhabricatorRepositoryCommit $commit, 611 + PhabricatorRepositoryCommitData $data) { 612 + 613 + $viewer = $this->getViewer(); 614 + $drequest = $this->getDiffusionRequest(); 615 + $repository = $drequest->getRepository(); 616 + 617 + if ($repository->isSVN()) { 618 + return null; 619 + } 620 + 621 + $author_phid = $data->getCommitDetail('authorPHID'); 622 + $author_name = $data->getAuthorName(); 623 + $author_epoch = $data->getCommitDetail('authorEpoch'); 624 + $date = null; 625 + if ($author_epoch !== null) { 626 + $date = phabricator_datetime($author_epoch, $viewer); 627 + } 628 + 629 + if ($author_phid) { 630 + $handles = $viewer->loadHandles(array($author_phid)); 631 + $image_uri = $handles[$author_phid]->getImageURI(); 632 + $image_href = $handles[$author_phid]->getURI(); 633 + $author = $handles[$author_phid]->renderLink(); 634 + } else if (strlen($author_name)) { 635 + $author = $author_name; 636 + $image_uri = null; 637 + $image_href = null; 603 638 } 604 639 605 - return $props; 640 + $author = phutil_tag('strong', array(), $author); 641 + if ($date) { 642 + $content = pht('Authored by %s on %s.', $author, $date); 643 + } else { 644 + $content = pht('Authored by %s.', $author); 645 + } 646 + 647 + return id(new PHUIHeadThingView()) 648 + ->setImage($image_uri) 649 + ->setImageHref($image_href) 650 + ->setContent($content); 651 + 606 652 } 653 + 607 654 608 655 private function buildComments(PhabricatorRepositoryCommit $commit) { 609 656 $timeline = $this->buildTransactionTimeline( ··· 619 666 assert_instances_of($audit_requests, 'PhabricatorRepositoryAuditRequest'); 620 667 621 668 $request = $this->getRequest(); 622 - $user = $request->getUser(); 669 + $viewer = $request->getUser(); 623 670 624 - if (!$user->isLoggedIn()) { 671 + if (!$viewer->isLoggedIn()) { 625 672 return id(new PhabricatorApplicationTransactionCommentView()) 626 - ->setUser($user) 673 + ->setUser($viewer) 627 674 ->setRequestURI($request->getRequestURI()); 628 675 } 629 676 ··· 638 685 639 686 $draft = id(new PhabricatorDraft())->loadOneWhere( 640 687 'authorPHID = %s AND draftKey = %s', 641 - $user->getPHID(), 688 + $viewer->getPHID(), 642 689 'diffusion-audit-'.$commit->getID()); 643 690 if ($draft) { 644 691 $draft = $draft->getDraft(); ··· 652 699 $auditor_source = new DiffusionAuditorDatasource(); 653 700 654 701 $form = id(new AphrontFormView()) 655 - ->setUser($user) 702 + ->setUser($viewer) 656 703 ->setAction('/audit/addcomment/') 657 704 ->addHiddenInput('commit', $commit->getPHID()) 658 705 ->appendChild( ··· 685 732 ->setName('content') 686 733 ->setValue($draft) 687 734 ->setID('audit-content') 688 - ->setUser($user)) 735 + ->setUser($viewer)) 689 736 ->appendChild( 690 737 id(new AphrontFormSubmitControl()) 691 738 ->setValue(pht('Submit'))); ··· 771 818 PhabricatorRepositoryCommit $commit, 772 819 array $audit_requests) { 773 820 assert_instances_of($audit_requests, 'PhabricatorRepositoryAuditRequest'); 774 - $user = $this->getRequest()->getUser(); 821 + $viewer = $this->getViewer(); 775 822 776 - $user_is_author = ($commit->getAuthorPHID() == $user->getPHID()); 823 + $user_is_author = ($commit->getAuthorPHID() == $viewer->getPHID()); 777 824 778 825 $user_request = null; 779 826 foreach ($audit_requests as $audit_request) { 780 - if ($audit_request->getAuditorPHID() == $user->getPHID()) { 827 + if ($audit_request->getAuditorPHID() == $viewer->getPHID()) { 781 828 $user_request = $audit_request; 782 829 break; 783 830 } ··· 871 918 872 919 $history_table->loadRevisions(); 873 920 874 - $panel = new PHUIObjectBoxView(); 875 - $panel->setHeaderText(pht('Merged Changes')); 876 - $panel->setTable($history_table); 921 + $panel = id(new PHUIObjectBoxView()) 922 + ->setHeaderText(pht('Merged Changes')) 923 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 924 + ->setTable($history_table); 877 925 if ($caption) { 878 926 $panel->setInfoView($caption); 879 927 } ··· 881 929 return $panel; 882 930 } 883 931 884 - private function renderHeadsupActionList( 932 + private function buildCurtain( 885 933 PhabricatorRepositoryCommit $commit, 886 934 PhabricatorRepository $repository) { 887 935 888 936 $request = $this->getRequest(); 889 - $user = $request->getUser(); 890 - 891 - $actions = id(new PhabricatorActionListView()) 892 - ->setUser($user) 893 - ->setObject($commit); 937 + $viewer = $this->getViewer(); 938 + $curtain = $this->newCurtainView($commit); 894 939 895 940 $can_edit = PhabricatorPolicyFilter::hasCapability( 896 - $user, 941 + $viewer, 897 942 $commit, 898 943 PhabricatorPolicyCapability::CAN_EDIT); 899 944 ··· 906 951 ->setIcon('fa-pencil') 907 952 ->setDisabled(!$can_edit) 908 953 ->setWorkflow(!$can_edit); 909 - $actions->addAction($action); 954 + $curtain->addAction($action); 910 955 911 956 require_celerity_resource('phabricator-object-selector-css'); 912 957 require_celerity_resource('javelin-behavior-phabricator-object-selector'); ··· 919 964 ->setHref('/search/attach/'.$commit->getPHID().'/TASK/edge/') 920 965 ->setWorkflow(true) 921 966 ->setDisabled(!$can_edit); 922 - $actions->addAction($action); 967 + $curtain->addAction($action); 923 968 } 924 969 925 970 $action = id(new PhabricatorActionView()) 926 971 ->setName(pht('Download Raw Diff')) 927 972 ->setHref($request->getRequestURI()->alter('diff', true)) 928 973 ->setIcon('fa-download'); 929 - $actions->addAction($action); 974 + $curtain->addAction($action); 930 975 931 - return $actions; 976 + return $curtain; 932 977 } 933 978 934 979 private function buildRawDiffResponse(DiffusionRequest $drequest) { ··· 1022 1067 1023 1068 $toc_view = id(new PHUIDiffTableOfContentsListView()) 1024 1069 ->setUser($viewer) 1025 - ->setHeader($header); 1070 + ->setHeader($header) 1071 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 1026 1072 1027 1073 if ($info_view) { 1028 1074 $toc_view->setInfoView($info_view);
+22
src/applications/diffusion/controller/DiffusionController.php
··· 291 291 return id(new PHUIInfoView()) 292 292 ->setSeverity(PHUIInfoView::SEVERITY_WARNING) 293 293 ->setTitle($title) 294 + ->setFlush(true) 294 295 ->appendChild($body); 295 296 } 296 297 ··· 298 299 return id(new PHUIBoxView()) 299 300 ->addMargin(PHUI::MARGIN_LARGE) 300 301 ->appendChild($pager); 302 + } 303 + 304 + protected function renderCommitHashTag(DiffusionRequest $drequest) { 305 + $stable_commit = $drequest->getStableCommit(); 306 + $commit = phutil_tag( 307 + 'a', 308 + array( 309 + 'href' => $drequest->generateURI( 310 + array( 311 + 'action' => 'commit', 312 + 'commit' => $stable_commit, 313 + )), 314 + ), 315 + $drequest->getRepository()->formatCommitName($stable_commit, true)); 316 + 317 + $tag = id(new PHUITagView()) 318 + ->setName($commit) 319 + ->setShade('indigo') 320 + ->setType(PHUITagView::TYPE_SHADE); 321 + 322 + return $tag; 301 323 } 302 324 303 325 protected function renderDirectoryReadme(DiffusionBrowseResultSet $browse) {
+47 -63
src/applications/diffusion/controller/DiffusionHistoryController.php
··· 40 40 $history = $pager->sliceResults($history); 41 41 42 42 $show_graph = !strlen($drequest->getPath()); 43 - $content = array(); 44 - 45 43 $history_table = id(new DiffusionHistoryTableView()) 46 44 ->setUser($request->getUser()) 47 45 ->setDiffusionRequest($drequest) ··· 55 53 $history_table->setIsTail(!$pager->getHasMorePages()); 56 54 } 57 55 58 - $history_panel = new PHUIObjectBoxView(); 59 - $history_panel->setHeaderText(pht('History')); 60 - $history_panel->setTable($history_table); 61 - 62 - $content[] = $history_panel; 63 - 64 - $header = id(new PHUIHeaderView()) 65 - ->setUser($viewer) 66 - ->setPolicyObject($repository) 67 - ->setHeader($this->renderPathLinks($drequest, $mode = 'history')); 68 - 69 - $actions = $this->buildActionView($drequest); 70 - $properties = $this->buildPropertyView($drequest, $actions); 56 + $history_header = $this->buildHistoryHeader($drequest); 57 + $history_panel = id(new PHUIObjectBoxView()) 58 + ->setHeader($history_header) 59 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 60 + ->setTable($history_table); 71 61 72 - $object_box = id(new PHUIObjectBoxView()) 73 - ->setHeader($header) 74 - ->addPropertyList($properties); 62 + $header = $this->buildHeader($drequest, $repository); 75 63 76 64 $crumbs = $this->buildCrumbs( 77 65 array( ··· 79 67 'path' => true, 80 68 'view' => 'history', 81 69 )); 70 + $crumbs->setBorder(true); 82 71 83 72 $pager_box = $this->renderTablePagerBox($pager); 84 73 74 + $view = id(new PHUITwoColumnView()) 75 + ->setHeader($header) 76 + ->setFooter(array( 77 + $history_panel, 78 + $pager_box, 79 + )); 80 + 85 81 return $this->newPage() 86 82 ->setTitle( 87 83 array( ··· 91 87 ->setCrumbs($crumbs) 92 88 ->appendChild( 93 89 array( 94 - $object_box, 95 - $content, 96 - $pager_box, 90 + $view, 97 91 )); 98 92 } 99 93 100 - private function buildActionView(DiffusionRequest $drequest) { 101 - $viewer = $this->getRequest()->getUser(); 94 + private function buildHeader(DiffusionRequest $drequest) { 95 + $viewer = $this->getViewer(); 96 + 97 + $tag = $this->renderCommitHashTag($drequest); 98 + 99 + $header = id(new PHUIHeaderView()) 100 + ->setUser($viewer) 101 + ->setPolicyObject($drequest->getRepository()) 102 + ->addTag($tag) 103 + ->setHeader($this->renderPathLinks($drequest, $mode = 'history')) 104 + ->setHeaderIcon('fa-clock-o'); 105 + 106 + return $header; 102 107 103 - $view = id(new PhabricatorActionListView()) 104 - ->setUser($viewer); 108 + } 109 + 110 + private function buildHistoryHeader(DiffusionRequest $drequest) { 111 + $viewer = $this->getViewer(); 105 112 106 113 $browse_uri = $drequest->generateURI( 107 114 array( 108 115 'action' => 'browse', 109 116 )); 110 117 111 - $view->addAction( 112 - id(new PhabricatorActionView()) 113 - ->setName(pht('Browse Content')) 114 - ->setHref($browse_uri) 115 - ->setIcon('fa-files-o')); 118 + $browse_button = id(new PHUIButtonView()) 119 + ->setTag('a') 120 + ->setText(pht('Browse')) 121 + ->setHref($browse_uri) 122 + ->setIcon('fa-files-o'); 116 123 117 124 // TODO: Sometimes we do have a change view, we need to look at the most 118 125 // recent history entry to figure it out. ··· 130 137 ->alter('copies', true); 131 138 } 132 139 133 - $view->addAction( 134 - id(new PhabricatorActionView()) 135 - ->setName($branch_name) 136 - ->setIcon('fa-code-fork') 137 - ->setHref($branch_uri)); 140 + $branch_button = id(new PHUIButtonView()) 141 + ->setTag('a') 142 + ->setText($branch_name) 143 + ->setIcon('fa-code-fork') 144 + ->setHref($branch_uri); 138 145 139 - return $view; 140 - } 146 + $header = id(new PHUIHeaderView()) 147 + ->setHeader(pht('History')) 148 + ->addActionLink($browse_button) 149 + ->addActionLink($branch_button); 141 150 142 - protected function buildPropertyView( 143 - DiffusionRequest $drequest, 144 - PhabricatorActionListView $actions) { 145 - 146 - $viewer = $this->getRequest()->getUser(); 147 - 148 - $view = id(new PHUIPropertyListView()) 149 - ->setUser($viewer) 150 - ->setActionList($actions); 151 - 152 - $stable_commit = $drequest->getStableCommit(); 153 - 154 - $view->addProperty( 155 - pht('Commit'), 156 - phutil_tag( 157 - 'a', 158 - array( 159 - 'href' => $drequest->generateURI( 160 - array( 161 - 'action' => 'commit', 162 - 'commit' => $stable_commit, 163 - )), 164 - ), 165 - $drequest->getRepository()->formatCommitName($stable_commit))); 166 - 167 - return $view; 151 + return $header; 168 152 } 169 153 170 154 }
+26 -5
src/applications/diffusion/controller/DiffusionLintController.php
··· 157 157 158 158 $content[] = id(new PHUIObjectBoxView()) 159 159 ->setHeaderText(pht('Lint')) 160 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 160 161 ->setTable($table); 161 162 162 163 $title = array('Lint'); ··· 179 180 $header = id(new PHUIHeaderView()) 180 181 ->setHeader($this->renderPathLinks($drequest, 'lint')) 181 182 ->setUser($viewer) 182 - ->setPolicyObject($drequest->getRepository()); 183 + ->setHeaderIcon('fa-code'); 183 184 $actions = $this->buildActionView($drequest); 184 185 $properties = $this->buildPropertyView( 185 186 $drequest, ··· 189 190 190 191 $object_box = id(new PHUIObjectBoxView()) 191 192 ->setHeader($header) 193 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 192 194 ->addPropertyList($properties); 193 195 } else { 194 196 $object_box = null; 197 + $header = id(new PHUIHeaderView()) 198 + ->setHeader(pht('All Lint')) 199 + ->setHeaderIcon('fa-code'); 195 200 } 196 201 202 + $view = id(new PHUITwoColumnView()) 203 + ->setHeader($header) 204 + ->setFooter(array( 205 + $object_box, 206 + $content, 207 + )); 208 + 197 209 return $this->newPage() 198 210 ->setTitle($title) 199 211 ->setCrumbs($crumbs) 200 212 ->appendChild( 201 213 array( 202 - $object_box, 203 - $content, 214 + $view, 204 215 )); 205 216 } 206 217 ··· 444 455 445 456 $content[] = id(new PHUIObjectBoxView()) 446 457 ->setHeaderText(pht('Lint Details')) 458 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 447 459 ->setTable($table); 448 460 449 461 $crumbs = $this->buildCrumbs( ··· 454 466 )); 455 467 456 468 $pager_box = $this->renderTablePagerBox($pager); 469 + $header = id(new PHUIHeaderView()) 470 + ->setHeader(pht('Lint: %s', $drequest->getRepository()->getDisplayName())) 471 + ->setHeaderIcon('fa-code'); 472 + 473 + $view = id(new PHUITwoColumnView()) 474 + ->setHeader($header) 475 + ->setFooter(array( 476 + $content, 477 + $pager_box, 478 + )); 457 479 458 480 return $this->newPage() 459 481 ->setTitle( ··· 464 486 ->setCrumbs($crumbs) 465 487 ->appendChild( 466 488 array( 467 - $content, 468 - $pager_box, 489 + $view, 469 490 )); 470 491 } 471 492
+136 -105
src/applications/diffusion/controller/DiffusionRepositoryController.php
··· 16 16 $drequest = $this->getDiffusionRequest(); 17 17 $repository = $drequest->getRepository(); 18 18 19 - $content = array(); 20 - 21 19 $crumbs = $this->buildCrumbs(); 20 + $crumbs->setBorder(true); 22 21 23 - $content[] = $this->buildPropertiesTable($drequest->getRepository()); 22 + $header = $this->buildHeaderView($repository); 23 + $curtain = $this->buildCurtain($repository); 24 + $property_table = $this->buildPropertiesTable($repository); 25 + $description = $this->buildDescriptionView($repository); 26 + $locate_file = $this->buildLocateFile(); 24 27 25 28 // Before we do any work, make sure we're looking at a some content: we're 26 29 // on a valid branch, and the repository is not empty. ··· 68 71 } 69 72 70 73 if ($page_has_content) { 71 - $content[] = $this->buildNormalContent($drequest); 74 + $content = $this->buildNormalContent($drequest); 72 75 } else { 73 - $content[] = id(new PHUIInfoView()) 76 + $content = id(new PHUIInfoView()) 74 77 ->setTitle($empty_title) 75 78 ->setSeverity(PHUIInfoView::SEVERITY_WARNING) 76 79 ->setErrors(array($empty_message)); 77 80 } 78 81 82 + $view = id(new PHUITwoColumnView()) 83 + ->setHeader($header) 84 + ->setCurtain($curtain) 85 + ->setMainColumn(array( 86 + $property_table, 87 + $description, 88 + $locate_file, 89 + )) 90 + ->setFooter($content); 91 + 79 92 return $this->newPage() 80 93 ->setTitle( 81 94 array( ··· 83 96 $repository->getDisplayName(), 84 97 )) 85 98 ->setCrumbs($crumbs) 86 - ->appendChild($content); 99 + ->appendChild(array( 100 + $view, 101 + )); 87 102 } 88 103 89 104 ··· 206 221 return $content; 207 222 } 208 223 209 - private function buildPropertiesTable(PhabricatorRepository $repository) { 210 - $user = $this->getRequest()->getUser(); 211 - 224 + private function buildHeaderView(PhabricatorRepository $repository) { 225 + $viewer = $this->getViewer(); 212 226 $header = id(new PHUIHeaderView()) 213 227 ->setHeader($repository->getName()) 214 - ->setUser($user) 215 - ->setPolicyObject($repository); 228 + ->setUser($viewer) 229 + ->setPolicyObject($repository) 230 + ->setHeaderIcon('fa-code'); 216 231 217 232 if (!$repository->isTracked()) { 218 233 $header->setStatus('fa-ban', 'dark', pht('Inactive')); ··· 227 242 $header->setStatus('fa-check', 'bluegrey', pht('Active')); 228 243 } 229 244 245 + return $header; 246 + } 230 247 231 - $actions = $this->buildActionList($repository); 248 + private function buildCurtain(PhabricatorRepository $repository) { 249 + $viewer = $this->getViewer(); 250 + 251 + $edit_uri = $repository->getPathURI('edit/'); 252 + $curtain = $this->newCurtainView($repository); 253 + 254 + $can_edit = PhabricatorPolicyFilter::hasCapability( 255 + $viewer, 256 + $repository, 257 + PhabricatorPolicyCapability::CAN_EDIT); 258 + 259 + $curtain->addAction( 260 + id(new PhabricatorActionView()) 261 + ->setName(pht('Edit Repository')) 262 + ->setIcon('fa-pencil') 263 + ->setHref($edit_uri) 264 + ->setWorkflow(!$can_edit) 265 + ->setDisabled(!$can_edit)); 266 + 267 + if ($repository->isHosted()) { 268 + $push_uri = $this->getApplicationURI( 269 + 'pushlog/?repositories='.$repository->getMonogram()); 270 + 271 + $curtain->addAction( 272 + id(new PhabricatorActionView()) 273 + ->setName(pht('View Push Logs')) 274 + ->setIcon('fa-list-alt') 275 + ->setHref($push_uri)); 276 + } 277 + 278 + return $curtain; 279 + } 232 280 281 + private function buildDescriptionView(PhabricatorRepository $repository) { 282 + $viewer = $this->getViewer(); 233 283 $view = id(new PHUIPropertyListView()) 234 - ->setObject($repository) 235 - ->setUser($user); 284 + ->setUser($viewer); 285 + 286 + $description = $repository->getDetail('description'); 287 + if (strlen($description)) { 288 + $description = new PHUIRemarkupView($viewer, $description); 289 + $view->addTextContent($description); 290 + return id(new PHUIObjectBoxView()) 291 + ->setHeaderText(pht('DESCRIPTION')) 292 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 293 + ->appendChild($view); 294 + } 295 + return null; 296 + } 297 + 298 + private function buildPropertiesTable(PhabricatorRepository $repository) { 299 + $viewer = $this->getViewer(); 300 + 301 + $view = id(new PHUIPropertyListView()) 302 + ->setUser($viewer); 236 303 237 304 if ($repository->isHosted()) { 238 305 $ssh_uri = $repository->getSSHCloneURIObject(); ··· 286 353 } 287 354 } 288 355 289 - $view->invokeWillRenderEvent(); 290 - 291 - $description = $repository->getDetail('description'); 292 - if (strlen($description)) { 293 - $description = new PHUIRemarkupView($user, $description); 294 - $view->addSectionHeader( 295 - pht('Description'), PHUIPropertyListView::ICON_SUMMARY); 296 - $view->addTextContent($description); 297 - } 298 - 299 - $view->setActionList($actions); 300 - 301 356 $box = id(new PHUIObjectBoxView()) 302 - ->setHeader($header) 303 - ->addPropertyList($view); 357 + ->setHeaderText(pht('DETAILS')) 358 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 359 + ->appendChild($view); 304 360 305 361 $info = null; 306 362 $drequest = $this->getDiffusionRequest(); ··· 344 400 } 345 401 346 402 private function buildBranchListTable(DiffusionRequest $drequest) { 347 - $viewer = $this->getRequest()->getUser(); 403 + $viewer = $this->getViewer(); 348 404 349 405 if ($drequest->getBranch() === null) { 350 406 return null; ··· 379 435 ->setBranches($branches) 380 436 ->setCommits($commits); 381 437 382 - $panel = new PHUIObjectBoxView(); 438 + $panel = id(new PHUIObjectBoxView()) 439 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 383 440 $header = new PHUIHeaderView(); 384 441 $header->setHeader(pht('Branches')); 385 442 ··· 388 445 } 389 446 390 447 $button = new PHUIButtonView(); 391 - $button->setText(pht('Show All Branches')); 448 + $button->setText(pht('Show All')); 392 449 $button->setTag('a'); 393 450 $button->setIcon('fa-code-fork'); 394 451 $button->setHref($drequest->generateURI( ··· 404 461 } 405 462 406 463 private function buildTagListTable(DiffusionRequest $drequest) { 407 - $viewer = $this->getRequest()->getUser(); 464 + $viewer = $this->getViewer(); 408 465 $repository = $drequest->getRepository(); 409 466 410 467 switch ($repository->getVersionControlSystem()) { ··· 469 526 470 527 $panel->setHeader($header); 471 528 $panel->setTable($view); 529 + $panel->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 472 530 473 531 return $panel; 474 532 } 475 533 476 - private function buildActionList(PhabricatorRepository $repository) { 477 - $viewer = $this->getRequest()->getUser(); 478 - 479 - $edit_uri = $repository->getPathURI('edit/'); 480 - 481 - $view = id(new PhabricatorActionListView()) 482 - ->setUser($viewer) 483 - ->setObject($repository); 484 - 485 - $can_edit = PhabricatorPolicyFilter::hasCapability( 486 - $viewer, 487 - $repository, 488 - PhabricatorPolicyCapability::CAN_EDIT); 489 - 490 - $view->addAction( 491 - id(new PhabricatorActionView()) 492 - ->setName(pht('Edit Repository')) 493 - ->setIcon('fa-pencil') 494 - ->setHref($edit_uri) 495 - ->setWorkflow(!$can_edit) 496 - ->setDisabled(!$can_edit)); 497 - 498 - if ($repository->isHosted()) { 499 - $push_uri = $this->getApplicationURI( 500 - 'pushlog/?repositories='.$repository->getMonogram()); 501 - 502 - $view->addAction( 503 - id(new PhabricatorActionView()) 504 - ->setName(pht('View Push Logs')) 505 - ->setIcon('fa-list-alt') 506 - ->setHref($push_uri)); 507 - } 508 - 509 - return $view; 510 - } 511 - 512 534 private function buildHistoryTable( 513 535 $history_results, 514 536 $history, ··· 551 573 ->setIcon('fa-list-alt'); 552 574 553 575 $button = id(new PHUIButtonView()) 554 - ->setText(pht('View Full History')) 576 + ->setText(pht('View History')) 555 577 ->setHref($drequest->generateURI( 556 578 array( 557 579 'action' => 'history', ··· 559 581 ->setTag('a') 560 582 ->setIcon($icon); 561 583 562 - $panel = new PHUIObjectBoxView(); 584 + $panel = id(new PHUIObjectBoxView()) 585 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 563 586 $header = id(new PHUIHeaderView()) 564 587 ->setHeader(pht('Recent Commits')) 565 588 ->addActionLink($button); ··· 569 592 return $panel; 570 593 } 571 594 595 + private function buildLocateFile() { 596 + $request = $this->getRequest(); 597 + $viewer = $request->getUser(); 598 + $drequest = $this->getDiffusionRequest(); 599 + $repository = $drequest->getRepository(); 600 + 601 + $locate_panel = null; 602 + if ($repository->canUsePathTree()) { 603 + Javelin::initBehavior( 604 + 'diffusion-locate-file', 605 + array( 606 + 'controlID' => 'locate-control', 607 + 'inputID' => 'locate-input', 608 + 'browseBaseURI' => (string)$drequest->generateURI( 609 + array( 610 + 'action' => 'browse', 611 + )), 612 + 'uri' => (string)$drequest->generateURI( 613 + array( 614 + 'action' => 'pathtree', 615 + )), 616 + )); 617 + 618 + $form = id(new AphrontFormView()) 619 + ->setUser($viewer) 620 + ->appendChild( 621 + id(new AphrontFormTypeaheadControl()) 622 + ->setHardpointID('locate-control') 623 + ->setID('locate-input') 624 + ->setLabel(pht('Locate File'))); 625 + $form_box = id(new PHUIBoxView()) 626 + ->appendChild($form->buildLayoutView()); 627 + $locate_panel = id(new PHUIObjectBoxView()) 628 + ->setHeaderText(pht('Locate File')) 629 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 630 + ->appendChild($form_box); 631 + } 632 + return $locate_panel; 633 + } 634 + 572 635 private function buildBrowseTable( 573 636 $browse_results, 574 637 $browse_paths, ··· 606 669 607 670 $browse_uri = $drequest->generateURI(array('action' => 'browse')); 608 671 609 - $browse_panel = new PHUIObjectBoxView(); 672 + $browse_panel = id(new PHUIObjectBoxView()) 673 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 610 674 $header = id(new PHUIHeaderView()) 611 - ->setHeader(pht('Repository')); 675 + ->setHeader($repository->getName()); 612 676 613 677 $icon = id(new PHUIIconView()) 614 678 ->setIcon('fa-folder-open'); ··· 621 685 622 686 $header->addActionLink($button); 623 687 $browse_panel->setHeader($header); 624 - 625 - $locate_panel = null; 626 - if ($repository->canUsePathTree()) { 627 - Javelin::initBehavior( 628 - 'diffusion-locate-file', 629 - array( 630 - 'controlID' => 'locate-control', 631 - 'inputID' => 'locate-input', 632 - 'browseBaseURI' => (string)$drequest->generateURI( 633 - array( 634 - 'action' => 'browse', 635 - )), 636 - 'uri' => (string)$drequest->generateURI( 637 - array( 638 - 'action' => 'pathtree', 639 - )), 640 - )); 641 - 642 - $form = id(new AphrontFormView()) 643 - ->setUser($viewer) 644 - ->appendChild( 645 - id(new AphrontFormTypeaheadControl()) 646 - ->setHardpointID('locate-control') 647 - ->setID('locate-input') 648 - ->setLabel(pht('Locate File'))); 649 - $form_box = id(new PHUIBoxView()) 650 - ->appendChild($form->buildLayoutView()); 651 - $locate_panel = id(new PHUIObjectBoxView()) 652 - ->setHeaderText('Locate File') 653 - ->appendChild($form_box); 654 - } 655 - 656 688 $browse_panel->setTable($browse_table); 657 689 658 690 $pager->setURI($browse_uri, 'offset'); ··· 664 696 } 665 697 666 698 return array( 667 - $locate_panel, 668 699 $browse_panel, 669 700 $pager_box, 670 701 );
+17 -1
src/applications/diffusion/controller/DiffusionRepositoryCreateController.php
··· 262 262 $crumbs = $this->buildApplicationCrumbs(); 263 263 $crumbs->addTextCrumb($title); 264 264 265 + $header = id(new PHUIHeaderView()) 266 + ->setHeader($title) 267 + ->setHeaderIcon('fa-pencil'); 268 + 269 + $form_box = id(new PHUIObjectBoxView()) 270 + ->setHeaderText($title) 271 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 272 + ->setForm($form); 273 + 274 + $view = id(new PHUITwoColumnView()) 275 + ->setHeader($header) 276 + ->setFooter(array( 277 + $form, 278 + )); 279 + 265 280 return $this->newPage() 266 281 ->setTitle($title) 267 282 ->setCrumbs($crumbs) 268 - ->appendChild($form); 283 + ->appendChild($view); 284 + 269 285 } 270 286 271 287
+14 -2
src/applications/diffusion/controller/DiffusionRepositoryEditActionsController.php
··· 53 53 54 54 $title = pht('Edit Actions (%s)', $repository->getName()); 55 55 56 + $header = id(new PHUIHeaderView()) 57 + ->setHeader($title) 58 + ->setHeaderIcon('fa-pencil'); 59 + 56 60 $policies = id(new PhabricatorPolicyQuery()) 57 61 ->setViewer($viewer) 58 62 ->setObject($repository) ··· 97 101 ->addCancelButton($edit_uri)); 98 102 99 103 $form_box = id(new PHUIObjectBoxView()) 100 - ->setHeaderText($title) 104 + ->setHeaderText(pht('Actions')) 105 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 101 106 ->setForm($form); 102 107 108 + $view = id(new PHUITwoColumnView()) 109 + ->setHeader($header) 110 + ->setFooter(array( 111 + $form_box, 112 + )); 113 + 103 114 return $this->newPage() 104 115 ->setTitle($title) 105 116 ->setCrumbs($crumbs) 106 - ->appendChild($form_box); 117 + ->appendChild($view); 118 + 107 119 } 108 120 109 121 }
+14 -3
src/applications/diffusion/controller/DiffusionRepositoryEditAutomationController.php
··· 49 49 50 50 $title = pht('Edit %s', $repository->getName()); 51 51 52 + $header = id(new PHUIHeaderView()) 53 + ->setHeader($title) 54 + ->setHeaderIcon('fa-pencil'); 55 + 52 56 $form = id(new AphrontFormView()) 53 57 ->setUser($viewer) 54 58 ->appendRemarkupInstructions( ··· 69 73 ->setValue(pht('Save')) 70 74 ->addCancelButton($edit_uri)); 71 75 72 - $object_box = id(new PHUIObjectBoxView()) 73 - ->setHeaderText($title) 76 + $form_box = id(new PHUIObjectBoxView()) 77 + ->setHeaderText(pht('Automation')) 78 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 74 79 ->setForm($form); 75 80 81 + $view = id(new PHUITwoColumnView()) 82 + ->setHeader($header) 83 + ->setFooter(array( 84 + $form_box, 85 + )); 86 + 76 87 return $this->newPage() 77 88 ->setTitle($title) 78 89 ->setCrumbs($crumbs) 79 - ->appendChild($object_box); 90 + ->appendChild($view); 80 91 } 81 92 82 93 }
+14 -3
src/applications/diffusion/controller/DiffusionRepositoryEditBasicController.php
··· 105 105 106 106 $title = pht('Edit %s', $repository->getName()); 107 107 108 + $header = id(new PHUIHeaderView()) 109 + ->setHeader($title) 110 + ->setHeaderIcon('fa-pencil'); 111 + 108 112 $form = id(new AphrontFormView()) 109 113 ->setUser($viewer) 110 114 ->appendChild( ··· 144 148 ->appendChild(id(new PHUIFormDividerControl())) 145 149 ->appendRemarkupInstructions($this->getReadmeInstructions()); 146 150 147 - $object_box = id(new PHUIObjectBoxView()) 148 - ->setHeaderText($title) 151 + $form_box = id(new PHUIObjectBoxView()) 152 + ->setHeaderText(pht('Basic Information')) 149 153 ->setValidationException($validation_exception) 154 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 150 155 ->setForm($form) 151 156 ->setFormErrors($errors); 152 157 158 + $view = id(new PHUITwoColumnView()) 159 + ->setHeader($header) 160 + ->setFooter(array( 161 + $form_box, 162 + )); 163 + 153 164 return $this->newPage() 154 165 ->setTitle($title) 155 166 ->setCrumbs($crumbs) 156 - ->appendChild($object_box); 167 + ->appendChild($view); 157 168 } 158 169 159 170 private function getReadmeInstructions() {
+12 -2
src/applications/diffusion/controller/DiffusionRepositoryEditBranchesController.php
··· 98 98 $crumbs->addTextCrumb(pht('Edit Branches')); 99 99 100 100 $title = pht('Edit Branches (%s)', $repository->getName()); 101 + $header = id(new PHUIHeaderView()) 102 + ->setHeader($title) 103 + ->setHeaderIcon('fa-pencil'); 101 104 102 105 $policies = id(new PhabricatorPolicyQuery()) 103 106 ->setViewer($viewer) ··· 213 216 ->addCancelButton($edit_uri)); 214 217 215 218 $form_box = id(new PHUIObjectBoxView()) 219 + ->setHeaderText(pht('Branches')) 216 220 ->setValidationException($validation_exception) 217 - ->setHeaderText($title) 221 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 218 222 ->setForm($form); 219 223 224 + $view = id(new PHUITwoColumnView()) 225 + ->setHeader($header) 226 + ->setFooter(array( 227 + $form_box, 228 + )); 229 + 220 230 return $this->newPage() 221 231 ->setTitle($title) 222 232 ->setCrumbs($crumbs) 223 - ->appendChild($form_box); 233 + ->appendChild($view); 224 234 } 225 235 226 236 private function processBranches($string) {
+1
src/applications/diffusion/controller/DiffusionRepositoryEditController.php
··· 20 20 $crumbs->addTextCrumb(pht('Edit'), $edit_uri); 21 21 } 22 22 } 23 + $crumbs->setBorder(true); 23 24 24 25 return $crumbs; 25 26 }
+13 -3
src/applications/diffusion/controller/DiffusionRepositoryEditEncodingController.php
··· 50 50 $crumbs->addTextCrumb(pht('Edit Encoding')); 51 51 52 52 $title = pht('Edit %s', $repository->getName()); 53 + $header = id(new PHUIHeaderView()) 54 + ->setHeader($title) 55 + ->setHeaderIcon('fa-pencil'); 53 56 54 57 $form = id(new AphrontFormView()) 55 58 ->setUser($user) ··· 65 68 ->setValue(pht('Save Encoding')) 66 69 ->addCancelButton($edit_uri)); 67 70 68 - $object_box = id(new PHUIObjectBoxView()) 69 - ->setHeaderText($title) 71 + $form_box = id(new PHUIObjectBoxView()) 72 + ->setHeaderText(pht('Encoding')) 73 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 70 74 ->setForm($form) 71 75 ->setFormErrors($errors); 72 76 77 + $view = id(new PHUITwoColumnView()) 78 + ->setHeader($header) 79 + ->setFooter(array( 80 + $form_box, 81 + )); 82 + 73 83 return $this->newPage() 74 84 ->setTitle($title) 75 85 ->setCrumbs($crumbs) 76 - ->appendChild($object_box); 86 + ->appendChild($view); 77 87 } 78 88 79 89 private function getEncodingInstructions() {
+26 -7
src/applications/diffusion/controller/DiffusionRepositoryEditHostingController.php
··· 57 57 $crumbs->addTextCrumb(pht('Edit Hosting')); 58 58 59 59 $title = pht('Edit Hosting (%s)', $repository->getName()); 60 + $header = id(new PHUIHeaderView()) 61 + ->setHeader($title) 62 + ->setHeaderIcon('fa-pencil'); 60 63 61 64 $hosted_control = id(new AphrontFormRadioButtonControl()) 62 65 ->setName('hosting') ··· 95 98 ->setValue(pht('Save and Continue')) 96 99 ->addCancelButton($edit_uri)); 97 100 98 - $object_box = id(new PHUIObjectBoxView()) 99 - ->setHeaderText($title) 101 + $form_box = id(new PHUIObjectBoxView()) 102 + ->setHeaderText(pht('Hosting')) 103 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 100 104 ->setForm($form); 101 105 106 + $view = id(new PHUITwoColumnView()) 107 + ->setHeader($header) 108 + ->setFooter(array( 109 + $form_box, 110 + )); 111 + 102 112 return $this->newPage() 103 113 ->setTitle($title) 104 114 ->setCrumbs($crumbs) 105 - ->appendChild($object_box); 115 + ->appendChild($view); 106 116 } 107 117 108 118 public function handleProtocols(PhabricatorRepository $repository) { ··· 155 165 $crumbs->addTextCrumb(pht('Edit Protocols')); 156 166 157 167 $title = pht('Edit Protocols (%s)', $repository->getName()); 158 - 168 + $header = id(new PHUIHeaderView()) 169 + ->setHeader($title) 170 + ->setHeaderIcon('fa-pencil'); 159 171 160 172 $rw_message = pht( 161 173 'Phabricator will serve a read-write copy of this repository.'); ··· 256 268 ->setValue(pht('Save Changes')) 257 269 ->addCancelButton($prev_uri, pht('Back'))); 258 270 259 - $object_box = id(new PHUIObjectBoxView()) 260 - ->setHeaderText($title) 271 + $form_box = id(new PHUIObjectBoxView()) 272 + ->setHeaderText(pht('Protocols')) 273 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 261 274 ->setForm($form); 262 275 276 + $view = id(new PHUITwoColumnView()) 277 + ->setHeader($header) 278 + ->setFooter(array( 279 + $form_box, 280 + )); 281 + 263 282 return $this->newPage() 264 283 ->setTitle($title) 265 284 ->setCrumbs($crumbs) 266 - ->appendChild($object_box); 285 + ->appendChild($view); 267 286 } 268 287 269 288 }
+63 -49
src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php
··· 38 38 $title = pht('Edit %s', $repository->getName()); 39 39 40 40 $header = id(new PHUIHeaderView()) 41 - ->setHeader($title); 41 + ->setHeader($title) 42 + ->setHeaderIcon('fa-pencil'); 42 43 if ($repository->isTracked()) { 43 44 $header->setStatus('fa-check', 'bluegrey', pht('Active')); 44 45 } else { 45 46 $header->setStatus('fa-ban', 'dark', pht('Inactive')); 46 47 } 47 48 48 - $basic_actions = $this->buildBasicActions($repository); 49 - $basic_properties = 50 - $this->buildBasicProperties($repository, $basic_actions); 49 + $curtain = $this->buildCurtain($repository); 50 + $basic_properties = $this->buildBasicProperties($repository); 51 51 52 52 $policy_actions = $this->buildPolicyActions($repository); 53 53 $policy_properties = ··· 120 120 $boxes = array(); 121 121 122 122 $boxes[] = id(new PHUIObjectBoxView()) 123 - ->setHeader($header) 124 - ->addPropertyList($basic_properties); 125 - 126 - $boxes[] = id(new PHUIObjectBoxView()) 127 123 ->setHeaderText(pht('Policies')) 124 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 128 125 ->addPropertyList($policy_properties); 129 126 130 127 $boxes[] = id(new PHUIObjectBoxView()) 131 128 ->setHeaderText(pht('Hosting')) 129 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 132 130 ->addPropertyList($hosting_properties); 133 131 134 132 if ($repository->canMirror()) { ··· 156 154 $boxes[] = id(new PHUIObjectBoxView()) 157 155 ->setFormErrors($mirror_info) 158 156 ->setHeaderText(pht('Mirrors')) 157 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 159 158 ->addPropertyList($mirror_properties); 160 159 161 160 $boxes[] = $mirror_list; ··· 164 163 if ($remote_properties) { 165 164 $boxes[] = id(new PHUIObjectBoxView()) 166 165 ->setHeaderText(pht('Remote')) 166 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 167 167 ->addPropertyList($remote_properties); 168 168 } 169 169 170 170 if ($storage_properties) { 171 171 $boxes[] = id(new PHUIObjectBoxView()) 172 172 ->setHeaderText(pht('Storage')) 173 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 173 174 ->addPropertyList($storage_properties); 174 175 } 175 176 176 177 if ($staging_properties) { 177 178 $boxes[] = id(new PHUIObjectBoxView()) 178 179 ->setHeaderText(pht('Staging')) 180 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 179 181 ->addPropertyList($staging_properties); 180 182 } 181 183 182 184 if ($automation_properties) { 183 185 $boxes[] = id(new PHUIObjectBoxView()) 184 186 ->setHeaderText(pht('Automation')) 187 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 185 188 ->addPropertyList($automation_properties); 186 189 } 187 190 188 191 $boxes[] = id(new PHUIObjectBoxView()) 189 192 ->setHeaderText(pht('Text Encoding')) 193 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 190 194 ->addPropertyList($encoding_properties); 191 195 192 196 $boxes[] = id(new PHUIObjectBoxView()) 193 197 ->setHeaderText(pht('Symbols')) 198 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 194 199 ->addPropertyList($symbols_properties); 195 200 196 201 if ($branches_properties) { 197 202 $boxes[] = id(new PHUIObjectBoxView()) 198 203 ->setHeaderText(pht('Branches')) 204 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 199 205 ->addPropertyList($branches_properties); 200 206 } 201 207 202 208 if ($subversion_properties) { 203 209 $boxes[] = id(new PHUIObjectBoxView()) 204 210 ->setHeaderText(pht('Subversion')) 211 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 205 212 ->addPropertyList($subversion_properties); 206 213 } 207 214 208 215 $boxes[] = id(new PHUIObjectBoxView()) 209 216 ->setHeaderText(pht('Actions')) 217 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 210 218 ->addPropertyList($actions_properties); 211 219 212 - return $this->buildApplicationPage( 213 - array( 214 - $crumbs, 220 + $crumbs->setBorder(true); 221 + 222 + $view = id(new PHUITwoColumnView()) 223 + ->setHeader($header) 224 + ->setCurtain($curtain) 225 + ->addPropertySection(pht('Properties'), $basic_properties) 226 + ->setMainColumn(array( 215 227 $boxes, 216 228 $timeline, 217 - ), 218 - array( 219 - 'title' => $title, 220 229 )); 230 + 231 + return $this->newPage() 232 + ->setTitle($title) 233 + ->setCrumbs($crumbs) 234 + ->appendChild($view); 235 + 221 236 } 222 237 223 - private function buildBasicActions(PhabricatorRepository $repository) { 224 - $viewer = $this->getRequest()->getUser(); 238 + private function buildCurtain(PhabricatorRepository $repository) { 239 + $viewer = $this->getViewer(); 225 240 226 - $view = id(new PhabricatorActionListView()) 227 - ->setUser($viewer); 241 + $curtain = $this->newCurtainView($repository); 228 242 229 243 $edit = id(new PhabricatorActionView()) 230 244 ->setIcon('fa-pencil') 231 245 ->setName(pht('Edit Basic Information')) 232 246 ->setHref($this->getRepositoryControllerURI($repository, 'edit/basic/')); 233 - $view->addAction($edit); 247 + $curtain->addAction($edit); 234 248 235 249 $edit = id(new PhabricatorActionView()) 236 250 ->setIcon('fa-refresh') ··· 238 252 ->setWorkflow(true) 239 253 ->setHref( 240 254 $this->getRepositoryControllerURI($repository, 'edit/update/')); 241 - $view->addAction($edit); 255 + $curtain->addAction($edit); 242 256 243 257 $activate = id(new PhabricatorActionView()) 244 258 ->setHref( ··· 255 269 ->setName(pht('Activate Repository')); 256 270 } 257 271 258 - $view->addAction($activate); 272 + $curtain->addAction($activate); 259 273 260 - $view->addAction( 274 + $curtain->addAction( 261 275 id(new PhabricatorActionView()) 262 276 ->setName(pht('Delete Repository')) 263 277 ->setIcon('fa-times') ··· 266 280 ->setDisabled(true) 267 281 ->setWorkflow(true)); 268 282 269 - return $view; 283 + return $curtain; 270 284 } 271 285 272 286 private function buildBasicProperties( 273 - PhabricatorRepository $repository, 274 - PhabricatorActionListView $actions) { 287 + PhabricatorRepository $repository) { 275 288 276 - $viewer = $this->getRequest()->getUser(); 289 + $viewer = $this->getViewer(); 277 290 278 291 $view = id(new PHUIPropertyListView()) 279 - ->setUser($viewer) 280 - ->setObject($repository) 281 - ->setActionList($actions); 292 + ->setUser($viewer); 282 293 283 294 $type = PhabricatorRepositoryType::getNameForRepositoryType( 284 295 $repository->getVersionControlSystem()); ··· 322 333 } 323 334 324 335 private function buildEncodingActions(PhabricatorRepository $repository) { 325 - $viewer = $this->getRequest()->getUser(); 336 + $viewer = $this->getViewer(); 326 337 327 338 $view = id(new PhabricatorActionListView()) 328 339 ->setUser($viewer); ··· 341 352 PhabricatorRepository $repository, 342 353 PhabricatorActionListView $actions) { 343 354 344 - $viewer = $this->getRequest()->getUser(); 355 + $viewer = $this->getViewer(); 345 356 346 357 $view = id(new PHUIPropertyListView()) 347 358 ->setUser($viewer) ··· 358 369 } 359 370 360 371 private function buildPolicyActions(PhabricatorRepository $repository) { 361 - $viewer = $this->getRequest()->getUser(); 372 + $viewer = $this->getViewer(); 362 373 363 374 $view = id(new PhabricatorActionListView()) 364 375 ->setUser($viewer); ··· 377 388 PhabricatorRepository $repository, 378 389 PhabricatorActionListView $actions) { 379 390 380 - $viewer = $this->getRequest()->getUser(); 391 + $viewer = $this->getViewer(); 381 392 382 393 $view = id(new PHUIPropertyListView()) 383 394 ->setUser($viewer) ··· 412 423 } 413 424 414 425 private function buildBranchesActions(PhabricatorRepository $repository) { 415 - $viewer = $this->getRequest()->getUser(); 426 + $viewer = $this->getViewer(); 416 427 417 428 $view = id(new PhabricatorActionListView()) 418 429 ->setUser($viewer); ··· 431 442 PhabricatorRepository $repository, 432 443 PhabricatorActionListView $actions) { 433 444 434 - $viewer = $this->getRequest()->getUser(); 445 + $viewer = $this->getViewer(); 435 446 436 447 $view = id(new PHUIPropertyListView()) 437 448 ->setUser($viewer) ··· 461 472 } 462 473 463 474 private function buildSubversionActions(PhabricatorRepository $repository) { 464 - $viewer = $this->getRequest()->getUser(); 475 + $viewer = $this->getViewer(); 465 476 466 477 $view = id(new PhabricatorActionListView()) 467 478 ->setUser($viewer); ··· 480 491 PhabricatorRepository $repository, 481 492 PhabricatorActionListView $actions) { 482 493 483 - $viewer = $this->getRequest()->getUser(); 494 + $viewer = $this->getViewer(); 484 495 485 496 $view = id(new PHUIPropertyListView()) 486 497 ->setUser($viewer) ··· 500 511 } 501 512 502 513 private function buildActionsActions(PhabricatorRepository $repository) { 503 - $viewer = $this->getRequest()->getUser(); 514 + $viewer = $this->getViewer(); 504 515 505 516 $view = id(new PhabricatorActionListView()) 506 517 ->setUser($viewer); ··· 519 530 PhabricatorRepository $repository, 520 531 PhabricatorActionListView $actions) { 521 532 522 - $viewer = $this->getRequest()->getUser(); 533 + $viewer = $this->getViewer(); 523 534 524 535 $view = id(new PHUIPropertyListView()) 525 536 ->setUser($viewer) ··· 541 552 } 542 553 543 554 private function buildRemoteActions(PhabricatorRepository $repository) { 544 - $viewer = $this->getRequest()->getUser(); 555 + $viewer = $this->getViewer(); 545 556 546 557 $view = id(new PhabricatorActionListView()) 547 558 ->setUser($viewer); ··· 560 571 PhabricatorRepository $repository, 561 572 PhabricatorActionListView $actions) { 562 573 563 - $viewer = $this->getRequest()->getUser(); 574 + $viewer = $this->getViewer(); 564 575 565 576 $view = id(new PHUIPropertyListView()) 566 577 ->setUser($viewer) ··· 581 592 } 582 593 583 594 private function buildStorageActions(PhabricatorRepository $repository) { 584 - $viewer = $this->getRequest()->getUser(); 595 + $viewer = $this->getViewer(); 585 596 586 597 $view = id(new PhabricatorActionListView()) 587 598 ->setUser($viewer); ··· 600 611 PhabricatorRepository $repository, 601 612 PhabricatorActionListView $actions) { 602 613 603 - $viewer = $this->getRequest()->getUser(); 614 + $viewer = $this->getViewer(); 604 615 605 616 $view = id(new PHUIPropertyListView()) 606 617 ->setUser($viewer) ··· 801 812 private function buildRepositoryStatus( 802 813 PhabricatorRepository $repository) { 803 814 804 - $viewer = $this->getRequest()->getUser(); 815 + $viewer = $this->getViewer(); 805 816 $is_cluster = $repository->getAlmanacServicePHID(); 806 817 807 818 $view = new PHUIStatusListView(); ··· 1188 1199 private function buildMirrorActions( 1189 1200 PhabricatorRepository $repository) { 1190 1201 1191 - $viewer = $this->getRequest()->getUser(); 1202 + $viewer = $this->getViewer(); 1192 1203 1193 1204 $mirror_actions = id(new PhabricatorActionListView()) 1194 1205 ->setUser($viewer); ··· 1211 1222 PhabricatorRepository $repository, 1212 1223 PhabricatorActionListView $actions) { 1213 1224 1214 - $viewer = $this->getRequest()->getUser(); 1225 + $viewer = $this->getViewer(); 1215 1226 1216 1227 $mirror_properties = id(new PHUIPropertyListView()) 1217 1228 ->setUser($viewer) ··· 1262 1273 $mirror_list->addItem($item); 1263 1274 } 1264 1275 1265 - return $mirror_list; 1276 + return id(new PHUIObjectBoxView()) 1277 + ->setHeaderText(pht('Configured Mirrors')) 1278 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 1279 + ->setObjectList($mirror_list); 1266 1280 } 1267 1281 1268 1282 private function buildSymbolsActions(PhabricatorRepository $repository) { 1269 - $viewer = $this->getRequest()->getUser(); 1283 + $viewer = $this->getViewer(); 1270 1284 1271 1285 $view = id(new PhabricatorActionListView()) 1272 1286 ->setUser($viewer); ··· 1285 1299 PhabricatorRepository $repository, 1286 1300 PhabricatorActionListView $actions) { 1287 1301 1288 - $viewer = $this->getRequest()->getUser(); 1302 + $viewer = $this->getViewer(); 1289 1303 1290 1304 $view = id(new PHUIPropertyListView()) 1291 1305 ->setUser($viewer)
+14 -4
src/applications/diffusion/controller/DiffusionRepositoryEditStagingController.php
··· 45 45 $crumbs = $this->buildApplicationCrumbs(); 46 46 $crumbs->addTextCrumb(pht('Edit Staging')); 47 47 48 - $title = pht('Edit %s', $repository->getName()); 48 + $title = pht('Edit Staging (%s)', $repository->getName()); 49 + $header = id(new PHUIHeaderView()) 50 + ->setHeader($title) 51 + ->setHeaderIcon('fa-pencil'); 49 52 50 53 $form = id(new AphrontFormView()) 51 54 ->setUser($viewer) ··· 68 71 ->setValue(pht('Save')) 69 72 ->addCancelButton($edit_uri)); 70 73 71 - $object_box = id(new PHUIObjectBoxView()) 72 - ->setHeaderText($title) 74 + $form_box = id(new PHUIObjectBoxView()) 75 + ->setHeaderText(pht('Staging')) 76 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 73 77 ->setForm($form); 74 78 79 + $view = id(new PHUITwoColumnView()) 80 + ->setHeader($header) 81 + ->setFooter(array( 82 + $form_box, 83 + )); 84 + 75 85 return $this->newPage() 76 86 ->setTitle($title) 77 87 ->setCrumbs($crumbs) 78 - ->appendChild($object_box); 88 + ->appendChild($view); 79 89 } 80 90 81 91 }
+14 -5
src/applications/diffusion/controller/DiffusionRepositoryEditStorageController.php
··· 22 22 $crumbs->addTextCrumb(pht('Edit Storage')); 23 23 24 24 $title = pht('Edit %s', $repository->getName()); 25 + $header = id(new PHUIHeaderView()) 26 + ->setHeader($title) 27 + ->setHeaderIcon('fa-pencil'); 25 28 26 29 $service_phid = $repository->getAlmanacServicePHID(); 27 30 if ($service_phid) { ··· 57 60 id(new AphrontFormSubmitControl()) 58 61 ->addCancelButton($edit_uri, pht('Done'))); 59 62 60 - $object_box = id(new PHUIObjectBoxView()) 61 - ->setHeaderText($title) 62 - ->setForm($form) 63 - ->setFormErrors($errors); 63 + $form_box = id(new PHUIObjectBoxView()) 64 + ->setHeaderText(pht('Storage')) 65 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 66 + ->setForm($form); 67 + 68 + $view = id(new PHUITwoColumnView()) 69 + ->setHeader($header) 70 + ->setFooter(array( 71 + $form_box, 72 + )); 64 73 65 74 return $this->newPage() 66 75 ->setTitle($title) 67 76 ->setCrumbs($crumbs) 68 - ->appendChild($object_box); 77 + ->appendChild($view); 69 78 } 70 79 71 80 }
+12 -2
src/applications/diffusion/controller/DiffusionRepositoryEditSubversionController.php
··· 63 63 $crumbs->addTextCrumb(pht('Edit Subversion Info')); 64 64 65 65 $title = pht('Edit Subversion Info (%s)', $repository->getName()); 66 + $header = id(new PHUIHeaderView()) 67 + ->setHeader($title) 68 + ->setHeaderIcon('fa-pencil'); 66 69 67 70 $policies = id(new PhabricatorPolicyQuery()) 68 71 ->setViewer($viewer) ··· 96 99 ->addCancelButton($edit_uri)); 97 100 98 101 $form_box = id(new PHUIObjectBoxView()) 99 - ->setHeaderText($title) 102 + ->setHeaderText(pht('Subversion')) 103 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 100 104 ->setForm($form); 101 105 106 + $view = id(new PHUITwoColumnView()) 107 + ->setHeader($header) 108 + ->setFooter(array( 109 + $form_box, 110 + )); 111 + 102 112 return $this->newPage() 103 113 ->setTitle($title) 104 114 ->setCrumbs($crumbs) 105 - ->appendChild($form_box); 115 + ->appendChild($view); 106 116 } 107 117 108 118 }
+14 -4
src/applications/diffusion/controller/DiffusionRepositorySymbolsController.php
··· 59 59 $crumbs = $this->buildApplicationCrumbs(); 60 60 $crumbs->addTextCrumb(pht('Edit Symbols')); 61 61 62 - $title = pht('Edit %s', $repository->getName()); 62 + $title = pht('Edit Symbols (%s)', $repository->getName()); 63 + $header = id(new PHUIHeaderView()) 64 + ->setHeader($title) 65 + ->setHeaderIcon('fa-pencil'); 63 66 64 67 $form = id(new AphrontFormView()) 65 68 ->setUser($viewer) ··· 85 88 ->setValue(pht('Save')) 86 89 ->addCancelButton($edit_uri)); 87 90 88 - $object_box = id(new PHUIObjectBoxView()) 89 - ->setHeaderText($title) 91 + $form_box = id(new PHUIObjectBoxView()) 92 + ->setHeaderText(pht('Symbols')) 93 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 90 94 ->setForm($form) 91 95 ->setFormErrors($errors); 92 96 97 + $view = id(new PHUITwoColumnView()) 98 + ->setHeader($header) 99 + ->setFooter(array( 100 + $form_box, 101 + )); 102 + 93 103 return $this->newPage() 94 104 ->setTitle($title) 95 105 ->setCrumbs($crumbs) 96 - ->appendChild($object_box); 106 + ->appendChild($view); 97 107 } 98 108 99 109 private function getInstructions() {
+11 -4
src/applications/diffusion/controller/DiffusionSymbolController.php
··· 134 134 $table->setNoDataString( 135 135 pht('No matching symbol could be found in any indexed repository.')); 136 136 137 - $panel = id(new PHUIObjectBoxView()) 138 - ->setHeaderText(pht('Similar Symbols')) 139 - ->setTable($table); 137 + $header = id(new PHUIHeaderView()) 138 + ->setHeader(pht('Similar Symbols')) 139 + ->setHeaderIcon('fa-bullseye'); 140 140 141 141 $crumbs = $this->buildApplicationCrumbs(); 142 142 $crumbs->addTextCrumb(pht('Find Symbol')); 143 + $crumbs->setBorder(true); 144 + 145 + $view = id(new PHUITwoColumnView()) 146 + ->setHeader($header) 147 + ->setFooter(array( 148 + $table, 149 + )); 143 150 144 151 return $this->newPage() 145 152 ->setTitle(pht('Find Symbol')) 146 153 ->setCrumbs($crumbs) 147 - ->appendChild($panel); 154 + ->appendChild($view); 148 155 } 149 156 150 157 }
+20 -10
src/applications/diffusion/controller/DiffusionTagListController.php
··· 45 45 $tags = $pager->sliceResults($tags); 46 46 47 47 $content = null; 48 + 49 + $header = id(new PHUIHeaderView()) 50 + ->setHeader(pht('Tags')) 51 + ->setHeaderIcon('fa-tags'); 52 + 48 53 if (!$tags) { 49 54 $content = $this->renderStatusMessage( 50 55 pht('No Tags'), ··· 69 74 $handles = $this->loadViewerHandles($phids); 70 75 $view->setHandles($handles); 71 76 72 - $panel = id(new PHUIObjectBoxView()) 73 - ->setHeaderText(pht('Tags')) 74 - ->appendChild($view); 75 - 76 - $content = $panel; 77 + $content = $view; 77 78 } 78 79 79 80 $crumbs = $this->buildCrumbs( ··· 81 82 'tags' => true, 82 83 'commit' => $drequest->getSymbolicCommit(), 83 84 )); 85 + $crumbs->setBorder(true); 86 + 87 + $box = id(new PHUIObjectBoxView()) 88 + ->setHeaderText($repository->getDisplayName()) 89 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 90 + ->setTable($view); 84 91 85 92 $pager_box = $this->renderTablePagerBox($pager); 86 93 94 + $view = id(new PHUITwoColumnView()) 95 + ->setHeader($header) 96 + ->setFooter(array( 97 + $box, 98 + $pager_box, 99 + )); 100 + 87 101 return $this->newPage() 88 102 ->setTitle( 89 103 array( ··· 91 105 $repository->getDisplayName(), 92 106 )) 93 107 ->setCrumbs($crumbs) 94 - ->appendChild( 95 - array( 96 - $content, 97 - $pager_box, 98 - )); 108 + ->appendChild($view); 99 109 } 100 110 101 111 }
-5
src/applications/diffusion/view/DiffusionBrowseTableView.php
··· 90 90 $browse_link, 91 91 idx($dict, 'lint'), 92 92 $dict['commit'], 93 - $dict['author'], 94 93 $dict['details'], 95 94 $dict['date'], 96 95 ); ··· 120 119 pht('Path'), 121 120 ($lint ? $lint : pht('Lint')), 122 121 pht('Modified'), 123 - pht('Author/Committer'), 124 122 pht('Details'), 125 123 pht('Committed'), 126 124 )); 127 125 $view->setColumnClasses( 128 126 array( 129 127 'nudgeright', 130 - '', 131 128 '', 132 129 '', 133 130 '', ··· 142 139 true, 143 140 true, 144 141 true, 145 - true, 146 142 )); 147 143 148 144 $view->setDeviceVisibility( ··· 150 146 true, 151 147 true, 152 148 false, 153 - true, 154 149 false, 155 150 true, 156 151 false,
+3 -1
src/applications/diffusion/view/DiffusionView.php
··· 95 95 } 96 96 97 97 $icon = DifferentialChangeType::getIconForFileType($file_type); 98 - $icon_view = id(new PHUIIconView())->setIcon($icon); 98 + $color = DifferentialChangeType::getIconColorForFileType($file_type); 99 + $icon_view = id(new PHUIIconView()) 100 + ->setIcon($icon.' '.$color); 99 101 100 102 // If we're rendering a file or directory name, don't show the tooltip. 101 103 if ($display_name !== null) {
+9
src/view/form/PHUIInfoView.php
··· 14 14 private $id; 15 15 private $buttons = array(); 16 16 private $isHidden; 17 + private $flush; 17 18 18 19 public function setTitle($title) { 19 20 $this->title = $title; ··· 37 38 38 39 public function setIsHidden($bool) { 39 40 $this->isHidden = $bool; 41 + return $this; 42 + } 43 + 44 + public function setFlush($flush) { 45 + $this->flush = $flush; 40 46 return $this; 41 47 } 42 48 ··· 87 93 $classes[] = 'phui-info-view'; 88 94 $classes[] = 'phui-info-severity-'.$this->severity; 89 95 $classes[] = 'grouped'; 96 + if ($this->flush) { 97 + $classes[] = 'phui-info-view-flush'; 98 + } 90 99 $classes = implode(' ', $classes); 91 100 92 101 $children = $this->renderChildren();
+1
src/view/form/PHUIPagedFormView.php
··· 263 263 $form->appendChild($submit); 264 264 265 265 $box = id(new PHUIObjectBoxView()) 266 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 266 267 ->setFormErrors($errors) 267 268 ->setForm($form); 268 269
+8 -2
src/view/phui/PHUIHeadThingView.php
··· 35 35 36 36 $classes = array(); 37 37 $classes[] = 'phui-head-thing-view'; 38 + if ($this->image) { 39 + $classes[] = 'phui-head-has-image'; 40 + } 38 41 39 42 if ($this->size) { 40 43 $classes[] = $this->size; ··· 57 60 'href' => $this->imageHref, 58 61 )); 59 62 60 - return array($image, $this->content); 61 - 63 + if ($this->image) { 64 + return array($image, $this->content); 65 + } else { 66 + return $this->content; 67 + } 62 68 63 69 } 64 70
+8
webroot/rsrc/css/application/diffusion/diffusion-icons.css
··· 20 20 .diffusion-link-icon + .diffusion-link-icon { 21 21 margin-left: 6px; 22 22 } 23 + 24 + .diffusion-search-boxen { 25 + padding: 16px; 26 + } 27 + 28 + .diffusion-search-boxen .phui-form-view { 29 + padding: 0; 30 + }
+6 -8
webroot/rsrc/css/application/diffusion/diffusion-source.css
··· 4 4 5 5 .diffusion-source { 6 6 width: 100%; 7 - font: 10px/13px "Menlo", "Consolas", "Monaco", monospace; 8 7 background: #fff; 9 8 } 10 9 ··· 21 20 } 22 21 23 22 .diffusion-source td { 24 - letter-spacing: 0.0083334px; 25 - vertical-align: top; 26 - white-space: pre-wrap; 27 - padding-bottom: 1px; 28 - padding-left: 8px; 29 - line-height: 16px; 30 - width: 100%; 23 + vertical-align: top; 24 + white-space: pre-wrap; 25 + padding-top: 1px; 26 + padding-bottom: 1px; 27 + padding-left: 8px; 28 + width: 100%; 31 29 } 32 30 33 31 .diffusion-browse-type-form {
+17 -2
webroot/rsrc/css/phui/phui-box.css
··· 86 86 padding: 6px 16px; 87 87 } 88 88 89 - .device .phui-box.phui-box-blue-property .phui-header-shell { 90 - padding: 6px 12px; 89 + .device .phui-box.phui-box-blue-property .phui-header-shell, 90 + .device .phui-box-blue-property.phui-object-box.phui-object-box-collapsed 91 + .phui-header-shell { 92 + padding: 6px 12px; 91 93 } 92 94 93 95 .phui-box.phui-box-blue-property .phui-header-header { ··· 98 100 .phui-box-blue-property .phui-object-item-list-view.phui-object-list-flush { 99 101 padding: 2px 8px; 100 102 } 103 + 104 + body .phui-box-blue-property.phui-object-box.phui-object-box-collapsed { 105 + padding: 0; 106 + } 107 + 108 + body .phui-box-blue-property .phui-header-shell + .phui-object-box { 109 + margin-bottom: 0; 110 + } 111 + 112 + .phui-box-blue-property .phui-header-shell + .phui-object-box 113 + .phui-header-shell { 114 + background: #fff; 115 + }
+3
webroot/rsrc/css/phui/phui-head-thing.css
··· 6 6 height: 24px; 7 7 line-height: 22px; 8 8 color: {$greytext}; 9 + } 10 + 11 + .phui-head-thing-view.phui-head-has-image { 9 12 position: relative; 10 13 padding-left: 32px; 11 14 }
+4
webroot/rsrc/css/phui/phui-header-view.css
··· 324 324 .phui-profile-header .phui-header-col3 { 325 325 vertical-align: top; 326 326 } 327 + 328 + .phui-header-view .phui-tag-shade-indigo a { 329 + color: {$sh-indigotext}; 330 + }
+4
webroot/rsrc/css/phui/phui-info-view.css
··· 10 10 border-radius: 3px; 11 11 } 12 12 13 + .phui-info-view.phui-info-view-flush { 14 + margin: 0 0 20px 0; 15 + } 16 + 13 17 .device .phui-info-view { 14 18 margin: 8px; 15 19 }
-1
webroot/rsrc/css/phui/phui-property-list-view.css
··· 199 199 .phui-property-list-image-content img { 200 200 margin: 20px auto; 201 201 background: url('/rsrc/image/checker_light.png'); 202 - border: 1px solid {$lightblueborder}; 203 202 } 204 203 205 204 .device-desktop .phui-property-list-image-content img:hover {
+12 -7
webroot/rsrc/css/phui/phui-two-column-view.css
··· 79 79 margin: 0 0 20px 0; 80 80 } 81 81 82 - .phui-two-column-view .phui-object-box.phui-object-box-collapsed { 83 - padding: 0; 84 - } 85 - 86 82 /* Timeline */ 87 83 88 84 .phui-two-column-view .phui-timeline-view { ··· 115 111 116 112 .device-desktop .phui-main-column .phui-property-list-key { 117 113 margin-left: 0; 118 - width: 140px; 114 + width: 160px; 119 115 } 120 116 121 117 .device-desktop .phui-main-column .phui-property-list-value { 122 118 margin-left: 8px; 123 - width: calc(100% - 180px); 119 + width: calc(100% - 200px); 124 120 } 125 121 126 122 ··· 132 128 } 133 129 134 130 .device-desktop .phui-two-column-view .phui-property-list-container { 135 - padding: 12px 16px; 131 + padding: 16px 0; 136 132 } 137 133 138 134 .device .phui-two-column-view .phui-property-list-container { 139 135 padding: 12px 8px; 140 136 } 141 137 138 + .phui-two-column-view .phui-property-list-container 139 + .keyboard-shortcuts-available { 140 + display: none; 141 + } 142 + 142 143 .phui-two-column-properties.phui-object-box { 143 144 border: 1px solid rgba({$alphablue}, .2); 144 145 } ··· 191 192 .phui-info-view { 192 193 margin: 0; 193 194 } 195 + 196 + .phui-two-column-view .phui-object-box .phui-header-shell + .phui-info-view { 197 + margin: 16px 16px 0 16px; 198 + }