@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Convert Applications to two column view

Summary: Converts the meta applications application view layout to two column

Test Plan: click through "Configure" on each application, set up some emails. uninstall Phrequent

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

authored by

Chad Little and committed by
chad
010b7811 f6127f58

+45 -25
+45 -25
src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
··· 24 24 25 25 $crumbs = $this->buildApplicationCrumbs(); 26 26 $crumbs->addTextCrumb($selected->getName()); 27 + $crumbs->setBorder(true); 27 28 28 29 $header = id(new PHUIHeaderView()) 29 30 ->setHeader($title) 30 31 ->setUser($viewer) 31 - ->setPolicyObject($selected); 32 + ->setPolicyObject($selected) 33 + ->setHeaderIcon($selected->getIcon()); 32 34 33 35 if ($selected->isInstalled()) { 34 36 $header->setStatus('fa-check', 'bluegrey', pht('Installed')); ··· 37 39 } 38 40 39 41 $actions = $this->buildActionView($viewer, $selected); 40 - $properties = $this->buildPropertyView($selected, $actions); 41 - 42 - $object_box = id(new PHUIObjectBoxView()) 43 - ->setHeader($header) 44 - ->addPropertyList($properties); 42 + $details = $this->buildPropertySectionView($selected); 43 + $policies = $this->buildPolicyView($selected); 45 44 46 45 $configs = 47 46 PhabricatorApplicationConfigurationPanel::loadAllPanelsForApplication( ··· 51 50 foreach ($configs as $config) { 52 51 $config->setViewer($viewer); 53 52 $config->setApplication($selected); 53 + $panel = $config->buildConfigurationPagePanel(); 54 + $panel->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 55 + $panels[] = $panel; 54 56 55 - $panels[] = $config->buildConfigurationPagePanel(); 56 57 } 57 58 58 - return $this->buildApplicationPage( 59 - array( 60 - $crumbs, 61 - $object_box, 62 - $panels, 63 - ), 64 - array( 65 - 'title' => $title, 59 + $view = id(new PHUITwoColumnView()) 60 + ->setHeader($header) 61 + ->setMainColumn(array( 62 + $policies, 63 + $panels, 64 + )) 65 + ->addPropertySection(pht('DETAILS'), $details) 66 + ->setActionList($actions); 67 + 68 + return $this->newPage() 69 + ->setTitle($title) 70 + ->setCrumbs($crumbs) 71 + ->appendChild( 72 + array( 73 + $view, 66 74 )); 67 75 } 68 76 69 - private function buildPropertyView( 70 - PhabricatorApplication $application, 71 - PhabricatorActionListView $actions) { 72 - 73 - $viewer = $this->getRequest()->getUser(); 77 + private function buildPropertySectionView( 78 + PhabricatorApplication $application) { 74 79 80 + $viewer = $this->getViewer(); 75 81 $properties = id(new PHUIPropertyListView()); 76 - $properties->setActionList($actions); 77 82 78 83 $properties->addProperty( 79 84 pht('Description'), ··· 111 116 $properties->addTextContent($overview); 112 117 } 113 118 119 + return $properties; 120 + } 121 + 122 + private function buildPolicyView( 123 + PhabricatorApplication $application) { 124 + 125 + $viewer = $this->getViewer(); 126 + $properties = id(new PHUIPropertyListView()) 127 + ->setStacked(true); 128 + 129 + $header = id(new PHUIHeaderView()) 130 + ->setHeader(pht('POLICIES')) 131 + ->setHeaderIcon('fa-lock'); 132 + 114 133 $descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions( 115 134 $viewer, 116 135 $application); 117 136 118 - $properties->addSectionHeader( 119 - pht('Policies'), 'fa-lock'); 120 - 121 137 foreach ($application->getCapabilities() as $capability) { 122 138 $properties->addProperty( 123 139 $application->getCapabilityLabel($capability), 124 140 idx($descriptions, $capability)); 125 141 } 126 142 127 - return $properties; 143 + return id(new PHUIObjectBoxView()) 144 + ->setHeader($header) 145 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 146 + ->appendChild($properties); 147 + 128 148 } 129 149 130 150 private function buildActionView(