mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 04:20:55 +01:00
Update Differential edit pages to new UI
Summary: Updates using PHUITwoColumnView, new headers, etc. Test Plan: New Diff, Update Diff, View Standalone pages, Edit pages. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15549
This commit is contained in:
parent
0ea738f18f
commit
d9bb66f610
3 changed files with 50 additions and 29 deletions
|
@ -275,6 +275,7 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
||||||
->setRenderURI('/differential/changeset/')
|
->setRenderURI('/differential/changeset/')
|
||||||
->setDiff($diff)
|
->setDiff($diff)
|
||||||
->setTitle(pht('Standalone View'))
|
->setTitle(pht('Standalone View'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setParser($parser);
|
->setParser($parser);
|
||||||
|
|
||||||
if ($revision_id) {
|
if ($revision_id) {
|
||||||
|
@ -296,16 +297,20 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs->addTextCrumb($changeset->getDisplayFilename());
|
$crumbs->addTextCrumb($changeset->getDisplayFilename());
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader(pht('Changeset View'))
|
||||||
$crumbs,
|
->setHeaderIcon('fa-gear');
|
||||||
$detail,
|
|
||||||
),
|
$view = id(new PHUITwoColumnView())
|
||||||
array(
|
->setHeader($header)
|
||||||
'title' => pht('Changeset View'),
|
->setFooter($detail);
|
||||||
'device' => false,
|
|
||||||
));
|
return $this->newPage()
|
||||||
|
->setTitle(pht('Changeset View'))
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildRawFileResponse(
|
private function buildRawFileResponse(
|
||||||
|
|
|
@ -124,10 +124,12 @@ final class DifferentialDiffCreateController extends DifferentialController {
|
||||||
$title = pht('Update Diff');
|
$title = pht('Update Diff');
|
||||||
$header = pht('Update Diff');
|
$header = pht('Update Diff');
|
||||||
$button = pht('Continue');
|
$button = pht('Continue');
|
||||||
|
$header_icon = 'fa-upload';
|
||||||
} else {
|
} else {
|
||||||
$title = pht('Create Diff');
|
$title = pht('Create Diff');
|
||||||
$header = pht('Create New Diff');
|
$header = pht('Create New Diff');
|
||||||
$button = pht('Create Diff');
|
$button = pht('Create Diff');
|
||||||
|
$header_icon = 'fa-plus-square';
|
||||||
}
|
}
|
||||||
|
|
||||||
$form
|
$form
|
||||||
|
@ -180,15 +182,12 @@ final class DifferentialDiffCreateController extends DifferentialController {
|
||||||
->setValue($button));
|
->setValue($button));
|
||||||
|
|
||||||
$form_box = id(new PHUIObjectBoxView())
|
$form_box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText($header)
|
->setHeaderText(pht('Diff'))
|
||||||
->setValidationException($validation_exception)
|
->setValidationException($validation_exception)
|
||||||
->setForm($form)
|
->setForm($form)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setFormErrors($errors);
|
->setFormErrors($errors);
|
||||||
|
|
||||||
if ($info_view) {
|
|
||||||
$form_box->setInfoView($info_view);
|
|
||||||
}
|
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
if ($revision) {
|
if ($revision) {
|
||||||
$crumbs->addTextCrumb(
|
$crumbs->addTextCrumb(
|
||||||
|
@ -196,15 +195,23 @@ final class DifferentialDiffCreateController extends DifferentialController {
|
||||||
'/'.$revision->getMonogram());
|
'/'.$revision->getMonogram());
|
||||||
}
|
}
|
||||||
$crumbs->addTextCrumb($title);
|
$crumbs->addTextCrumb($title);
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader($title)
|
||||||
$crumbs,
|
->setHeaderIcon($header_icon);
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
|
$info_view,
|
||||||
$form_box,
|
$form_box,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,35 +171,44 @@ final class DifferentialRevisionEditController
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
if ($revision->getID()) {
|
if ($revision->getID()) {
|
||||||
if ($diff) {
|
if ($diff) {
|
||||||
|
$header_icon = 'fa-upload';
|
||||||
$title = pht('Update Differential Revision');
|
$title = pht('Update Differential Revision');
|
||||||
$crumbs->addTextCrumb(
|
$crumbs->addTextCrumb(
|
||||||
'D'.$revision->getID(),
|
'D'.$revision->getID(),
|
||||||
'/differential/diff/'.$diff->getID().'/');
|
'/differential/diff/'.$diff->getID().'/');
|
||||||
} else {
|
} else {
|
||||||
|
$header_icon = 'fa-pencil';
|
||||||
$title = pht('Edit Differential Revision');
|
$title = pht('Edit Differential Revision');
|
||||||
$crumbs->addTextCrumb(
|
$crumbs->addTextCrumb(
|
||||||
'D'.$revision->getID(),
|
'D'.$revision->getID(),
|
||||||
'/D'.$revision->getID());
|
'/D'.$revision->getID());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$header_icon = 'fa-plus-square';
|
||||||
$title = pht('Create New Differential Revision');
|
$title = pht('Create New Differential Revision');
|
||||||
}
|
}
|
||||||
|
|
||||||
$form_box = id(new PHUIObjectBoxView())
|
$form_box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText($title)
|
->setHeaderText('Revision')
|
||||||
->setValidationException($validation_exception)
|
->setValidationException($validation_exception)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setForm($form);
|
->setForm($form);
|
||||||
|
|
||||||
$crumbs->addTextCrumb($title);
|
$crumbs->addTextCrumb($title);
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader($title)
|
||||||
$crumbs,
|
->setHeaderIcon($header_icon);
|
||||||
$form_box,
|
|
||||||
),
|
$view = id(new PHUITwoColumnView())
|
||||||
array(
|
->setHeader($header)
|
||||||
'title' => $title,
|
->setFooter($form_box);
|
||||||
));
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue