From 982d56d370ba021e17a6e8548cdeb26345a89380 Mon Sep 17 00:00:00 2001 From: pete Date: Thu, 11 Mar 2010 18:14:25 +0000 Subject: Updated Search results UI. git-svn-id: http://code.elgg.org/elgg/trunk@5367 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/search/comments/entity.php | 8 +- mod/search/views/default/search/css.php | 110 ++++++++++----------- mod/search/views/default/search/entity.php | 17 ++-- mod/search/views/default/search/listing.php | 2 +- 4 files changed, 67 insertions(+), 70 deletions(-) (limited to 'mod/search') diff --git a/mod/search/views/default/search/comments/entity.php b/mod/search/views/default/search/comments/entity.php index 8b4d286c9..3bfd01033 100644 --- a/mod/search/views/default/search/comments/entity.php +++ b/mod/search/views/default/search/comments/entity.php @@ -12,7 +12,7 @@ $entity = $vars['entity']; $owner = get_entity($entity->getVolatileData('search_matched_comment_owner_guid')); if ($owner instanceof ElggUser) { - $icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'small')); + $icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny')); } else { $icon = ''; } @@ -47,11 +47,11 @@ $tc = $entity->getVolatileData('search_matched_comment_time_created');; $time = friendly_time($tc); echo <<<___END -
+
$icon
-

$title

$description -

$time

+

$title

$description +

$time

___END; diff --git a/mod/search/views/default/search/css.php b/mod/search/views/default/search/css.php index fdc402199..85c7a44d8 100644 --- a/mod/search/views/default/search/css.php +++ b/mod/search/views/default/search/css.php @@ -1,3 +1,45 @@ + + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + */ +?> + +.search_listing { + background:none; + border-bottom:1px dotted #CCCCCC; + clear:both; + display:block; + margin:0; + padding:5px 0 7px; + position:relative; +} +.search_listing_icon { + float:left; + margin-left:3px; + margin-top:3px; +} +.search_listing_icon .avatar_menu_button img { + width: 15px; + margin:0; +} +.search_listing_info { + float:left; + margin-left:7px; + min-height:28px; + width:693px; +} +.search_listing_info p { + margin:0; +} + + +/* search matches */ .searchtype { background: #FFFACD; color: black; @@ -12,79 +54,29 @@ margin-bottom: 2em; } .searchMatch { - background-color: #FFFF66; + background-color: #bbdaf7; } .searchMatchColor1 { - background-color: #FFFF66; + background-color: #bbdaf7; } .searchMatchColor2 { background-color: #A0FFFF; } .searchMatchColor3 { - background-color: #FF9999; + background-color: #FDFFC3; } .searchMatchColor4 { - background-color: #FF66FF; + background-color: #cccccc; } .searchMatchColor5 { - background-color: #99FF99; + background-color: #4690d6; } .searchTitle { text-decoration: underline; } -#searchform input.search_input { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - background-color:#FFFFFF; - border:1px solid #BBBBBB; - color:#999999; - font-size:12px; - font-weight:bold; - margin:0pt; - padding:2px; - width:180px; - height:12px; -} -#searchform input.search_submit_button { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - color:#333333; - background: #cccccc; - border:none; - font-size:12px; - font-weight:bold; - margin:0px; - padding:2px; - width:auto; - height:18px; - cursor:pointer; -} -#searchform input.search_submit_button:hover { - color:#ffffff; - background: #4690d6; -} -/* -.search_listing { - display: block; - -webkit-border-radius: 8px; - -moz-border-radius: 8px; - background:white; - margin:0 10px 5px 10px; - padding:5px; +.search_listing_category_title { + margin-top:20px; } - -.entity_gallery_item .search_listing { - background: none; - text-align: center; +.search_listing.more { + display: block; } -*/ - -/* override the entity container piece -.search_listing .search_listing { - -webkit-border-radius: 0px; - -moz-border-radius: 0px; - background: transparent; - margin: 0; - padding: 0; -} -*/ diff --git a/mod/search/views/default/search/entity.php b/mod/search/views/default/search/entity.php index 92f6aa41d..2b08384d5 100644 --- a/mod/search/views/default/search/entity.php +++ b/mod/search/views/default/search/entity.php @@ -14,16 +14,16 @@ $entity = $vars['entity']; // @todo allow an option to switch to displaying the entity's icon instead. $type = $entity->getType(); if ($type == 'user' || $type == 'group') { - $icon = elgg_view('profile/icon', array('entity' => $entity, 'size' => 'small')); + $icon = elgg_view('profile/icon', array('entity' => $entity, 'size' => 'tiny')); } elseif ($owner = $entity->getOwnerEntity()) { - $icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'small')); + $icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny')); } else { // display a generic icon if no owner, though there will probably be // other problems if the owner can't be found. $icon = elgg_view( 'graphics/icon', array( 'entity' => $entity, - 'size' => 'small', + 'size' => 'tiny', )); } @@ -31,17 +31,22 @@ $title = $entity->getVolatileData('search_matched_title'); $description = $entity->getVolatileData('search_matched_description'); $extra_info = $entity->getVolatileData('search_matched_extra'); $url = $entity->getURL(); + +if (!$title) { + $title = elgg_echo('untitled'); +} + $title = "$title"; $tc = $entity->time_created; $tu = $entity->time_updated; $time = friendly_time(($tu > $tc) ? $tu : $tc); echo <<<___END -
+
$icon
-

$title

$description -

$time $extra_info

+

$title

$description +

$time $extra_info

___END; diff --git a/mod/search/views/default/search/listing.php b/mod/search/views/default/search/listing.php index 8825b7e8d..28a40f62f 100644 --- a/mod/search/views/default/search/listing.php +++ b/mod/search/views/default/search/listing.php @@ -92,7 +92,7 @@ if ($more) { $more_link = ''; } -$body = elgg_view_title($type_str); +$body = "
".elgg_view_title($type_str)."
"; foreach ($entities as $entity) { if ($view = search_get_search_view($vars['params'], 'entity')) { -- cgit v1.2.3