1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Update Phriction Edit page to new UI

Summary: Updates document edit page

Test Plan: review

Reviewers: epriestley, amckinley

Reviewed By: epriestley

Spies: Korvin

Differential Revision: https://secure.phabricator.com/D18546
This commit is contained in:
Chad Little 2017-09-06 11:31:07 -07:00
parent faca1deea5
commit 2abbb59cb4

View file

@ -195,19 +195,15 @@ final class PhrictionEditController
} }
if ($document->getID()) { if ($document->getID()) {
$panel_header = pht('Edit Document: %s', $content->getTitle()); $page_title = pht('Edit Document: %s', $content->getTitle());
$page_title = pht('Edit Document');
$header_icon = 'fa-pencil';
if ($overwrite) { if ($overwrite) {
$submit_button = pht('Overwrite Changes'); $submit_button = pht('Overwrite Changes');
} else { } else {
$submit_button = pht('Save Changes'); $submit_button = pht('Save Changes');
} }
} else { } else {
$panel_header = pht('Create New Phriction Document');
$submit_button = pht('Create Document'); $submit_button = pht('Create Document');
$page_title = pht('Create Document'); $page_title = pht('Create Document');
$header_icon = 'fa-plus-square';
} }
$uri = $document->getSlug(); $uri = $document->getSlug();
@ -289,9 +285,9 @@ final class PhrictionEditController
->setValue($submit_button)); ->setValue($submit_button));
$form_box = id(new PHUIObjectBoxView()) $form_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Document')) ->setHeaderText($page_title)
->setValidationException($validation_exception) ->setValidationException($validation_exception)
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
->setForm($form); ->setForm($form);
$preview = id(new PHUIRemarkupPreviewPanel()) $preview = id(new PHUIRemarkupPreviewPanel())
@ -311,12 +307,7 @@ final class PhrictionEditController
} }
$crumbs->setBorder(true); $crumbs->setBorder(true);
$header = id(new PHUIHeaderView())
->setHeader($panel_header)
->setHeaderIcon($header_icon);
$view = id(new PHUITwoColumnView()) $view = id(new PHUITwoColumnView())
->setHeader($header)
->setFooter(array( ->setFooter(array(
$draft_note, $draft_note,
$form_box, $form_box,