]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Updated Search results UI.
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 11 Mar 2010 18:14:25 +0000 (18:14 +0000)
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 11 Mar 2010 18:14:25 +0000 (18:14 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@5367 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/search/views/default/search/comments/entity.php
mod/search/views/default/search/css.php
mod/search/views/default/search/entity.php
mod/search/views/default/search/listing.php
views/default/css.php
views/default/entities/gallery_listing.php

index 8b4d286c962bcb9c74905c8690a384ee7083876b..3bfd010335366d73c266005e0b43b1e86599876c 100644 (file)
@@ -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;
index fdc40219927a751aaff4c51c4cc647182ed9fba3..85c7a44d82f2beb1cc8afb10c9d56cf7ffb630b8 100644 (file)
@@ -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;
        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;
-}
-*/
index 92f6aa41d17052e8fb5e8313ec1e7c1e0c379a82..2b08384d5ddb342f53cc413a6b0ba80d176f059c 100644 (file)
@@ -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;
index 8825b7e8d29089b7e28964ed5fdcabe1c454dbe5..28a40f62f8ad6ef6c75e4b8960f7a045dfdda1e8 100644 (file)
@@ -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')) {
index e1b9e4902c1c7bfffa30cf86e81701f22b346d74..f2a3bfc08726ef9343fbea93eb50d455c80b7716 100644 (file)
@@ -1498,6 +1498,7 @@ a.action_button:focus {
 .admin_settings.users_online  p.owner_timestamp {
        padding-left:3px;
 }
+/*
 .admin_users_online .search_listing {
        margin:0 0 5px 0;
        padding:5px;
@@ -1505,6 +1506,7 @@ a.action_button:focus {
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
 }
+*/
 .admin_plugin_reorder {
        float:right;
        width:200px;
index 66f88f2be467c38a8856f7cd0fa595a15cdc5b2e..fbc6a1a3c575873feb90935afea3e2fcda9b6d9a 100644 (file)
@@ -10,9 +10,9 @@
 
 ?>
 
-<div class="search_listing">
+<div class="search_listing todo">
 
-       <div class="search_listing_header">
+       <div class="search_listing_header todo">
 
                        <?php
 
@@ -21,7 +21,7 @@
                        ?>
 
        </div>
-       <div class="search_listing_info">
+       <div class="search_listing_info todo">
                <?php
 
                        echo $vars['info'];