From 6daf7f5ad9f5acc0cf0be5fe76ed0f5e85ea23ec Mon Sep 17 00:00:00 2001
From: danielgrippi <danielgrippi@gmail.com>
Date: Mon, 1 Aug 2011 15:31:13 -0700
Subject: [PATCH] add prompt to add more contacts if user has less than 2
 contacts on aspect index

---
 app/views/aspects/_aspect_stream.haml    |  5 +++--
 app/views/aspects/_no_posts_message.haml | 14 ++++++--------
 config/locales/diaspora/en.yml           |  2 +-
 public/stylesheets/sass/application.sass | 24 ++++++------------------
 4 files changed, 16 insertions(+), 29 deletions(-)

diff --git a/app/views/aspects/_aspect_stream.haml b/app/views/aspects/_aspect_stream.haml
index 3994a06a4f..83d5a1938e 100644
--- a/app/views/aspects/_aspect_stream.haml
+++ b/app/views/aspects/_aspect_stream.haml
@@ -19,9 +19,10 @@
 = render 'shared/publisher', :aspect => aspect, :aspect_ids => aspect_ids
 
 #main_stream.stream{:data => {:guids => aspect_ids.join(',')}}
+  - if current_user.contacts.size < 2
+    = render 'aspects/no_posts_message'
+
   - if posts.length > 0
     = render 'shared/stream', :posts => posts
     #pagination
       =link_to(t('more'), next_page_path, :class => 'paginate')
-  - else
-    = render 'aspects/no_posts_message', :post_count => posts.length
diff --git a/app/views/aspects/_no_posts_message.haml b/app/views/aspects/_no_posts_message.haml
index c31e6a7cc8..051f2f94e5 100644
--- a/app/views/aspects/_no_posts_message.haml
+++ b/app/views/aspects/_no_posts_message.haml
@@ -2,12 +2,10 @@
 -#   licensed under the Affero General Public License version 3 or later.  See
 -#   the COPYRIGHT file.
 
-#no_posts.empty_message{:class => ("hidden" unless post_count == 0)}
-  %h4{:style => "text-align:center;"}
-    = t('.you_have_no_contacts')
-    %br
-    %br
-    = t('.try_adding_some_more_contacts')
-    != t('.or_featured', :link => link_to(t(".featured_users") , featured_users_path))
-  
+#no_contacts.empty_message
+  = t('.you_should_add_some_more_contacts')
+  %br
+  %br
+  = t('.try_adding_some_more_contacts')
+  != t('.or_featured', :link => link_to(t(".featured_users") , featured_users_path))
 
diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml
index 33c6c105d0..19be36ad85 100644
--- a/config/locales/diaspora/en.yml
+++ b/config/locales/diaspora/en.yml
@@ -111,7 +111,7 @@ en:
       edit_aspect: "edit aspect"
     no_posts_message:
       start_talking: "Nobody has said anything yet!"
-      you_have_no_contacts: "You haven't added any contacts yet!"
+      you_should_add_some_more_contacts: "You should add some more contacts!"
       try_adding_some_more_contacts: "You can search (top) or invite (right) more contacts."
       or_featured:  "Or you can share with %{link}"
       featured_users: "featured users"
diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass
index b64c543c77..9582691fc7 100644
--- a/public/stylesheets/sass/application.sass
+++ b/public/stylesheets/sass/application.sass
@@ -1339,22 +1339,6 @@ ul#settings_nav
   a
     :color #69AEDD
 
-.floating.empty_message
-  :margin
-    :bottom 24px
-  :text
-    :align center
-
-  :padding 2em
-    :bottom 0.7em
-
-  .null_arrow
-    :margin
-      :top -14px
-    :font
-      :size 80px
-    :display inline-block
-
 h1,h2,h3,h4
   .description
     :font
@@ -3061,8 +3045,12 @@ ul.left_nav
     :display inline-block
   :text-align right
 
-#no_posts
-  :padding 20px
+#no_contacts
+  :text-align center
+  :padding 10px
+  :background
+    :color #eee
+  :color #666
 
 .left
   :position absolute
-- 
GitLab