Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13966973
D13035.id31428.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13035.id31428.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D13035: [Redesign] Add back Advanced Search
Attached
Detach File
Event Timeline
Log In to Comment