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(
|
||||
'names' => array(
|
||||
'core.pkg.css' => '3d58b25a',
|
||||
'core.pkg.css' => 'd3b3a609',
|
||||
'core.pkg.js' => '7d8faf57',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => '2de124c9',
|
||||
|
@ -123,7 +123,7 @@ return array(
|
|||
'rsrc/css/phui/phui-action-panel.css' => '91c7b835',
|
||||
'rsrc/css/phui/phui-badge.css' => 'f25c3476',
|
||||
'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-chart.css' => '6bf6f78e',
|
||||
'rsrc/css/phui/phui-crumbs-view.css' => '79d536e5',
|
||||
|
@ -803,7 +803,7 @@ return array(
|
|||
'phui-action-panel-css' => '91c7b835',
|
||||
'phui-badge-view-css' => 'f25c3476',
|
||||
'phui-big-info-view-css' => 'bd903741',
|
||||
'phui-box-css' => 'c9e01148',
|
||||
'phui-box-css' => '3830ab21',
|
||||
'phui-button-css' => 'a64a8de6',
|
||||
'phui-calendar-css' => 'ccabe893',
|
||||
'phui-calendar-day-css' => 'd1cf6f93',
|
||||
|
|
|
@ -45,7 +45,7 @@ final class PhabricatorOwnersDetailController
|
|||
|
||||
$actions = $this->buildPackageActionView($package);
|
||||
$properties = $this->buildPackagePropertyView($package, $field_list);
|
||||
$properties->setActionList($actions);
|
||||
$details = $this->buildPackageDetailView($package, $field_list);
|
||||
|
||||
if ($package->isArchived()) {
|
||||
$header_icon = 'fa-ban';
|
||||
|
@ -61,11 +61,8 @@ final class PhabricatorOwnersDetailController
|
|||
->setUser($viewer)
|
||||
->setHeader($package->getName())
|
||||
->setStatus($header_icon, $header_color, $header_name)
|
||||
->setPolicyObject($package);
|
||||
|
||||
$panel = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->addPropertyList($properties);
|
||||
->setPolicyObject($package)
|
||||
->setHeaderIcon('fa-gift');
|
||||
|
||||
$commit_views = array();
|
||||
|
||||
|
@ -91,11 +88,13 @@ final class PhabricatorOwnersDetailController
|
|||
|
||||
$commit_views[] = array(
|
||||
'view' => $view,
|
||||
'header' => pht('Commits in this Package that Need Attention'),
|
||||
'header' => pht('Needs Attention'),
|
||||
'icon' => 'fa-warning',
|
||||
'button' => id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->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())
|
||||
|
@ -112,11 +111,13 @@ final class PhabricatorOwnersDetailController
|
|||
|
||||
$commit_views[] = array(
|
||||
'view' => $view,
|
||||
'header' => pht('Recent Commits in Package'),
|
||||
'header' => pht('Recent Commits'),
|
||||
'icon' => 'fa-code',
|
||||
'button' => id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setHref($commit_uri)
|
||||
->setText(pht('View All Package Commits')),
|
||||
->setIcon('fa-list-ul')
|
||||
->setText(pht('View All')),
|
||||
);
|
||||
|
||||
$phids = array();
|
||||
|
@ -128,14 +129,16 @@ final class PhabricatorOwnersDetailController
|
|||
|
||||
$commit_panels = array();
|
||||
foreach ($commit_views as $commit_view) {
|
||||
$commit_panel = new PHUIObjectBoxView();
|
||||
$header = new PHUIHeaderView();
|
||||
$header->setHeader($commit_view['header']);
|
||||
$commit_panel = id(new PHUIObjectBoxView())
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY);
|
||||
$commit_header = id(new PHUIHeaderView())
|
||||
->setHeader($commit_view['header'])
|
||||
->setHeaderIcon($commit_view['icon']);
|
||||
if (isset($commit_view['button'])) {
|
||||
$header->addActionLink($commit_view['button']);
|
||||
$commit_header->addActionLink($commit_view['button']);
|
||||
}
|
||||
$commit_view['view']->setHandles($handles);
|
||||
$commit_panel->setHeader($header);
|
||||
$commit_panel->setHeader($commit_header);
|
||||
$commit_panel->appendChild($commit_view['view']);
|
||||
|
||||
$commit_panels[] = $commit_panel;
|
||||
|
@ -143,32 +146,51 @@ final class PhabricatorOwnersDetailController
|
|||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb($package->getName());
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$timeline = $this->buildTransactionTimeline(
|
||||
$package,
|
||||
new PhabricatorOwnersPackageTransactionQuery());
|
||||
$timeline->setShouldTerminate(true);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$panel,
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setMainColumn(array(
|
||||
$this->renderPathsTable($paths, $repositories),
|
||||
$commit_panels,
|
||||
$timeline,
|
||||
),
|
||||
))
|
||||
->addPropertySection(pht('Details'), $details)
|
||||
->setPropertyList($properties)
|
||||
->setActionList($actions);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($package->getName())
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild(
|
||||
array(
|
||||
'title' => $package->getName(),
|
||||
$view,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
private function buildPackagePropertyView(
|
||||
PhabricatorOwnersPackage $package,
|
||||
PhabricatorCustomFieldList $field_list) {
|
||||
|
||||
$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())
|
||||
->setUser($viewer);
|
||||
|
||||
|
@ -190,13 +212,10 @@ final class PhabricatorOwnersDetailController
|
|||
$description = $package->getDescription();
|
||||
if (strlen($description)) {
|
||||
$description = new PHUIRemarkupView($viewer, $description);
|
||||
$view->addSectionHeader(
|
||||
pht('Description'), PHUIPropertyListView::ICON_SUMMARY);
|
||||
$view->addSectionHeader(pht('Description'));
|
||||
$view->addTextContent($description);
|
||||
}
|
||||
|
||||
$view->invokeWillRenderEvent();
|
||||
|
||||
$field_list->appendFieldsToPropertyList(
|
||||
$package,
|
||||
$viewer,
|
||||
|
@ -314,8 +333,13 @@ final class PhabricatorOwnersDetailController
|
|||
'wide',
|
||||
));
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Paths'))
|
||||
->setHeaderIcon('fa-folder-open');
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Paths'))
|
||||
->setHeader($header)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setTable($table);
|
||||
|
||||
if ($info) {
|
||||
|
|
|
@ -66,6 +66,14 @@
|
|||
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 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
|
|
Loading…
Reference in a new issue