mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 07:12:41 +01:00
Update Macro Edit for new UI
Summary: Updates Edit/Create page for Macro to new headers Test Plan: Create Macro, Edit Macro Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15568
This commit is contained in:
parent
1f107b8fe0
commit
399b23d630
1 changed files with 21 additions and 9 deletions
|
@ -233,16 +233,19 @@ final class PhabricatorMacroEditController extends PhabricatorMacroController {
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
|
||||||
if ($macro->getID()) {
|
if ($macro->getID()) {
|
||||||
$title = pht('Edit Image Macro');
|
$title = pht('Edit Macro: %s', $macro->getName());
|
||||||
$crumb = pht('Edit Macro');
|
$crumb = pht('Edit Macro');
|
||||||
|
$header_icon = 'fa-pencil';
|
||||||
|
|
||||||
$crumbs->addTextCrumb(pht('Macro "%s"', $macro->getName()), $view_uri);
|
$crumbs->addTextCrumb(pht('Macro: %s', $macro->getName()), $view_uri);
|
||||||
} else {
|
} else {
|
||||||
$title = pht('Create Image Macro');
|
$title = pht('Create Image Macro');
|
||||||
$crumb = pht('Create Macro');
|
$crumb = pht('Create Macro');
|
||||||
|
$header_icon = 'fa-plus-square';
|
||||||
}
|
}
|
||||||
|
|
||||||
$crumbs->addTextCrumb($crumb, $request->getRequestURI());
|
$crumbs->addTextCrumb($crumb, $request->getRequestURI());
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$upload = null;
|
$upload = null;
|
||||||
if ($macro->getID()) {
|
if ($macro->getID()) {
|
||||||
|
@ -267,23 +270,32 @@ final class PhabricatorMacroEditController extends PhabricatorMacroController {
|
||||||
|
|
||||||
$upload = id(new PHUIObjectBoxView())
|
$upload = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Upload New File'))
|
->setHeaderText(pht('Upload New File'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setForm($upload_form);
|
->setForm($upload_form);
|
||||||
}
|
}
|
||||||
|
|
||||||
$form_box = id(new PHUIObjectBoxView())
|
$form_box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText($title)
|
->setHeaderText(pht('Macro'))
|
||||||
->setFormErrors($errors)
|
->setFormErrors($errors)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setForm($form);
|
->setForm($form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader($title)
|
||||||
$crumbs,
|
->setHeaderIcon($header_icon);
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
$form_box,
|
$form_box,
|
||||||
$upload,
|
$upload,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue