Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14031628
D15405.id37143.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D15405.id37143.diff
View Options
diff --git a/src/applications/meta/controller/PhabricatorApplicationDetailViewController.php b/src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
--- a/src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
+++ b/src/applications/meta/controller/PhabricatorApplicationDetailViewController.php
@@ -24,11 +24,13 @@
$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 @@
}
$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 @@
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 @@
$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(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 10, 11:35 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6710658
Default Alt Text
D15405.id37143.diff (3 KB)
Attached To
Mode
D15405: Convert Applications to two column view
Attached
Detach File
Event Timeline
Log In to Comment