Page MenuHomePhabricator

D13035.id31428.diff
No OneTemporary

D13035.id31428.diff

diff --git a/src/applications/search/controller/PhabricatorApplicationSearchController.php b/src/applications/search/controller/PhabricatorApplicationSearchController.php
--- a/src/applications/search/controller/PhabricatorApplicationSearchController.php
+++ b/src/applications/search/controller/PhabricatorApplicationSearchController.php
@@ -185,9 +185,25 @@
$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 @@
$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 @@
}
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

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 17, 10:49 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6721770
Default Alt Text
D13035.id31428.diff (1 KB)

Event Timeline