From 0621aa2f6c9b5ea74c002a5f318aa3e9d7ac4813 Mon Sep 17 00:00:00 2001 From: danielvincent <danielgrippi@gmail.com> Date: Tue, 19 Oct 2010 12:28:54 -0700 Subject: [PATCH] fixed no friends/posts message positioning --- .../{_empty_messages.haml => _no_friends_message.haml} | 6 ------ app/views/aspects/_no_posts_message.haml | 8 ++++++++ app/views/aspects/index.html.haml | 5 +++-- app/views/aspects/show.html.haml | 5 +++-- config/locales/diaspora/en.yml | 5 +++-- 5 files changed, 17 insertions(+), 12 deletions(-) rename app/views/aspects/{_empty_messages.haml => _no_friends_message.haml} (86%) create mode 100644 app/views/aspects/_no_posts_message.haml diff --git a/app/views/aspects/_empty_messages.haml b/app/views/aspects/_no_friends_message.haml similarity index 86% rename from app/views/aspects/_empty_messages.haml rename to app/views/aspects/_no_friends_message.haml index 734ee5b124..eb450cf99e 100644 --- a/app/views/aspects/_empty_messages.haml +++ b/app/views/aspects/_no_friends_message.haml @@ -2,12 +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)} - .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 @@ -17,4 +12,3 @@ %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 new file mode 100644 index 0000000000..c555ab0cdb --- /dev/null +++ b/app/views/aspects/_no_posts_message.haml @@ -0,0 +1,8 @@ +-# 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') + diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index e61aa4d42e..8ffe1a5199 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -6,8 +6,9 @@ = render "shared/aspect_friends" .span-15.last - = render 'aspects/empty_messages' - = render "shared/publisher" + = render 'aspects/no_friends_message' + = render 'shared/publisher' + = render 'aspects/no_posts_message' %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index e61aa4d42e..8ffe1a5199 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -6,8 +6,9 @@ = render "shared/aspect_friends" .span-15.last - = render 'aspects/empty_messages' - = render "shared/publisher" + = render 'aspects/no_friends_message' + = render 'shared/publisher' + = render 'aspects/no_posts_message' %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 2b4aff4c4a..45d80437a7 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -79,13 +79,14 @@ en: friends_albums: "Friends Albums" your_albums: "Your Albums" aspects: - empty_messages: - start_talking: "Nobody has said anything yet. Get the conversation started!" + no_friends_message: 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 someone to %{aspect_name}" invite: "Invite someone to join Diaspora!" + no_posts_message: + start_talking: "Nobody has said anything yet. Get the conversation started!" manage: add_a_new_aspect: "Add a new aspect" add_a_new_friend: "Add a new friend" -- GitLab