diff --git a/src/applications/search/controller/PhabricatorApplicationSearchController.php b/src/applications/search/controller/PhabricatorApplicationSearchController.php index c4256e1e4e..da6fb051e8 100644 --- a/src/applications/search/controller/PhabricatorApplicationSearchController.php +++ b/src/applications/search/controller/PhabricatorApplicationSearchController.php @@ -193,7 +193,8 @@ final class PhabricatorApplicationSearchController pht('Edit Query'), pht('Hide Query'), $form, - $this->getApplicationURI('query/advanced/?query='.$query_key)); + $this->getApplicationURI('query/advanced/?query='.$query_key), + (!$named_query ? true : false)); } else { $box->setForm($form); } diff --git a/src/view/phui/PHUIObjectBoxView.php b/src/view/phui/PHUIObjectBoxView.php index c2ffb24f75..9648ab88fe 100644 --- a/src/view/phui/PHUIObjectBoxView.php +++ b/src/view/phui/PHUIObjectBoxView.php @@ -24,6 +24,7 @@ final class PHUIObjectBoxView extends AphrontView { private $hideAction; private $showHideHref; private $showHideContent; + private $showHideOpen; private $tabs = array(); private $propertyLists = array(); @@ -173,11 +174,12 @@ final class PHUIObjectBoxView extends AphrontView { return $this; } - public function setShowHide($show, $hide, $content, $href) { + public function setShowHide($show, $hide, $content, $href, $open = false) { $this->showAction = $show; $this->hideAction = $hide; $this->showHideContent = $content; $this->showHideHref = $href; + $this->showHideOpen = $open; return $this; } @@ -205,10 +207,13 @@ final class PHUIObjectBoxView extends AphrontView { $show_action_id = celerity_generate_unique_node_id(); $content_id = celerity_generate_unique_node_id(); + $hide_style = ($this->showHideOpen ? 'display: none;': null); + $show_style = ($this->showHideOpen ? null : 'display: none;'); $hide_action = id(new PHUIButtonView()) ->setTag('a') ->addSigil('reveal-content') ->setID($hide_action_id) + ->setStyle($hide_style) ->setHref($this->showHideHref) ->setMetaData( array( @@ -220,7 +225,7 @@ final class PHUIObjectBoxView extends AphrontView { $show_action = id(new PHUIButtonView()) ->setTag('a') ->addSigil('reveal-content') - ->setStyle('display: none;') + ->setStyle($show_style) ->setHref('#') ->setID($show_action_id) ->setMetaData( @@ -239,7 +244,7 @@ final class PHUIObjectBoxView extends AphrontView { array( 'class' => 'phui-object-box-hidden-content', 'id' => $content_id, - 'style' => 'display: none;', + 'style' => $show_style, ), $this->showHideContent), ); @@ -352,7 +357,7 @@ final class PHUIObjectBoxView extends AphrontView { $content = id(new PHUIBoxView()) ->appendChild( array( - $this->anchor, + ($this->showHideOpen == false ? $this->anchor : null), $header, $this->infoView, $this->formErrors, @@ -362,6 +367,7 @@ final class PHUIObjectBoxView extends AphrontView { $tabs, $tab_lists, $showhide, + ($this->showHideOpen == true ? $this->anchor : null), $property_lists, $this->table, $this->renderChildren(), diff --git a/webroot/rsrc/css/application/search/search-results.css b/webroot/rsrc/css/application/search/search-results.css index fd52cf995d..f02efe1315 100644 --- a/webroot/rsrc/css/application/search/search-results.css +++ b/webroot/rsrc/css/application/search/search-results.css @@ -4,6 +4,7 @@ .phui-object-item-link strong { color: {$fire}; + text-decoration: underline; } .phui-source-fragment { diff --git a/webroot/rsrc/css/phui/phui-header-view.css b/webroot/rsrc/css/phui/phui-header-view.css index 7950499b5d..0e83e78ee6 100644 --- a/webroot/rsrc/css/phui/phui-header-view.css +++ b/webroot/rsrc/css/phui/phui-header-view.css @@ -97,11 +97,6 @@ body .phui-header-shell.phui-bleed-header font-size: 13px; } -.device-phone .phui-object-box .phui-header-view .phui-header-action-links { - margin-right: 4px; - margin-top: -1px; -} - .device-phone .phui-header-action-link .phui-button-text { visibility: hidden; width: 0;