diff --git a/src/applications/meta/controller/PhabricatorApplicationDetailViewController.php b/src/applications/meta/controller/PhabricatorApplicationDetailViewController.php index 19aad0e6a5..07dea613db 100644 --- a/src/applications/meta/controller/PhabricatorApplicationDetailViewController.php +++ b/src/applications/meta/controller/PhabricatorApplicationDetailViewController.php @@ -24,11 +24,13 @@ final class PhabricatorApplicationDetailViewController $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb($selected->getName()); + $crumbs->setBorder(true); $header = id(new PHUIHeaderView()) ->setHeader($title) ->setUser($viewer) - ->setPolicyObject($selected); + ->setPolicyObject($selected) + ->setHeaderIcon($selected->getIcon()); if ($selected->isInstalled()) { $header->setStatus('fa-check', 'bluegrey', pht('Installed')); @@ -37,11 +39,8 @@ final class PhabricatorApplicationDetailViewController } $actions = $this->buildActionView($viewer, $selected); - $properties = $this->buildPropertyView($selected, $actions); - - $object_box = id(new PHUIObjectBoxView()) - ->setHeader($header) - ->addPropertyList($properties); + $details = $this->buildPropertySectionView($selected); + $policies = $this->buildPolicyView($selected); $configs = PhabricatorApplicationConfigurationPanel::loadAllPanelsForApplication( @@ -51,29 +50,35 @@ final class PhabricatorApplicationDetailViewController foreach ($configs as $config) { $config->setViewer($viewer); $config->setApplication($selected); + $panel = $config->buildConfigurationPagePanel(); + $panel->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); + $panels[] = $panel; - $panels[] = $config->buildConfigurationPagePanel(); } - return $this->buildApplicationPage( - array( - $crumbs, - $object_box, - $panels, - ), - array( - 'title' => $title, + $view = id(new PHUITwoColumnView()) + ->setHeader($header) + ->setMainColumn(array( + $policies, + $panels, + )) + ->addPropertySection(pht('DETAILS'), $details) + ->setActionList($actions); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild( + array( + $view, )); } - private function buildPropertyView( - PhabricatorApplication $application, - PhabricatorActionListView $actions) { - - $viewer = $this->getRequest()->getUser(); + private function buildPropertySectionView( + PhabricatorApplication $application) { + $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView()); - $properties->setActionList($actions); $properties->addProperty( pht('Description'), @@ -111,20 +116,35 @@ final class PhabricatorApplicationDetailViewController $properties->addTextContent($overview); } + return $properties; + } + + private function buildPolicyView( + PhabricatorApplication $application) { + + $viewer = $this->getViewer(); + $properties = id(new PHUIPropertyListView()) + ->setStacked(true); + + $header = id(new PHUIHeaderView()) + ->setHeader(pht('POLICIES')) + ->setHeaderIcon('fa-lock'); + $descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions( $viewer, $application); - $properties->addSectionHeader( - pht('Policies'), 'fa-lock'); - foreach ($application->getCapabilities() as $capability) { $properties->addProperty( $application->getCapabilityLabel($capability), idx($descriptions, $capability)); } - return $properties; + return id(new PHUIObjectBoxView()) + ->setHeader($header) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) + ->appendChild($properties); + } private function buildActionView(