mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-29 00:40:57 +01:00
Minor search ui updates
Summary: Wanted to clean this up a little to make Deedy's diff hopefully easier. Removes some unneeded CSS, and Deedy's should remove more with object list. Test Plan: Search for people, documents, tasks, etc. Test mobile and desktop layouts Reviewers: epriestley, DeedyDas Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5880
This commit is contained in:
parent
961c2c0108
commit
bdfed87a60
3 changed files with 21 additions and 15 deletions
|
@ -3306,7 +3306,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'phabricator-search-results-css' =>
|
'phabricator-search-results-css' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/f8a86e27/rsrc/css/application/search/search-results.css',
|
'uri' => '/res/9b749d7d/rsrc/css/application/search/search-results.css',
|
||||||
'type' => 'css',
|
'type' => 'css',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -143,6 +143,7 @@ final class PhabricatorSearchController
|
||||||
$search_form
|
$search_form
|
||||||
->setUser($user)
|
->setUser($user)
|
||||||
->setAction('/search/')
|
->setAction('/search/')
|
||||||
|
->setNoShading(true)
|
||||||
->appendChild(
|
->appendChild(
|
||||||
phutil_tag(
|
phutil_tag(
|
||||||
'input',
|
'input',
|
||||||
|
@ -198,8 +199,7 @@ final class PhabricatorSearchController
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->setValue('Search'));
|
->setValue('Search'));
|
||||||
|
|
||||||
$search_panel = new AphrontPanelView();
|
$search_panel = new AphrontListFilterView();
|
||||||
$search_panel->setHeader('Search Phabricator');
|
|
||||||
$search_panel->appendChild($search_form);
|
$search_panel->appendChild($search_form);
|
||||||
|
|
||||||
require_celerity_resource('phabricator-search-results-css');
|
require_celerity_resource('phabricator-search-results-css');
|
||||||
|
@ -241,6 +241,7 @@ final class PhabricatorSearchController
|
||||||
->setObject(idx($objects, $phid));
|
->setObject(idx($objects, $phid));
|
||||||
$results[] = $view->render();
|
$results[] = $view->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
$results = hsprintf(
|
$results = hsprintf(
|
||||||
'<div class="phabricator-search-result-list">'.
|
'<div class="phabricator-search-result-list">'.
|
||||||
'%s'.
|
'%s'.
|
||||||
|
@ -254,17 +255,26 @@ final class PhabricatorSearchController
|
||||||
'<p class="phabricator-search-no-results">No search results.</p>'.
|
'<p class="phabricator-search-no-results">No search results.</p>'.
|
||||||
'</div>');
|
'</div>');
|
||||||
}
|
}
|
||||||
|
$results = id(new PHUIBoxView())
|
||||||
|
->addMargin(PHUI::MARGIN_LARGE)
|
||||||
|
->addPadding(PHUI::PADDING_LARGE)
|
||||||
|
->setShadow(true)
|
||||||
|
->appendChild($results)
|
||||||
|
->addClass('phabricator-search-result-box');
|
||||||
} else {
|
} else {
|
||||||
$results = null;
|
$results = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->buildStandardPageResponse(
|
|
||||||
|
return $this->buildApplicationPage(
|
||||||
array(
|
array(
|
||||||
$search_panel,
|
$search_panel,
|
||||||
$results,
|
$results,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'title' => 'Search Results',
|
'title' => pht('Search Results'),
|
||||||
|
'device' => true,
|
||||||
|
'dust' => true,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,29 +2,25 @@
|
||||||
* @provides phabricator-search-results-css
|
* @provides phabricator-search-results-css
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.phabricator-search-result-list {
|
|
||||||
padding: 1em 3em 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.phabricator-search-result {
|
.phabricator-search-result {
|
||||||
margin: 4px 0 16px;
|
margin: 4px 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.device-phone .phabricator-search-result-box .phui-box {
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
.phabricator-search-result .result-image {
|
.phabricator-search-result .result-image {
|
||||||
position: relative;
|
position: relative;
|
||||||
float: left;
|
float: left;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
margin-right: 10px;
|
||||||
|
|
||||||
.phabricator-search-result .result-desc {
|
|
||||||
margin-left: 58px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.phabricator-search-result .result-type {
|
.phabricator-search-result .result-type {
|
||||||
color: #888888;
|
|
||||||
font-size: 11px;
|
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phabricator-search-result .result-name {
|
.phabricator-search-result .result-name {
|
||||||
|
|
Loading…
Reference in a new issue