diff --git a/app/views/albums/index.html.haml b/app/views/albums/index.html.haml
index 0d68bb1c1..4b76d38e1 100644
--- a/app/views/albums/index.html.haml
+++ b/app/views/albums/index.html.haml
@@ -8,9 +8,6 @@
$("#add_album_button").fancybox();
});
-= content_for :page_title do
- = link_to "◂ #{t('.home')}", aspects_path, :aspect => params[:aspect]
-
- content_for :left_pane do
= render "shared/aspect_friends"
@@ -31,6 +28,3 @@
#pagination
= will_paginate @albums
-#content_bottom
- .back
- = link_to "⇧ #{t('.home')}", root_path
diff --git a/app/views/aspects/_empty_messages.haml b/app/views/aspects/_empty_messages.haml
new file mode 100644
index 000000000..734ee5b12
--- /dev/null
+++ b/app/views/aspects/_empty_messages.haml
@@ -0,0 +1,20 @@
+-# Copyright (c) 2010, Diaspora Inc. This file is
+-# licensed under the Affero General Public License version 3 or later. See
+-# the COPYRIGHT file.
+
+#no_posts.empty_message{:style => ("display:none" unless @posts.count == 0)}
+ .null_arrow ⇧
+ %h3=t('.start_talking')
+
+#no_friends.empty_message{:style => ("display:none" unless @friends.count == 0)}
+
+ - if (@aspect == :all) || (@aspect == :public)
+ %h3=t('.nobody')
+ %h4= link_to t('.add_friend'), aspects_manage_path
+ %h4= link_to t('.invite'), aspects_manage_path
+ - else
+ %h3=t('.nobody_in_aspect', :aspect_name => @aspect.name)
+ %h4= link_to t('.add_friend_to', :aspect_name => @aspect.name), "#add_request_pane", :class => "add_request_button"
+ %h4= link_to t('.invite', :aspect_name => @aspect.name), "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => t('.invite')
+
+
diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml
index 4935531d6..95c6c2dc4 100644
--- a/app/views/aspects/index.html.haml
+++ b/app/views/aspects/index.html.haml
@@ -2,18 +2,18 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
-- content_for :page_title do
- = link_to t('.photos'), albums_path(:aspect => @aspect)
-
- content_for :left_pane do
= render "shared/aspect_friends"
- content_for :publish do
= render "shared/publisher", :aspect_ids => :all, :broadcast => true
+= render 'aspects/empty_messages'
+
%ul#stream
- for post in @posts
= render type_partial(post), :post => post unless post.class == Album
+
#pagination
= will_paginate @posts
diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml
index 772a71971..d2cd9c04c 100644
--- a/app/views/aspects/show.html.haml
+++ b/app/views/aspects/show.html.haml
@@ -2,18 +2,18 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
-- content_for :page_title do
- = link_to t('.photos'), albums_path(:aspect => @aspect)
-
- content_for :left_pane do
= render "shared/aspect_friends"
- content_for :publish do
= render "shared/publisher", :aspect_ids => :all
+= render 'aspects/empty_messages'
+
%ul#stream
- for post in @posts
= render type_partial(post), :post => post unless post.class == Album
+
#pagination
= will_paginate @posts
diff --git a/app/views/js/_websocket_js.haml b/app/views/js/_websocket_js.haml
index a0663edfc..9bf801e0a 100644
--- a/app/views/js/_websocket_js.haml
+++ b/app/views/js/_websocket_js.haml
@@ -37,9 +37,10 @@
});
function processRetraction(post_id){
- $('#' + post_id ).fadeOut(500, function(){
- $(this).remove;
- });
+ $('#' + post_id ).fadeOut(500).remove();
+ if($("#stream")[0].childElementCount == 0){
+ $("#no_posts").fadeIn(200);
+ }
}
function processComment(post_id, html){
@@ -59,14 +60,23 @@
function processPost(className, html, aspectIds){
if(onPageForAspects(aspectIds)){
- $("#stream").prepend(
- $(html).fadeIn("fast", function(){
- $("#stream label:first").inFieldLabels();
- })
- );
+ var addPostToStream = function (html){
+ $("#stream").prepend(
+ $(html).fadeIn("fast", function(){
+ $("#stream label:first").inFieldLabels();
+ })
+ )
+ };
+
+ if( $("#no_posts").is(":visible") ){
+ $("#no_posts").fadeOut(400, addPostToStream(html)).hide();
+ } else {
+ addPostToStream(html);
+ }
}
}
+
function processPhotoInAlbum(photoHash){
if (location.href.indexOf(photoHash['album_id']) == -1){
return ;
diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml
index a37068577..508cabbb4 100644
--- a/app/views/shared/_aspect_friends.haml
+++ b/app/views/shared/_aspect_friends.haml
@@ -2,30 +2,41 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
-#friend_pictures
- = owner_image_link
- - for friend in @friends
- = person_image_link(friend)
- - if @logged_in && (@aspect == :public)
- %h3 Facebook Friends
- - @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends")
- - @fb_friends[:data].each do |friend|
- = image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" )
- -unless (@aspect == :all) || (@aspect == :public)
- = link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button'
- .yo{:style => 'display:none'}
- #add_request_pane
- = render "requests/new_request", :aspect => @aspect
- -else
- .clear
- %br
- = link_to t('.add_friends'), aspects_manage_path
+#left_pane
+ #friend_pictures
+ = owner_image_link
+ - for friend in @friends
+ = person_image_link(friend)
+ - if @logged_in && (@aspect == :public)
+ %h3 Facebook Friends
+ - @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends")
+ - @fb_friends[:data].each do |friend|
+ = image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" )
+ -unless (@aspect == :all) || (@aspect == :public)
+ = link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button'
+
+ .yo{:style => 'display:none'}
+ #add_request_pane
+ = render "requests/new_request", :aspect => @aspect
+ -else
+ .clear
+ %br
+ = link_to t('.add_friends'), aspects_manage_path
+
+ %br
+ %br
+ %ul
+ %li= link_to 'stream', aspect_path(@aspect)
+ %li= link_to t('.photos'), albums_path(:aspect => @aspect)
+
+ %br
+
+ %h4 Invites
+ = link_to "Invite a friend!", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend"
+ %br
+ = "You have #{@invites} invites."
+ .yo{ :style => "display:none;"}
+ #invite_user_pane
+ = render "invitations/new"
-%br
-= link_to "Invite a friend!", "#invite_user_pane", :id => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend"
-%br
-= "You have #{@invites} invites."
-.yo{ :style => "display:none;"}
- #invite_user_pane
- = render "invitations/new"
diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml
index 1dd33bb3f..f80a24733 100644
--- a/config/locales/diaspora/en.yml
+++ b/config/locales/diaspora/en.yml
@@ -38,6 +38,7 @@ en:
share: "Share"
aspect_friends:
add_friends: "add friends"
+ photos: "photos"
albums:
album:
you: "you"
@@ -69,10 +70,13 @@ en:
friends_albums: "Friends Albums"
your_albums: "Your Albums"
aspects:
- index:
- photos: "photos"
- show:
- photos: "photos"
+ empty_messages:
+ start_talking: "Nobody has said anything yet. Get the conversation started!"
+ nobody: "We know you have friends, bring them to Diaspora!"
+ nobody_in_aspect: "Your aspect '%{aspect_name}' is empty."
+ add_friend: "Add a friend"
+ add_friend_to: "Add a someone to %{aspect_name}"
+ invite: "Invite a someone to join Diaspora!"
manage:
add_a_new_aspect: "Add a new aspect"
add_a_new_friend: "Add a new friend"
diff --git a/public/javascripts/view.js b/public/javascripts/view.js
index eec063bcd..f79cace4d 100644
--- a/public/javascripts/view.js
+++ b/public/javascripts/view.js
@@ -27,8 +27,8 @@ $(document).ready(function(){
//buttons//////
$("#add_aspect_button").fancybox({ 'titleShow' : false });
- $("#add_request_button").fancybox({ 'titleShow': false });
- $("#invite_user_button").fancybox({ 'titleShow': false });
+ $(".add_request_button").fancybox({ 'titleShow': false });
+ $(".invite_user_button").fancybox({ 'titleShow': false });
$(".add_request_button").fancybox({ 'titleShow': false });
$("input[type='submit']").addClass("button");
diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass
index 0b8368b6b..f1b8bee94 100644
--- a/public/stylesheets/sass/application.sass
+++ b/public/stylesheets/sass/application.sass
@@ -964,3 +964,48 @@ ul#settings_nav
#aspect_list
:margin 0
:padding 0
+
+#left_pane
+ ul
+ :margin 0
+ :padding 0
+ :list
+ :style none
+ li a
+ :display block
+ :padding 3px
+ :border
+ :bottom 1px solid #ccc
+
+ &:hover
+ &:after
+ :content " ►"
+
+.empty_message
+ :margin
+ :top 12px
+ :bottom 12px
+ :text
+ :align center
+
+ :color #777
+ h3
+ :color #777
+
+ :margin
+ :left 70px
+ :padding 2em
+ :bottom 0.7em
+
+ :width 520px
+
+ :border 2px dashed #777
+ :border-radius 5px
+
+ .null_arrow
+ :margin
+ :top -14px
+ :font
+ :size 80px
+ :display inline-block
+