1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +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:
Chad Little 2013-05-09 13:30:22 -07:00
parent 961c2c0108
commit bdfed87a60
3 changed files with 21 additions and 15 deletions

View file

@ -3306,7 +3306,7 @@ celerity_register_resource_map(array(
),
'phabricator-search-results-css' =>
array(
'uri' => '/res/f8a86e27/rsrc/css/application/search/search-results.css',
'uri' => '/res/9b749d7d/rsrc/css/application/search/search-results.css',
'type' => 'css',
'requires' =>
array(

View file

@ -143,6 +143,7 @@ final class PhabricatorSearchController
$search_form
->setUser($user)
->setAction('/search/')
->setNoShading(true)
->appendChild(
phutil_tag(
'input',
@ -198,8 +199,7 @@ final class PhabricatorSearchController
id(new AphrontFormSubmitControl())
->setValue('Search'));
$search_panel = new AphrontPanelView();
$search_panel->setHeader('Search Phabricator');
$search_panel = new AphrontListFilterView();
$search_panel->appendChild($search_form);
require_celerity_resource('phabricator-search-results-css');
@ -241,6 +241,7 @@ final class PhabricatorSearchController
->setObject(idx($objects, $phid));
$results[] = $view->render();
}
$results = hsprintf(
'<div class="phabricator-search-result-list">'.
'%s'.
@ -254,17 +255,26 @@ final class PhabricatorSearchController
'<p class="phabricator-search-no-results">No search results.</p>'.
'</div>');
}
$results = id(new PHUIBoxView())
->addMargin(PHUI::MARGIN_LARGE)
->addPadding(PHUI::PADDING_LARGE)
->setShadow(true)
->appendChild($results)
->addClass('phabricator-search-result-box');
} else {
$results = null;
}
return $this->buildStandardPageResponse(
return $this->buildApplicationPage(
array(
$search_panel,
$results,
),
array(
'title' => 'Search Results',
'title' => pht('Search Results'),
'device' => true,
'dust' => true,
));
}

View file

@ -2,29 +2,25 @@
* @provides phabricator-search-results-css
*/
.phabricator-search-result-list {
padding: 1em 3em 2em;
}
.phabricator-search-result {
margin: 4px 0 16px;
}
.device-phone .phabricator-search-result-box .phui-box {
margin: 20px 0;
}
.phabricator-search-result .result-image {
position: relative;
float: left;
width: 50px;
height: 50px;
}
.phabricator-search-result .result-desc {
margin-left: 58px;
margin-right: 10px;
}
.phabricator-search-result .result-type {
color: #888888;
font-size: 11px;
margin-top: 4px;
word-break: break-word;
}
.phabricator-search-result .result-name {