mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-09 19:04:48 +01:00
Update Search edit page for new UI
Summary: Updates to use new UI Test Plan: Save a custom query, edit a custom query Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15618
This commit is contained in:
parent
f2a38f52d7
commit
4761dba0cd
1 changed files with 18 additions and 9 deletions
|
@ -73,26 +73,35 @@ final class PhabricatorSearchEditController
|
||||||
|
|
||||||
if ($named_query->getID()) {
|
if ($named_query->getID()) {
|
||||||
$title = pht('Edit Saved Query');
|
$title = pht('Edit Saved Query');
|
||||||
|
$header_icon = 'fa-pencil';
|
||||||
} else {
|
} else {
|
||||||
$title = pht('Save Query');
|
$title = pht('Save Query');
|
||||||
|
$header_icon = 'fa-search';
|
||||||
}
|
}
|
||||||
|
|
||||||
$form_box = id(new PHUIObjectBoxView())
|
$form_box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText($title)
|
->setHeaderText(pht('Query'))
|
||||||
->setFormErrors($errors)
|
->setFormErrors($errors)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setForm($form);
|
->setForm($form);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb($title);
|
$crumbs->addTextCrumb($title);
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
|
$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);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
|
||||||
array(
|
|
||||||
$crumbs,
|
|
||||||
$form_box,
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue