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

Modernize Diffusion Create with sidenav, curtain

Summary: This moves the navigation to a standard sidebar, and moves all actions to the curtain. Also pulled out info view when available for cleaner UI.

Test Plan:
Create a git, svn, hg test repository and verify each page in the sidebar renders as expected.

{F4973792}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+162 -148
+9 -2
src/applications/diffusion/controller/DiffusionRepositoryManagePanelsController.php
··· 83 83 ->setTag('a') 84 84 ->setText(pht('View Repository')) 85 85 ->setHref($repository->getURI()) 86 - ->setIcon('fa-code')); 86 + ->setIcon('fa-code') 87 + ->setColor(PHUIButtonView::GREEN)); 87 88 88 89 $view = id(new PHUITwoColumnView()) 89 90 ->setHeader($header) 90 - ->setNavigation($nav) 91 91 ->setMainColumn($content); 92 92 93 93 $curtain = $panel->buildManagementPanelCurtain(); ··· 98 98 return $this->newPage() 99 99 ->setTitle($title) 100 100 ->setCrumbs($crumbs) 101 + ->setNavigation($nav) 101 102 ->appendChild($view); 102 103 } 103 104 ··· 111 112 112 113 $nav = id(new AphrontSideNavFilterView()) 113 114 ->setBaseURI($base_uri); 115 + 116 + $item = id(new PHUIListItemView()) 117 + ->setName(pht('manage')) 118 + ->setType(PHUIListItemView::TYPE_LABEL); 119 + 120 + $nav->addMenuItem($item); 114 121 115 122 foreach ($panels as $panel) { 116 123 $key = $panel->getManagementPanelKey();
+7 -6
src/applications/diffusion/management/DiffusionRepositoryActionsManagementPanel.php
··· 37 37 ); 38 38 } 39 39 40 - protected function buildManagementPanelActions() { 40 + public function buildManagementPanelCurtain() { 41 41 $repository = $this->getRepository(); 42 42 $viewer = $this->getViewer(); 43 + $action_list = $this->getNewActionList(); 43 44 44 45 $can_edit = PhabricatorPolicyFilter::hasCapability( 45 46 $viewer, ··· 48 49 49 50 $actions_uri = $this->getEditPageURI(); 50 51 51 - return array( 52 + $action_list->addAction( 52 53 id(new PhabricatorActionView()) 53 54 ->setIcon('fa-pencil') 54 55 ->setName(pht('Edit Actions')) 55 56 ->setHref($actions_uri) 56 57 ->setDisabled(!$can_edit) 57 - ->setWorkflow(!$can_edit), 58 - ); 58 + ->setWorkflow(!$can_edit)); 59 + 60 + return $this->getNewCurtainView($action_list); 59 61 } 60 62 61 63 public function buildManagementPanelContent() { ··· 63 65 $viewer = $this->getViewer(); 64 66 65 67 $view = id(new PHUIPropertyListView()) 66 - ->setViewer($viewer) 67 - ->setActionList($this->newActions()); 68 + ->setViewer($viewer); 68 69 69 70 $notify = $repository->getDetail('herald-disabled') 70 71 ? pht('Off')
+10 -7
src/applications/diffusion/management/DiffusionRepositoryAutomationManagementPanel.php
··· 46 46 return 'fa-truck'; 47 47 } 48 48 49 - protected function buildManagementPanelActions() { 49 + public function buildManagementPanelCurtain() { 50 50 $repository = $this->getRepository(); 51 51 $viewer = $this->getViewer(); 52 + $action_list = $this->getNewActionList(); 52 53 53 54 $can_edit = PhabricatorPolicyFilter::hasCapability( 54 55 $viewer, ··· 60 61 $automation_uri = $this->getEditPageURI(); 61 62 $test_uri = $repository->getPathURI('edit/testautomation/'); 62 63 63 - return array( 64 + $action_list->addAction( 64 65 id(new PhabricatorActionView()) 65 66 ->setIcon('fa-pencil') 66 67 ->setName(pht('Edit Automation')) 67 68 ->setHref($automation_uri) 68 69 ->setDisabled(!$can_edit) 69 - ->setWorkflow(!$can_edit), 70 + ->setWorkflow(!$can_edit)); 71 + 72 + $action_list->addAction( 70 73 id(new PhabricatorActionView()) 71 74 ->setIcon('fa-gamepad') 72 75 ->setName(pht('Test Configuration')) 73 76 ->setWorkflow(true) 74 77 ->setDisabled(!$can_test) 75 - ->setHref($test_uri), 76 - ); 78 + ->setHref($test_uri)); 79 + 80 + return $this->getNewCurtainView($action_list); 77 81 } 78 82 79 83 public function buildManagementPanelContent() { ··· 81 85 $viewer = $this->getViewer(); 82 86 83 87 $view = id(new PHUIPropertyListView()) 84 - ->setViewer($viewer) 85 - ->setActionList($this->newActions()); 88 + ->setViewer($viewer); 86 89 87 90 $blueprint_phids = $repository->getAutomationBlueprintPHIDs(); 88 91 if (!$blueprint_phids) {
+21 -13
src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php
··· 33 33 ); 34 34 } 35 35 36 - protected function buildManagementPanelActions() { 36 + public function buildManagementPanelCurtain() { 37 37 $repository = $this->getRepository(); 38 38 $viewer = $this->getViewer(); 39 + $action_list = $this->getNewActionList(); 39 40 40 41 $can_edit = PhabricatorPolicyFilter::hasCapability( 41 42 $viewer, ··· 67 68 $can_dangerous = ($can_edit && $repository->canAllowDangerousChanges()); 68 69 } 69 70 70 - return array( 71 + $action_list->addAction( 71 72 id(new PhabricatorActionView()) 72 73 ->setIcon('fa-pencil') 73 74 ->setName(pht('Edit Basic Information')) 74 75 ->setHref($edit_uri) 75 76 ->setDisabled(!$can_edit) 76 - ->setWorkflow(!$can_edit), 77 + ->setWorkflow(!$can_edit)); 78 + 79 + $action_list->addAction( 77 80 id(new PhabricatorActionView()) 78 81 ->setIcon('fa-text-width') 79 82 ->setName(pht('Edit Text Encoding')) 80 83 ->setHref($encoding_uri) 81 84 ->setDisabled(!$can_edit) 82 - ->setWorkflow(!$can_edit), 85 + ->setWorkflow(!$can_edit)); 86 + 87 + $action_list->addAction( 83 88 id(new PhabricatorActionView()) 84 89 ->setIcon($dangerous_icon) 85 90 ->setName($dangerous_name) 86 91 ->setHref($dangerous_uri) 87 92 ->setDisabled(!$can_dangerous) 88 - ->setWorkflow(true), 93 + ->setWorkflow(true)); 94 + 95 + $action_list->addAction( 89 96 id(new PhabricatorActionView()) 90 97 ->setHref($activate_uri) 91 98 ->setIcon($activate_icon) 92 99 ->setName($activate_label) 93 100 ->setDisabled(!$can_edit) 94 - ->setWorkflow(true), 101 + ->setWorkflow(true)); 102 + 103 + $action_list->addAction( 95 104 id(new PhabricatorActionView()) 96 105 ->setName(pht('Delete Repository')) 97 106 ->setIcon('fa-times') 98 107 ->setHref($delete_uri) 99 108 ->setDisabled(true) 100 - ->setWorkflow(true), 101 - ); 109 + ->setWorkflow(true)); 110 + 111 + return $this->getNewCurtainView($action_list); 102 112 } 103 113 104 114 public function buildManagementPanelContent() { ··· 108 118 109 119 $repository = $this->getRepository(); 110 120 $is_new = $repository->isNewlyInitialized(); 121 + $info_view = null; 111 122 if ($is_new) { 112 123 $messages = array(); 113 124 ··· 131 142 $info_view = id(new PHUIInfoView()) 132 143 ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) 133 144 ->setErrors($messages); 134 - 135 - $basics->setInfoView($info_view); 136 145 } 137 146 138 147 $result[] = $basics; ··· 142 151 $result[] = $this->newBox(pht('Description'), $description); 143 152 } 144 153 145 - return $result; 154 + return array($info_view, $result); 146 155 } 147 156 148 157 private function buildBasics() { ··· 150 159 $viewer = $this->getViewer(); 151 160 152 161 $view = id(new PHUIPropertyListView()) 153 - ->setViewer($viewer) 154 - ->setActionList($this->newActions()); 162 + ->setViewer($viewer); 155 163 156 164 $name = $repository->getName(); 157 165 $view->addProperty(pht('Name'), $name);
+7 -6
src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
··· 41 41 ); 42 42 } 43 43 44 - protected function buildManagementPanelActions() { 44 + public function buildManagementPanelCurtain() { 45 45 $repository = $this->getRepository(); 46 46 $viewer = $this->getViewer(); 47 + $action_list = $this->getNewActionList(); 47 48 48 49 $can_edit = PhabricatorPolicyFilter::hasCapability( 49 50 $viewer, ··· 52 53 53 54 $branches_uri = $this->getEditPageURI(); 54 55 55 - return array( 56 + $action_list->addAction( 56 57 id(new PhabricatorActionView()) 57 58 ->setIcon('fa-pencil') 58 59 ->setName(pht('Edit Branches')) 59 60 ->setHref($branches_uri) 60 61 ->setDisabled(!$can_edit) 61 - ->setWorkflow(!$can_edit), 62 - ); 62 + ->setWorkflow(!$can_edit)); 63 + 64 + return $this->getNewCurtainView($action_list); 63 65 } 64 66 65 67 public function buildManagementPanelContent() { ··· 67 69 $viewer = $this->getViewer(); 68 70 69 71 $view = id(new PHUIPropertyListView()) 70 - ->setViewer($viewer) 71 - ->setActionList($this->newActions()); 72 + ->setViewer($viewer); 72 73 73 74 $default_branch = nonempty( 74 75 $repository->getHumanReadableDetail('default-branch'),
+4
src/applications/diffusion/management/DiffusionRepositoryDocumentationManagementPanel.php
··· 21 21 return null; 22 22 } 23 23 24 + public function buildManagementPanelCurtain() { 25 + return null; 26 + } 27 + 24 28 public function getPanelNavigationURI() { 25 29 return PhabricatorEnv::getDoclink( 26 30 'Diffusion User Guide: Managing Repositories');
+3
src/applications/diffusion/management/DiffusionRepositoryHistoryManagementPanel.php
··· 21 21 return $this->newTimeline(); 22 22 } 23 23 24 + public function buildManagementPanelCurtain() { 25 + return null; 26 + } 24 27 25 28 }
+9 -29
src/applications/diffusion/management/DiffusionRepositoryManagementPanel.php
··· 37 37 abstract public function getManagementPanelLabel(); 38 38 abstract public function getManagementPanelOrder(); 39 39 abstract public function buildManagementPanelContent(); 40 + abstract public function buildManagementPanelCurtain(); 40 41 41 42 public function getManagementPanelIcon() { 42 43 return 'fa-pencil'; ··· 51 52 return true; 52 53 } 53 54 54 - final protected function newActions() { 55 - $actions = $this->buildManagementPanelActions(); 56 - if (!$actions) { 57 - return null; 58 - } 59 - 55 + public function getNewActionList() { 60 56 $viewer = $this->getViewer(); 57 + $action_id = celerity_generate_unique_node_id(); 61 58 62 - $action_list = id(new PhabricatorActionListView()) 63 - ->setViewer($viewer); 64 - 65 - foreach ($actions as $action) { 66 - $action_list->addAction($action); 67 - } 68 - 69 - return $action_list; 59 + return id(new PhabricatorActionListView()) 60 + ->setViewer($viewer) 61 + ->setID($action_id); 70 62 } 71 63 72 - public function buildManagementPanelCurtain() { 73 - // TODO: Delete or fix this, curtains always render in the left gutter 74 - // at the moment. 75 - return null; 76 - 77 - $actions = $this->newActions(); 78 - if (!$actions) { 79 - return null; 80 - } 81 - 64 + public function getNewCurtainView(PhabricatorActionListView $action_list) { 82 65 $viewer = $this->getViewer(); 83 - 84 - $curtain = id(new PHUICurtainView()) 66 + return id(new PHUICurtainView()) 85 67 ->setViewer($viewer) 86 - ->setActionList($actions); 87 - 88 - return $curtain; 68 + ->setActionList($action_list); 89 69 } 90 70 91 71 public static function getAllPanels() {
+7 -6
src/applications/diffusion/management/DiffusionRepositoryPoliciesManagementPanel.php
··· 54 54 ); 55 55 } 56 56 57 - protected function buildManagementPanelActions() { 57 + public function buildManagementPanelCurtain() { 58 58 $repository = $this->getRepository(); 59 59 $viewer = $this->getViewer(); 60 + $action_list = $this->getNewActionList(); 60 61 61 62 $can_edit = PhabricatorPolicyFilter::hasCapability( 62 63 $viewer, ··· 65 66 66 67 $edit_uri = $this->getEditPageURI(); 67 68 68 - return array( 69 + $action_list->addAction( 69 70 id(new PhabricatorActionView()) 70 71 ->setIcon('fa-pencil') 71 72 ->setName(pht('Edit Policies')) 72 73 ->setHref($edit_uri) 73 74 ->setDisabled(!$can_edit) 74 - ->setWorkflow(!$can_edit), 75 - ); 75 + ->setWorkflow(!$can_edit)); 76 + 77 + return $this->getNewCurtainView($action_list); 76 78 } 77 79 78 80 public function buildManagementPanelContent() { ··· 80 82 $viewer = $this->getViewer(); 81 83 82 84 $view = id(new PHUIPropertyListView()) 83 - ->setViewer($viewer) 84 - ->setActionList($this->newActions()); 85 + ->setViewer($viewer); 85 86 86 87 $descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions( 87 88 $viewer,
+7 -6
src/applications/diffusion/management/DiffusionRepositoryStagingManagementPanel.php
··· 37 37 ); 38 38 } 39 39 40 - protected function buildManagementPanelActions() { 40 + public function buildManagementPanelCurtain() { 41 41 $repository = $this->getRepository(); 42 42 $viewer = $this->getViewer(); 43 + $action_list = $this->getNewActionList(); 43 44 44 45 $can_edit = PhabricatorPolicyFilter::hasCapability( 45 46 $viewer, ··· 48 49 49 50 $staging_uri = $this->getEditPageURI(); 50 51 51 - return array( 52 + $action_list->addAction( 52 53 id(new PhabricatorActionView()) 53 54 ->setIcon('fa-pencil') 54 55 ->setName(pht('Edit Staging')) 55 56 ->setHref($staging_uri) 56 57 ->setDisabled(!$can_edit) 57 - ->setWorkflow(!$can_edit), 58 - ); 58 + ->setWorkflow(!$can_edit)); 59 + 60 + return $this->getNewCurtainView($action_list); 59 61 } 60 62 61 63 public function buildManagementPanelContent() { ··· 63 65 $viewer = $this->getViewer(); 64 66 65 67 $view = id(new PHUIPropertyListView()) 66 - ->setViewer($viewer) 67 - ->setActionList($this->newActions()); 68 + ->setViewer($viewer); 68 69 69 70 $staging_uri = $repository->getStagingURI(); 70 71 if (!$staging_uri) {
+7 -6
src/applications/diffusion/management/DiffusionRepositoryStatusManagementPanel.php
··· 28 28 return 'fa-check grey'; 29 29 } 30 30 31 - protected function buildManagementPanelActions() { 31 + public function buildManagementPanelCurtain() { 32 32 $repository = $this->getRepository(); 33 33 $viewer = $this->getViewer(); 34 + $action_list = $this->getNewActionList(); 34 35 35 36 $can_edit = PhabricatorPolicyFilter::hasCapability( 36 37 $viewer, ··· 39 40 40 41 $update_uri = $repository->getPathURI('edit/update/'); 41 42 42 - return array( 43 + $action_list->addAction( 43 44 id(new PhabricatorActionView()) 44 45 ->setIcon('fa-refresh') 45 46 ->setName(pht('Update Now')) 46 47 ->setWorkflow(true) 47 48 ->setDisabled(!$can_edit) 48 - ->setHref($update_uri), 49 - ); 49 + ->setHref($update_uri)); 50 + 51 + return $this->getNewCurtainView($action_list); 50 52 } 51 53 52 54 public function buildManagementPanelContent() { ··· 54 56 $viewer = $this->getViewer(); 55 57 56 58 $view = id(new PHUIPropertyListView()) 57 - ->setViewer($viewer) 58 - ->setActionList($this->newActions()); 59 + ->setViewer($viewer); 59 60 60 61 $view->addProperty( 61 62 pht('Update Frequency'),
+22 -22
src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php
··· 25 25 } 26 26 } 27 27 28 + public function buildManagementPanelCurtain() { 29 + $repository = $this->getRepository(); 30 + $viewer = $this->getViewer(); 31 + $action_list = $this->getNewActionList(); 32 + 33 + $doc_href = PhabricatorEnv::getDoclink('Cluster: Repositories'); 34 + 35 + $action_list->addAction( 36 + id(new PhabricatorActionView()) 37 + ->setIcon('fa-book') 38 + ->setHref($doc_href) 39 + ->setName(pht('Cluster Documentation'))); 40 + 41 + return $this->getNewCurtainView($action_list); 42 + } 43 + 28 44 public function buildManagementPanelContent() { 29 45 return array( 30 46 $this->buildStorageStatusPanel(), ··· 55 71 $view->addProperty(pht('Storage Path'), $storage_path); 56 72 $view->addProperty(pht('Storage Cluster'), $storage_service); 57 73 58 - $header = id(new PHUIHeaderView()) 59 - ->setHeader(pht('Storage')); 60 - 61 - return id(new PHUIObjectBoxView()) 62 - ->setHeader($header) 63 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 64 - ->addPropertyList($view); 74 + $box = $this->newBox(pht('Storage'), null); 75 + $box->addPropertyList($view); 76 + return $box; 65 77 } 66 78 67 79 private function buildClusterStatusPanel() { ··· 231 243 'date', 232 244 )); 233 245 234 - $doc_href = PhabricatorEnv::getDoclink('Cluster: Repositories'); 235 - 236 - $header = id(new PHUIHeaderView()) 237 - ->setHeader(pht('Cluster Status')) 238 - ->addActionLink( 239 - id(new PHUIButtonView()) 240 - ->setIcon('fa-book') 241 - ->setHref($doc_href) 242 - ->setTag('a') 243 - ->setText(pht('Documentation'))); 244 - 245 - return id(new PHUIObjectBoxView()) 246 - ->setHeader($header) 247 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 248 - ->setTable($table); 246 + $box = $this->newBox(pht('Cluster Status'), null); 247 + $box->setTable($table); 248 + return $box; 249 249 } 250 250 251 251 }
+7 -6
src/applications/diffusion/management/DiffusionRepositorySubversionManagementPanel.php
··· 36 36 ); 37 37 } 38 38 39 - protected function buildManagementPanelActions() { 39 + public function buildManagementPanelCurtain() { 40 40 $repository = $this->getRepository(); 41 41 $viewer = $this->getViewer(); 42 + $action_list = $this->getNewActionList(); 42 43 43 44 $can_edit = PhabricatorPolicyFilter::hasCapability( 44 45 $viewer, ··· 47 48 48 49 $subversion_uri = $this->getEditPageURI(); 49 50 50 - return array( 51 + $action_list->addAction( 51 52 id(new PhabricatorActionView()) 52 53 ->setIcon('fa-pencil') 53 54 ->setName(pht('Edit Properties')) 54 55 ->setHref($subversion_uri) 55 56 ->setDisabled(!$can_edit) 56 - ->setWorkflow(!$can_edit), 57 - ); 57 + ->setWorkflow(!$can_edit)); 58 + 59 + return $this->getNewCurtainView($action_list); 58 60 } 59 61 60 62 public function buildManagementPanelContent() { ··· 62 64 $viewer = $this->getViewer(); 63 65 64 66 $view = id(new PHUIPropertyListView()) 65 - ->setViewer($viewer) 66 - ->setActionList($this->newActions()); 67 + ->setViewer($viewer); 67 68 68 69 $default_branch = nonempty( 69 70 $repository->getHumanReadableDetail('svn-subpath'),
+7 -6
src/applications/diffusion/management/DiffusionRepositorySymbolsManagementPanel.php
··· 34 34 ); 35 35 } 36 36 37 - protected function buildManagementPanelActions() { 37 + public function buildManagementPanelCurtain() { 38 38 $repository = $this->getRepository(); 39 39 $viewer = $this->getViewer(); 40 + $action_list = $this->getNewActionList(); 40 41 41 42 $can_edit = PhabricatorPolicyFilter::hasCapability( 42 43 $viewer, ··· 45 46 46 47 $symbols_uri = $this->getEditPageURI(); 47 48 48 - return array( 49 + $action_list->addAction( 49 50 id(new PhabricatorActionView()) 50 51 ->setIcon('fa-pencil') 51 52 ->setName(pht('Edit Symbols')) 52 53 ->setHref($symbols_uri) 53 54 ->setDisabled(!$can_edit) 54 - ->setWorkflow(!$can_edit), 55 - ); 55 + ->setWorkflow(!$can_edit)); 56 + 57 + return $this->getNewCurtainView($action_list); 56 58 } 57 59 58 60 public function buildManagementPanelContent() { ··· 60 62 $viewer = $this->getViewer(); 61 63 62 64 $view = id(new PHUIPropertyListView()) 63 - ->setViewer($viewer) 64 - ->setActionList($this->newActions()); 65 + ->setViewer($viewer); 65 66 66 67 $languages = $repository->getSymbolLanguages(); 67 68 if ($languages) {
+35 -33
src/applications/diffusion/management/DiffusionRepositoryURIsManagementPanel.php
··· 17 17 return 400; 18 18 } 19 19 20 + public function buildManagementPanelCurtain() { 21 + $repository = $this->getRepository(); 22 + $viewer = $this->getViewer(); 23 + $action_list = $this->getNewActionList(); 24 + 25 + $can_edit = PhabricatorPolicyFilter::hasCapability( 26 + $viewer, 27 + $repository, 28 + PhabricatorPolicyCapability::CAN_EDIT); 29 + 30 + $doc_href = PhabricatorEnv::getDoclink('Diffusion User Guide: URIs'); 31 + $add_href = $repository->getPathURI('uri/edit/'); 32 + 33 + $action_list->addAction( 34 + id(new PhabricatorActionView()) 35 + ->setIcon('fa-plus') 36 + ->setHref($add_href) 37 + ->setDisabled(!$can_edit) 38 + ->setName(pht('Add New URI'))); 39 + 40 + $action_list->addAction( 41 + id(new PhabricatorActionView()) 42 + ->setIcon('fa-book') 43 + ->setHref($doc_href) 44 + ->setName(pht('URI Documentation'))); 45 + 46 + return $this->getNewCurtainView($action_list); 47 + } 48 + 20 49 public function buildManagementPanelContent() { 21 50 $repository = $this->getRepository(); 22 51 $viewer = $this->getViewer(); ··· 95 124 null, 96 125 )); 97 126 98 - $doc_href = PhabricatorEnv::getDoclink('Diffusion User Guide: URIs'); 99 - $add_href = $repository->getPathURI('uri/edit/'); 100 - 101 - $header = id(new PHUIHeaderView()) 102 - ->setHeader(pht('Repository URIs')) 103 - ->addActionLink( 104 - id(new PHUIButtonView()) 105 - ->setIcon('fa-plus') 106 - ->setHref($add_href) 107 - ->setTag('a') 108 - ->setText(pht('Add New URI'))) 109 - ->addActionLink( 110 - id(new PHUIButtonView()) 111 - ->setIcon('fa-book') 112 - ->setHref($doc_href) 113 - ->setTag('a') 114 - ->setText(pht('Documentation'))); 115 - 116 127 $is_new = $repository->isNewlyInitialized(); 117 128 118 129 $messages = array(); ··· 123 134 $host_message = pht('Phabricator is hosting this repository.'); 124 135 } 125 136 126 - $messages[] = array( 127 - id(new PHUIIconView())->setIcon('fa-folder'), 128 - ' ', 129 - $host_message, 130 - ); 137 + $messages[] = $host_message; 131 138 } else { 132 139 if ($is_new) { 133 140 $observe_message = pht( ··· 137 144 'This repository is hosted remotely. Phabricator is observing it.'); 138 145 } 139 146 140 - $messages[] = array( 141 - id(new PHUIIconView())->setIcon('fa-download'), 142 - ' ', 143 - $observe_message, 144 - ); 147 + $messages[] = $observe_message; 145 148 } 146 149 147 150 $info_view = id(new PHUIInfoView()) 148 151 ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) 149 152 ->setErrors($messages); 150 153 151 - return id(new PHUIObjectBoxView()) 152 - ->setHeader($header) 153 - ->setInfoView($info_view) 154 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 155 - ->setTable($table); 154 + $box = $this->newBox(pht('Repository URIs'), null); 155 + $box->setTable($table); 156 + 157 + return array($info_view, $box); 156 158 } 157 159 158 160 }