mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +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/')
|
||||
->setDiff($diff)
|
||||
->setTitle(pht('Standalone View'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setParser($parser);
|
||||
|
||||
if ($revision_id) {
|
||||
|
@ -296,16 +297,20 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
|||
}
|
||||
|
||||
$crumbs->addTextCrumb($changeset->getDisplayFilename());
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$detail,
|
||||
),
|
||||
array(
|
||||
'title' => pht('Changeset View'),
|
||||
'device' => false,
|
||||
));
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Changeset View'))
|
||||
->setHeaderIcon('fa-gear');
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter($detail);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(pht('Changeset View'))
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
private function buildRawFileResponse(
|
||||
|
|
|
@ -124,10 +124,12 @@ final class DifferentialDiffCreateController extends DifferentialController {
|
|||
$title = pht('Update Diff');
|
||||
$header = pht('Update Diff');
|
||||
$button = pht('Continue');
|
||||
$header_icon = 'fa-upload';
|
||||
} else {
|
||||
$title = pht('Create Diff');
|
||||
$header = pht('Create New Diff');
|
||||
$button = pht('Create Diff');
|
||||
$header_icon = 'fa-plus-square';
|
||||
}
|
||||
|
||||
$form
|
||||
|
@ -180,15 +182,12 @@ final class DifferentialDiffCreateController extends DifferentialController {
|
|||
->setValue($button));
|
||||
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($header)
|
||||
->setHeaderText(pht('Diff'))
|
||||
->setValidationException($validation_exception)
|
||||
->setForm($form)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setFormErrors($errors);
|
||||
|
||||
if ($info_view) {
|
||||
$form_box->setInfoView($info_view);
|
||||
}
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
if ($revision) {
|
||||
$crumbs->addTextCrumb(
|
||||
|
@ -196,15 +195,23 @@ final class DifferentialDiffCreateController extends DifferentialController {
|
|||
'/'.$revision->getMonogram());
|
||||
}
|
||||
$crumbs->addTextCrumb($title);
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon($header_icon);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter(array(
|
||||
$info_view,
|
||||
$form_box,
|
||||
),
|
||||
array(
|
||||
'title' => $title,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -171,35 +171,44 @@ final class DifferentialRevisionEditController
|
|||
$crumbs = $this->buildApplicationCrumbs();
|
||||
if ($revision->getID()) {
|
||||
if ($diff) {
|
||||
$header_icon = 'fa-upload';
|
||||
$title = pht('Update Differential Revision');
|
||||
$crumbs->addTextCrumb(
|
||||
'D'.$revision->getID(),
|
||||
'/differential/diff/'.$diff->getID().'/');
|
||||
} else {
|
||||
$header_icon = 'fa-pencil';
|
||||
$title = pht('Edit Differential Revision');
|
||||
$crumbs->addTextCrumb(
|
||||
'D'.$revision->getID(),
|
||||
'/D'.$revision->getID());
|
||||
}
|
||||
} else {
|
||||
$header_icon = 'fa-plus-square';
|
||||
$title = pht('Create New Differential Revision');
|
||||
}
|
||||
|
||||
$form_box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
->setHeaderText('Revision')
|
||||
->setValidationException($validation_exception)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setForm($form);
|
||||
|
||||
$crumbs->addTextCrumb($title);
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$form_box,
|
||||
),
|
||||
array(
|
||||
'title' => $title,
|
||||
));
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($title)
|
||||
->setHeaderIcon($header_icon);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setFooter($form_box);
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue