From ecfcc96f8e8af870f41752c4c0e28c86a229e2e0 Mon Sep 17 00:00:00 2001 From: danielvincent <danielgrippi@gmail.com> Date: Fri, 5 Nov 2010 21:14:00 -0700 Subject: [PATCH] Post a message to aspect dialog will only display if people are present. --- app/views/aspects/_no_friends_message.haml | 10 +++++----- app/views/aspects/_no_posts_message.haml | 2 +- app/views/aspects/index.html.haml | 4 ++-- app/views/aspects/show.html.haml | 4 ++-- public/stylesheets/sass/application.sass | 11 +---------- 5 files changed, 11 insertions(+), 20 deletions(-) diff --git a/app/views/aspects/_no_friends_message.haml b/app/views/aspects/_no_friends_message.haml index eb450cf99e..a36d8bab7c 100644 --- a/app/views/aspects/_no_friends_message.haml +++ b/app/views/aspects/_no_friends_message.haml @@ -2,13 +2,13 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -#no_friends.empty_message{:style => ("display:none" unless @friends.count == 0)} - - if (@aspect == :all) || (@aspect == :public) +#no_friends.floating.empty_message{:style => ("display:none" unless friend_count == 0)} + - if aspect == :all %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') + %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/_no_posts_message.haml b/app/views/aspects/_no_posts_message.haml index c555ab0cdb..b6334a18e3 100644 --- a/app/views/aspects/_no_posts_message.haml +++ b/app/views/aspects/_no_posts_message.haml @@ -2,7 +2,7 @@ -# 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)} +#no_posts.floating.empty_message{:style => ("display:none" unless post_count == 0 && friend_count > 0)} .null_arrow ⇧ %h3=t('.start_talking') diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index c104d752cd..e4b7c07ed9 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -6,9 +6,9 @@ = render 'shared/aspect_friends', :people => @friends, :aspect => @aspect .span-15.last - = render 'aspects/no_friends_message' + = render 'aspects/no_friends_message', :aspect => @aspect, :friend_count => @friends.count = render 'shared/publisher', :aspect => @aspect - = render 'aspects/no_posts_message' + = render 'aspects/no_posts_message', :post_count => @posts.count, :friend_count => @friends.count %ul#stream - for post in @posts = render 'shared/stream_element', :post => post diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index c104d752cd..e4b7c07ed9 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -6,9 +6,9 @@ = render 'shared/aspect_friends', :people => @friends, :aspect => @aspect .span-15.last - = render 'aspects/no_friends_message' + = render 'aspects/no_friends_message', :aspect => @aspect, :friend_count => @friends.count = render 'shared/publisher', :aspect => @aspect - = render 'aspects/no_posts_message' + = render 'aspects/no_posts_message', :post_count => @posts.count, :friend_count => @friends.count %ul#stream - for post in @posts = render 'shared/stream_element', :post => post diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index ee965d9de5..eddc0a4835 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -1192,25 +1192,16 @@ ul#settings_nav &:after :content " ►" -.empty_message +.floating.empty_message :margin :bottom 24px :text :align center - :color #777 - h3 - :color #777 :padding 2em :bottom 0.7em - :border 2px dashed #FAC421 - - :-webkit-border-radius 5px - :-moz-border-radius 5px - :border-radius 5px - .null_arrow :margin :top -14px -- GitLab