From 32a0f60a2f0bd4cc1e51b2541fd3bab1c6cfd5b2 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 14:38:19 -0700 Subject: [PATCH 1/7] moved photos link to the side bar for now --- app/views/albums/index.html.haml | 6 --- app/views/aspects/index.html.haml | 3 -- app/views/aspects/show.html.haml | 3 -- app/views/shared/_aspect_friends.haml | 61 ++++++++++++++---------- config/locales/diaspora/en.yml | 5 +- public/stylesheets/application.css | 17 +++++-- public/stylesheets/sass/application.sass | 16 +++++++ 7 files changed, 67 insertions(+), 44 deletions(-) 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/index.html.haml b/app/views/aspects/index.html.haml index 4935531d6..24860b668 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -2,9 +2,6 @@ -# 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" diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 772a71971..1cd12d0a4 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -2,9 +2,6 @@ -# 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" diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml index a37068577..dc0b991d3 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", :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" -%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..221c4e034 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,6 @@ en: friends_albums: "Friends Albums" your_albums: "Your Albums" aspects: - index: - photos: "photos" - show: - photos: "photos" manage: add_a_new_aspect: "Add a new aspect" add_a_new_friend: "Add a new friend" diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 0a5e462e8..172c6a68e 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -90,7 +90,7 @@ header { padding-top: 5px; border-bottom: 1px solid #cccccc; } header a { - color: #999999; } + color: #cccccc; } header a:hover { background: none; color: #eeeeee; } @@ -564,10 +564,10 @@ h1.big_text { line-height: 22px; padding: 3px 8px; padding-bottom: 3px; - color: #999999; } + color: #cccccc; } #aspect_nav ul > li a:hover { background-color: #4e4e4e; - color: #cccccc; } + color: #eeeeee; } #aspect_nav ul > li.selected a { -webkit-border-radius: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; @@ -742,3 +742,14 @@ ul#settings_nav { #aspect_list { margin: 0; padding: 0; } + +#left_pane ul { + margin: 0; + padding: 0; + list-style: none; } + #left_pane ul li a { + display: block; + padding: 3px; + border-bottom: 1px solid #cccccc; } + #left_pane ul li a:hover:after { + content: " ►"; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 0b8368b6b..dba3e4812 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -964,3 +964,19 @@ 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 " ►" From 5722f85c85afa42a4e7926c13a32059adf69371b Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 15:00:47 -0700 Subject: [PATCH 2/7] message in aspect if stream is empty --- app/views/aspects/show.html.haml | 5 +++++ public/stylesheets/application.css | 16 ++++++++++++++++ public/stylesheets/sass/application.sass | 24 ++++++++++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 1cd12d0a4..5f8354803 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -11,6 +11,11 @@ %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album +- if @posts.size == 0 + .empty_message + .null_arrow ⇧ + %h3 Nobody has said anything yet. Get the conversation started! + #pagination = will_paginate @posts diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 172c6a68e..e4c94610a 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -753,3 +753,19 @@ ul#settings_nav { border-bottom: 1px solid #cccccc; } #left_pane ul li a:hover:after { content: " ►"; } + +.empty_message { + margin-top: 12px; + text-align: center; + color: #777777; + margin-left: 70px; + padding: 1em; + padding-top: 0; + width: 80%; + border: 2px dashed #777777; + border-radius: 5px; } + .empty_message h3 { + color: #777777; } + .empty_message .null_arrow { + font-size: 80px; + display: inline-block; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index dba3e4812..072ba8fad 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -980,3 +980,27 @@ ul#settings_nav &:hover &:after :content " ►" + +.empty_message + :margin + :top 12px + :text + :align center + + :color #777 + h3 + :color #777 + + :margin + :left 70px + :padding 1em + :top 0 + :width 80% + :border 2px dashed #777 + :border-radius 5px + + .null_arrow + :font + :size 80px + :display inline-block + From cf2a4c25ae808e6289468a67ec11239bcd9b2186 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 15:19:37 -0700 Subject: [PATCH 3/7] DG RS; remove empty message from stream upon adding something --- app/views/aspects/show.html.haml | 2 +- app/views/js/_websocket_js.haml | 19 ++++++++++++++----- public/stylesheets/application.css | 6 +++--- public/stylesheets/sass/application.sass | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 5f8354803..e50c53602 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -12,7 +12,7 @@ - for post in @posts = render type_partial(post), :post => post unless post.class == Album - if @posts.size == 0 - .empty_message + #empty_message .null_arrow ⇧ %h3 Nobody has said anything yet. Get the conversation started! diff --git a/app/views/js/_websocket_js.haml b/app/views/js/_websocket_js.haml index a0663edfc..27f7942e0 100644 --- a/app/views/js/_websocket_js.haml +++ b/app/views/js/_websocket_js.haml @@ -59,14 +59,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( $("#empty_message").length > 0 ){ + $("#empty_message").fadeOut(400, addPostToStream(html)).remove(); + } else { + addPostToStream(html); + } } } + function processPhotoInAlbum(photoHash){ if (location.href.indexOf(photoHash['album_id']) == -1){ return ; diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index e4c94610a..7bb190bb6 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -754,7 +754,7 @@ ul#settings_nav { #left_pane ul li a:hover:after { content: " ►"; } -.empty_message { +#empty_message { margin-top: 12px; text-align: center; color: #777777; @@ -764,8 +764,8 @@ ul#settings_nav { width: 80%; border: 2px dashed #777777; border-radius: 5px; } - .empty_message h3 { + #empty_message h3 { color: #777777; } - .empty_message .null_arrow { + #empty_message .null_arrow { font-size: 80px; display: inline-block; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 072ba8fad..dfc6662c6 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -981,7 +981,7 @@ ul#settings_nav &:after :content " ►" -.empty_message +#empty_message :margin :top 12px :text From 8daf2d0fd518d6a65f9399646f2916a064399b51 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 15:23:15 -0700 Subject: [PATCH 4/7] add none message to aspect#index --- app/views/aspects/index.html.haml | 6 ++++++ app/views/aspects/show.html.haml | 1 + 2 files changed, 7 insertions(+) diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 24860b668..25ba89081 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -11,6 +11,12 @@ %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album + +- if @posts.size == 0 + #empty_message + .null_arrow ⇧ + %h3 Nobody has said anything yet. Get the conversation started! + #pagination = will_paginate @posts diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index e50c53602..441508e8f 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -11,6 +11,7 @@ %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album + - if @posts.size == 0 #empty_message .null_arrow ⇧ From 750b4b43886d9b818f7b72411e6a054023894410 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 15:40:34 -0700 Subject: [PATCH 5/7] empty message re-appears if all stream posts are deleted --- app/views/aspects/index.html.haml | 7 +++---- app/views/aspects/show.html.haml | 7 +++---- app/views/js/_websocket_js.haml | 11 ++++++----- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 25ba89081..23b1763e9 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -12,10 +12,9 @@ - for post in @posts = render type_partial(post), :post => post unless post.class == Album -- if @posts.size == 0 - #empty_message - .null_arrow ⇧ - %h3 Nobody has said anything yet. Get the conversation started! +#empty_message{:style => ("display:none" unless @posts.count == 0)} + .null_arrow ⇧ + %h3 Nobody has said anything yet. Get the conversation started! #pagination = will_paginate @posts diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 441508e8f..4e112155c 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -12,10 +12,9 @@ - for post in @posts = render type_partial(post), :post => post unless post.class == Album -- if @posts.size == 0 - #empty_message - .null_arrow ⇧ - %h3 Nobody has said anything yet. Get the conversation started! +#empty_message{:style => ("display:none" unless @posts.count == 0)} + .null_arrow ⇧ + %h3 Nobody has said anything yet. Get the conversation started! #pagination = will_paginate @posts diff --git a/app/views/js/_websocket_js.haml b/app/views/js/_websocket_js.haml index 27f7942e0..addd0b053 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){ + $("#empty_message").fadeIn(200); + } } function processComment(post_id, html){ @@ -67,8 +68,8 @@ ) }; - if( $("#empty_message").length > 0 ){ - $("#empty_message").fadeOut(400, addPostToStream(html)).remove(); + if( $("#empty_message").is(":visible") ){ + $("#empty_message").fadeOut(400, addPostToStream(html)).hide(); } else { addPostToStream(html); } From 45d7d54c66e502a84dd3865fade341a53a8cc8ce Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 14 Oct 2010 16:23:29 -0700 Subject: [PATCH 6/7] added an empty message for the case of an aspect with no friends --- app/views/aspects/_empty_messages.haml | 18 ++++++++++++++++++ app/views/aspects/index.html.haml | 6 ++---- app/views/aspects/show.html.haml | 6 ++---- app/views/js/_websocket_js.haml | 6 +++--- app/views/shared/_aspect_friends.haml | 2 +- public/javascripts/view.js | 4 ++-- public/stylesheets/application.css | 16 +++++++++------- public/stylesheets/sass/application.sass | 15 ++++++++++----- 8 files changed, 47 insertions(+), 26 deletions(-) create mode 100644 app/views/aspects/_empty_messages.haml diff --git a/app/views/aspects/_empty_messages.haml b/app/views/aspects/_empty_messages.haml new file mode 100644 index 000000000..28b97fab1 --- /dev/null +++ b/app/views/aspects/_empty_messages.haml @@ -0,0 +1,18 @@ +-# 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 Nobody has said anything yet. Get the conversation started! + +#no_friends.empty_message{:style => ("display:none" unless @friends.count == 0)} + %h3 You have no friends in this aspect. + + - unless (@aspect == :all) || (@aspect == :public) + %h4= link_to "Add a friend", "#add_request_pane", :class => "add_request_button" + - else + %h4= link_to "Add a friend", aspects_manage_path + + %h4= link_to "Invite a friend to join Diaspora!", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" + diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 23b1763e9..95c6c2dc4 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -8,14 +8,12 @@ - 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 -#empty_message{:style => ("display:none" unless @posts.count == 0)} - .null_arrow ⇧ - %h3 Nobody has said anything yet. Get the conversation started! - #pagination = will_paginate @posts diff --git a/app/views/aspects/show.html.haml b/app/views/aspects/show.html.haml index 4e112155c..d2cd9c04c 100644 --- a/app/views/aspects/show.html.haml +++ b/app/views/aspects/show.html.haml @@ -8,14 +8,12 @@ - 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 -#empty_message{:style => ("display:none" unless @posts.count == 0)} - .null_arrow ⇧ - %h3 Nobody has said anything yet. Get the conversation started! - #pagination = will_paginate @posts diff --git a/app/views/js/_websocket_js.haml b/app/views/js/_websocket_js.haml index addd0b053..9bf801e0a 100644 --- a/app/views/js/_websocket_js.haml +++ b/app/views/js/_websocket_js.haml @@ -39,7 +39,7 @@ function processRetraction(post_id){ $('#' + post_id ).fadeOut(500).remove(); if($("#stream")[0].childElementCount == 0){ - $("#empty_message").fadeIn(200); + $("#no_posts").fadeIn(200); } } @@ -68,8 +68,8 @@ ) }; - if( $("#empty_message").is(":visible") ){ - $("#empty_message").fadeOut(400, addPostToStream(html)).hide(); + if( $("#no_posts").is(":visible") ){ + $("#no_posts").fadeOut(400, addPostToStream(html)).hide(); } else { addPostToStream(html); } diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml index dc0b991d3..508cabbb4 100644 --- a/app/views/shared/_aspect_friends.haml +++ b/app/views/shared/_aspect_friends.haml @@ -33,7 +33,7 @@ %br %h4 Invites - = link_to "Invite a friend!", "#invite_user_pane", :id => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" + = 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;"} 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/application.css b/public/stylesheets/application.css index 7bb190bb6..2cf862f1a 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -752,20 +752,22 @@ ul#settings_nav { padding: 3px; border-bottom: 1px solid #cccccc; } #left_pane ul li a:hover:after { - content: " ►"; } + content: " ►"; } -#empty_message { +.empty_message { margin-top: 12px; + margin-bottom: 12px; text-align: center; color: #777777; margin-left: 70px; - padding: 1em; - padding-top: 0; - width: 80%; + padding: 2em; + padding-bottom: 0.7em; + width: 520px; border: 2px dashed #777777; border-radius: 5px; } - #empty_message h3 { + .empty_message h3 { color: #777777; } - #empty_message .null_arrow { + .empty_message .null_arrow { + margin-top: -14px; font-size: 80px; display: inline-block; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index dfc6662c6..f1b8bee94 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -979,11 +979,12 @@ ul#settings_nav &:hover &:after - :content " ►" + :content " ►" -#empty_message +.empty_message :margin :top 12px + :bottom 12px :text :align center @@ -993,13 +994,17 @@ ul#settings_nav :margin :left 70px - :padding 1em - :top 0 - :width 80% + :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 From 08e629668dfdf6474b042f7a76a65027047347c4 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 14 Oct 2010 16:55:00 -0700 Subject: [PATCH 7/7] I18ning empty_messages --- app/views/aspects/_empty_messages.haml | 14 ++++++++------ config/locales/diaspora/en.yml | 7 +++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/views/aspects/_empty_messages.haml b/app/views/aspects/_empty_messages.haml index 28b97fab1..734ee5b12 100644 --- a/app/views/aspects/_empty_messages.haml +++ b/app/views/aspects/_empty_messages.haml @@ -4,15 +4,17 @@ #no_posts.empty_message{:style => ("display:none" unless @posts.count == 0)} .null_arrow ⇧ - %h3 Nobody has said anything yet. Get the conversation started! + %h3=t('.start_talking') #no_friends.empty_message{:style => ("display:none" unless @friends.count == 0)} - %h3 You have no friends in this aspect. - - unless (@aspect == :all) || (@aspect == :public) - %h4= link_to "Add a friend", "#add_request_pane", :class => "add_request_button" + - 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 - %h4= link_to "Add a friend", aspects_manage_path + %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') - %h4= link_to "Invite a friend to join Diaspora!", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 221c4e034..f80a24733 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -70,6 +70,13 @@ en: friends_albums: "Friends Albums" your_albums: "Your Albums" aspects: + 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"