diff options
author | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-11 18:14:25 +0000 |
---|---|---|
committer | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-11 18:14:25 +0000 |
commit | 982d56d370ba021e17a6e8548cdeb26345a89380 (patch) | |
tree | 893988fd1e5cfbbc71f54a0656a93ca3fc78361a /mod | |
parent | bdacb612f3fffa967ef6fda89c081fb7a59894d2 (diff) | |
download | elgg-982d56d370ba021e17a6e8548cdeb26345a89380.tar.gz elgg-982d56d370ba021e17a6e8548cdeb26345a89380.tar.bz2 |
Updated Search results UI.
git-svn-id: http://code.elgg.org/elgg/trunk@5367 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r-- | mod/search/views/default/search/comments/entity.php | 8 | ||||
-rw-r--r-- | mod/search/views/default/search/css.php | 110 | ||||
-rw-r--r-- | mod/search/views/default/search/entity.php | 17 | ||||
-rw-r--r-- | mod/search/views/default/search/listing.php | 2 |
4 files changed, 67 insertions, 70 deletions
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 - <div class="search_listing"> + <div class="search_listing clearfloat"> <div class="search_listing_icon">$icon</div> <div class="search_listing_info"> - <p class="ItemTitle">$title</p>$description - <p class="ItemTimestamp">$time</p> + <p class="entity_title">$title</p>$description + <p class="entity_subtext">$time</p> </div> </div> ___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 @@ +<?php +/** + * Elgg Search css + * + * @package search + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider Ltd <info@elgg.com> + * @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 = "<a href=\"$url\">$title</a>"; $tc = $entity->time_created; $tu = $entity->time_updated; $time = friendly_time(($tu > $tc) ? $tu : $tc); echo <<<___END - <div class="search_listing"> + <div class="search_listing clearfloat"> <div class="search_listing_icon">$icon</div> <div class="search_listing_info"> - <p class="ItemTitle">$title</p>$description - <p class="ItemTimestamp">$time $extra_info</p> + <p class="entity_title">$title</p>$description + <p class="entity_subtext">$time $extra_info</p> </div> </div> ___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 = "<div class='search_listing_category_title'>".elgg_view_title($type_str)."</div>"; foreach ($entities as $entity) { if ($view = search_get_search_view($vars['params'], 'entity')) { |