mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 12:52:42 +01:00
Update Owners for PHUITwoColumn
Summary: Clean up owners a bit, move to two columns. Test Plan: Review a package, edit paths, remove all paths. Archive. {F1139351} Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15388
This commit is contained in:
parent
0569919eab
commit
6084b7a201
3 changed files with 63 additions and 31 deletions
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
return array(
|
return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'core.pkg.css' => '3d58b25a',
|
'core.pkg.css' => 'd3b3a609',
|
||||||
'core.pkg.js' => '7d8faf57',
|
'core.pkg.js' => '7d8faf57',
|
||||||
'darkconsole.pkg.js' => 'e7393ebb',
|
'darkconsole.pkg.js' => 'e7393ebb',
|
||||||
'differential.pkg.css' => '2de124c9',
|
'differential.pkg.css' => '2de124c9',
|
||||||
|
@ -123,7 +123,7 @@ return array(
|
||||||
'rsrc/css/phui/phui-action-panel.css' => '91c7b835',
|
'rsrc/css/phui/phui-action-panel.css' => '91c7b835',
|
||||||
'rsrc/css/phui/phui-badge.css' => 'f25c3476',
|
'rsrc/css/phui/phui-badge.css' => 'f25c3476',
|
||||||
'rsrc/css/phui/phui-big-info-view.css' => 'bd903741',
|
'rsrc/css/phui/phui-big-info-view.css' => 'bd903741',
|
||||||
'rsrc/css/phui/phui-box.css' => 'c9e01148',
|
'rsrc/css/phui/phui-box.css' => '3830ab21',
|
||||||
'rsrc/css/phui/phui-button.css' => 'a64a8de6',
|
'rsrc/css/phui/phui-button.css' => 'a64a8de6',
|
||||||
'rsrc/css/phui/phui-chart.css' => '6bf6f78e',
|
'rsrc/css/phui/phui-chart.css' => '6bf6f78e',
|
||||||
'rsrc/css/phui/phui-crumbs-view.css' => '79d536e5',
|
'rsrc/css/phui/phui-crumbs-view.css' => '79d536e5',
|
||||||
|
@ -803,7 +803,7 @@ return array(
|
||||||
'phui-action-panel-css' => '91c7b835',
|
'phui-action-panel-css' => '91c7b835',
|
||||||
'phui-badge-view-css' => 'f25c3476',
|
'phui-badge-view-css' => 'f25c3476',
|
||||||
'phui-big-info-view-css' => 'bd903741',
|
'phui-big-info-view-css' => 'bd903741',
|
||||||
'phui-box-css' => 'c9e01148',
|
'phui-box-css' => '3830ab21',
|
||||||
'phui-button-css' => 'a64a8de6',
|
'phui-button-css' => 'a64a8de6',
|
||||||
'phui-calendar-css' => 'ccabe893',
|
'phui-calendar-css' => 'ccabe893',
|
||||||
'phui-calendar-day-css' => 'd1cf6f93',
|
'phui-calendar-day-css' => 'd1cf6f93',
|
||||||
|
|
|
@ -45,7 +45,7 @@ final class PhabricatorOwnersDetailController
|
||||||
|
|
||||||
$actions = $this->buildPackageActionView($package);
|
$actions = $this->buildPackageActionView($package);
|
||||||
$properties = $this->buildPackagePropertyView($package, $field_list);
|
$properties = $this->buildPackagePropertyView($package, $field_list);
|
||||||
$properties->setActionList($actions);
|
$details = $this->buildPackageDetailView($package, $field_list);
|
||||||
|
|
||||||
if ($package->isArchived()) {
|
if ($package->isArchived()) {
|
||||||
$header_icon = 'fa-ban';
|
$header_icon = 'fa-ban';
|
||||||
|
@ -61,11 +61,8 @@ final class PhabricatorOwnersDetailController
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setHeader($package->getName())
|
->setHeader($package->getName())
|
||||||
->setStatus($header_icon, $header_color, $header_name)
|
->setStatus($header_icon, $header_color, $header_name)
|
||||||
->setPolicyObject($package);
|
->setPolicyObject($package)
|
||||||
|
->setHeaderIcon('fa-gift');
|
||||||
$panel = id(new PHUIObjectBoxView())
|
|
||||||
->setHeader($header)
|
|
||||||
->addPropertyList($properties);
|
|
||||||
|
|
||||||
$commit_views = array();
|
$commit_views = array();
|
||||||
|
|
||||||
|
@ -91,11 +88,13 @@ final class PhabricatorOwnersDetailController
|
||||||
|
|
||||||
$commit_views[] = array(
|
$commit_views[] = array(
|
||||||
'view' => $view,
|
'view' => $view,
|
||||||
'header' => pht('Commits in this Package that Need Attention'),
|
'header' => pht('Needs Attention'),
|
||||||
|
'icon' => 'fa-warning',
|
||||||
'button' => id(new PHUIButtonView())
|
'button' => id(new PHUIButtonView())
|
||||||
->setTag('a')
|
->setTag('a')
|
||||||
->setHref($commit_uri->alter('status', $status_concern))
|
->setHref($commit_uri->alter('status', $status_concern))
|
||||||
->setText(pht('View All Problem Commits')),
|
->setIcon('fa-list-ul')
|
||||||
|
->setText(pht('View All')),
|
||||||
);
|
);
|
||||||
|
|
||||||
$all_commits = id(new DiffusionCommitQuery())
|
$all_commits = id(new DiffusionCommitQuery())
|
||||||
|
@ -112,11 +111,13 @@ final class PhabricatorOwnersDetailController
|
||||||
|
|
||||||
$commit_views[] = array(
|
$commit_views[] = array(
|
||||||
'view' => $view,
|
'view' => $view,
|
||||||
'header' => pht('Recent Commits in Package'),
|
'header' => pht('Recent Commits'),
|
||||||
|
'icon' => 'fa-code',
|
||||||
'button' => id(new PHUIButtonView())
|
'button' => id(new PHUIButtonView())
|
||||||
->setTag('a')
|
->setTag('a')
|
||||||
->setHref($commit_uri)
|
->setHref($commit_uri)
|
||||||
->setText(pht('View All Package Commits')),
|
->setIcon('fa-list-ul')
|
||||||
|
->setText(pht('View All')),
|
||||||
);
|
);
|
||||||
|
|
||||||
$phids = array();
|
$phids = array();
|
||||||
|
@ -128,14 +129,16 @@ final class PhabricatorOwnersDetailController
|
||||||
|
|
||||||
$commit_panels = array();
|
$commit_panels = array();
|
||||||
foreach ($commit_views as $commit_view) {
|
foreach ($commit_views as $commit_view) {
|
||||||
$commit_panel = new PHUIObjectBoxView();
|
$commit_panel = id(new PHUIObjectBoxView())
|
||||||
$header = new PHUIHeaderView();
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY);
|
||||||
$header->setHeader($commit_view['header']);
|
$commit_header = id(new PHUIHeaderView())
|
||||||
|
->setHeader($commit_view['header'])
|
||||||
|
->setHeaderIcon($commit_view['icon']);
|
||||||
if (isset($commit_view['button'])) {
|
if (isset($commit_view['button'])) {
|
||||||
$header->addActionLink($commit_view['button']);
|
$commit_header->addActionLink($commit_view['button']);
|
||||||
}
|
}
|
||||||
$commit_view['view']->setHandles($handles);
|
$commit_view['view']->setHandles($handles);
|
||||||
$commit_panel->setHeader($header);
|
$commit_panel->setHeader($commit_header);
|
||||||
$commit_panel->appendChild($commit_view['view']);
|
$commit_panel->appendChild($commit_view['view']);
|
||||||
|
|
||||||
$commit_panels[] = $commit_panel;
|
$commit_panels[] = $commit_panel;
|
||||||
|
@ -143,32 +146,51 @@ final class PhabricatorOwnersDetailController
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb($package->getName());
|
$crumbs->addTextCrumb($package->getName());
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$timeline = $this->buildTransactionTimeline(
|
$timeline = $this->buildTransactionTimeline(
|
||||||
$package,
|
$package,
|
||||||
new PhabricatorOwnersPackageTransactionQuery());
|
new PhabricatorOwnersPackageTransactionQuery());
|
||||||
$timeline->setShouldTerminate(true);
|
$timeline->setShouldTerminate(true);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$view = id(new PHUITwoColumnView())
|
||||||
array(
|
->setHeader($header)
|
||||||
$crumbs,
|
->setMainColumn(array(
|
||||||
$panel,
|
|
||||||
$this->renderPathsTable($paths, $repositories),
|
$this->renderPathsTable($paths, $repositories),
|
||||||
$commit_panels,
|
$commit_panels,
|
||||||
$timeline,
|
$timeline,
|
||||||
),
|
))
|
||||||
array(
|
->addPropertySection(pht('Details'), $details)
|
||||||
'title' => $package->getName(),
|
->setPropertyList($properties)
|
||||||
|
->setActionList($actions);
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($package->getName())
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild(
|
||||||
|
array(
|
||||||
|
$view,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function buildPackagePropertyView(
|
private function buildPackagePropertyView(
|
||||||
PhabricatorOwnersPackage $package,
|
PhabricatorOwnersPackage $package,
|
||||||
PhabricatorCustomFieldList $field_list) {
|
PhabricatorCustomFieldList $field_list) {
|
||||||
|
|
||||||
$viewer = $this->getViewer();
|
$viewer = $this->getViewer();
|
||||||
|
$view = id(new PHUIPropertyListView())
|
||||||
|
->setUser($viewer)
|
||||||
|
->setObject($package);
|
||||||
|
$view->invokeWillRenderEvent();
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function buildPackageDetailView(
|
||||||
|
PhabricatorOwnersPackage $package,
|
||||||
|
PhabricatorCustomFieldList $field_list) {
|
||||||
|
|
||||||
|
$viewer = $this->getViewer();
|
||||||
$view = id(new PHUIPropertyListView())
|
$view = id(new PHUIPropertyListView())
|
||||||
->setUser($viewer);
|
->setUser($viewer);
|
||||||
|
|
||||||
|
@ -190,13 +212,10 @@ final class PhabricatorOwnersDetailController
|
||||||
$description = $package->getDescription();
|
$description = $package->getDescription();
|
||||||
if (strlen($description)) {
|
if (strlen($description)) {
|
||||||
$description = new PHUIRemarkupView($viewer, $description);
|
$description = new PHUIRemarkupView($viewer, $description);
|
||||||
$view->addSectionHeader(
|
$view->addSectionHeader(pht('Description'));
|
||||||
pht('Description'), PHUIPropertyListView::ICON_SUMMARY);
|
|
||||||
$view->addTextContent($description);
|
$view->addTextContent($description);
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->invokeWillRenderEvent();
|
|
||||||
|
|
||||||
$field_list->appendFieldsToPropertyList(
|
$field_list->appendFieldsToPropertyList(
|
||||||
$package,
|
$package,
|
||||||
$viewer,
|
$viewer,
|
||||||
|
@ -314,8 +333,13 @@ final class PhabricatorOwnersDetailController
|
||||||
'wide',
|
'wide',
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$header = id(new PHUIHeaderView())
|
||||||
|
->setHeader(pht('Paths'))
|
||||||
|
->setHeaderIcon('fa-folder-open');
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Paths'))
|
->setHeader($header)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setTable($table);
|
->setTable($table);
|
||||||
|
|
||||||
if ($info) {
|
if ($info) {
|
||||||
|
|
|
@ -66,6 +66,14 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.phui-box.phui-box-blue-property .phui-header-header {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phui-box.phui-box-blue-property .phui-header-header .phui-header-icon {
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
.phui-box.phui-box-blue-property .phui-header-action-link {
|
.phui-box.phui-box-blue-property .phui-header-action-link {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
Loading…
Reference in a new issue