mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 01:10:58 +01:00
[Redesign] Add back Advanced Search
Summary: Ref T8099, I failed to test "Advanced Search" which disappeared during the last commit. Test Plan: Test built-in, saved, and advanced search filters. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T8099 Differential Revision: https://secure.phabricator.com/D13035
This commit is contained in:
parent
2dadf55892
commit
b24260b04a
1 changed files with 19 additions and 20 deletions
|
@ -185,9 +185,25 @@ final class PhabricatorApplicationSearchController
|
|||
$title = pht('Advanced Search');
|
||||
}
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title);
|
||||
|
||||
if ($run_query || $named_query) {
|
||||
$box->setShowHide(
|
||||
pht('Edit Query'),
|
||||
pht('Hide Query'),
|
||||
$form,
|
||||
$this->getApplicationURI('query/advanced/?query='.$query_key));
|
||||
} else {
|
||||
$box->setForm($form);
|
||||
}
|
||||
|
||||
$nav->appendChild($box);
|
||||
|
||||
if ($run_query) {
|
||||
$anchor = id(new PhabricatorAnchorView())
|
||||
->setAnchorName('R');
|
||||
$box->setAnchor(
|
||||
id(new PhabricatorAnchorView())
|
||||
->setAnchorName('R'));
|
||||
|
||||
try {
|
||||
$query = $engine->buildQueryFromSavedQuery($saved_query);
|
||||
|
@ -211,22 +227,11 @@ final class PhabricatorApplicationSearchController
|
|||
$saved_query);
|
||||
}
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($title)
|
||||
->setAnchor($anchor);
|
||||
|
||||
$box->setShowHide(
|
||||
pht('Edit Query'),
|
||||
pht('Hide Query'),
|
||||
$form,
|
||||
$this->getApplicationURI('query/advanced/?query='.$query_key));
|
||||
|
||||
if ($list instanceof AphrontTableView) {
|
||||
$box->setTable($list);
|
||||
} else {
|
||||
$box->setObjectList($list);
|
||||
}
|
||||
$nav->appendChild($box);
|
||||
|
||||
// TODO: This is a bit hacky.
|
||||
if ($list instanceof PHUIObjectItemListView) {
|
||||
|
@ -249,13 +254,7 @@ final class PhabricatorApplicationSearchController
|
|||
}
|
||||
|
||||
if ($errors) {
|
||||
$errors = id(new PHUIInfoView())
|
||||
->setTitle(pht('Query Errors'))
|
||||
->setErrors($errors);
|
||||
}
|
||||
|
||||
if ($errors) {
|
||||
$nav->appendChild($errors);
|
||||
$box->setFormErrors($errors, pht('Query Errors'));
|
||||
}
|
||||
|
||||
$crumbs = $parent
|
||||
|
|
Loading…
Reference in a new issue