diff --git a/app/views/aspect_memberships/_aspect_dropdown.html.haml b/app/views/aspect_memberships/_aspect_dropdown.html.haml index e24b11bb0..1b4b56b91 100644 --- a/app/views/aspect_memberships/_aspect_dropdown.html.haml +++ b/app/views/aspect_memberships/_aspect_dropdown.html.haml @@ -3,8 +3,11 @@ -# the COPYRIGHT file. .dropdown{:class => "hang_#{hang}"} - .button.toggle - = t('.toggle', :count => contact.aspects.size) + .button.toggle{:class => ("in_aspects" if contact.aspects.size > 0)} + - if contact.aspects.size == 1 + = contact.aspects.first.name + - else + = t('.toggle', :count => contact.aspects.size) ▼ .wrapper diff --git a/app/views/people/_profile_sidebar.html.haml b/app/views/people/_profile_sidebar.html.haml index b021e0210..048d331d5 100644 --- a/app/views/people/_profile_sidebar.html.haml +++ b/app/views/people/_profile_sidebar.html.haml @@ -11,11 +11,12 @@ %p = link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path - - - if person != current_user.person - %hr{:style=>"width:300px;"} - %br - = render 'aspect_memberships/aspect_dropdown', :contact => @contact, :person => @person, :hang => 'left' + - else + - if @contact && @contact.receiving? + %br + = link_to t('people.show.mention'), new_status_message_path(:person_id => @person.id), :class => 'button', :rel => 'facebox' + - if @contact.mutual? + = link_to t('people.show.message'), new_conversation_path(:contact_id => @contact.id, :name => @contact.person.name), :class => 'button', :rel => 'facebox' %br %br -if contact.sharing? || person == current_user.person diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index c822793fe..af6f3f652 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -25,16 +25,15 @@ .span-15.last #author_info - - if user_signed_in? && @contact && @contact.receiving? + - if user_signed_in? && current_user.person != @person .right - = link_to t('.mention'), new_status_message_path(:person_id => @person.id), :class => 'button', :rel => 'facebox' - - if @contact.mutual? - = link_to t('.message'), new_conversation_path(:contact_id => @contact.id, :name => @contact.person.name), :class => 'button', :rel => 'facebox' + = render 'aspect_memberships/aspect_dropdown', :contact => @contact, :person => @person, :hang => 'left' %h3 = @person.name - %span.diaspora_handle - = @person.diaspora_handle + %span.diaspora_handle + = @person.diaspora_handle + .description - if !@person.profile.tag_string.blank? && user_signed_in? && (@contact.persisted? || @person == current_user.person || @incoming_request) = @person.profile.format_tags(@person.profile.tag_string) diff --git a/features/connects_users.feature b/features/connects_users.feature index fa581b7bb..43a0710e0 100644 --- a/features/connects_users.feature +++ b/features/connects_users.feature @@ -91,7 +91,7 @@ Feature: sending and receiving requests When I sign in as "bob@bob.bob" And I am on "alice@alice.alice"'s page - Then I should see "In 1 aspect" + Then I should see "Besties" Then I should see "Mention" Then I should not see "Message" diff --git a/features/tags.feature b/features/tags.feature index cd0f23d4f..546778e07 100644 --- a/features/tags.feature +++ b/features/tags.feature @@ -18,4 +18,4 @@ Feature: Interacting with tags When I add the person to my 1st aspect When I search for "#rockstar" - Then I should see "In 1 aspect" + Then I should see "generic" diff --git a/public/javascripts/contact-edit.js b/public/javascripts/contact-edit.js index 101beac87..68a235492 100644 --- a/public/javascripts/contact-edit.js +++ b/public/javascripts/contact-edit.js @@ -12,14 +12,16 @@ var ContactEdit = { updateNumber: function(personId){ var dropdown = $(".dropdown_list[data-person_id=" + personId.toString() +"]"), number = dropdown.find(".selected").length, - element = dropdown.parents(".dropdown").children('.button.toggle'); + button = dropdown.parents(".dropdown").children('.button.toggle'); var replacement; if (number == 0) { - replacement = Diaspora.widgets.i18n.t("aspect_dropdown.toggle.zero") ; + button.removeClass("in_aspects"); + replacement = Diaspora.widgets.i18n.t("aspect_dropdown.toggle.zero"); }else if (number == 1) { - replacement = Diaspora.widgets.i18n.t('aspect_dropdown.toggle.one', { count: number.toString()}) + button.addClass("in_aspects"); + replacement = dropdown.find(".selected").first().text(); }else if (number < 3) { replacement = Diaspora.widgets.i18n.t('aspect_dropdown.toggle.few', { count: number.toString()}) }else if (number > 3) { @@ -29,7 +31,7 @@ var ContactEdit = { replacement = Diaspora.widgets.i18n.t('aspect_dropdown.toggle.other', { count: number.toString()}) } - element.html(replacement + ' ▼'); + button.html(replacement + ' ▼'); }, toggleCheckbox: diff --git a/public/stylesheets/sass/_mixins.scss b/public/stylesheets/sass/_mixins.scss index 5691082bf..3877d0689 100644 --- a/public/stylesheets/sass/_mixins.scss +++ b/public/stylesheets/sass/_mixins.scss @@ -1,6 +1,6 @@ $blue: #3f8fba; $red: red; -$background: rgb(252, 252, 252); +$background: #fff; $speed: 0.1s; $easing: linear; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index d01f58e0f..4d8696c41 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -38,9 +38,6 @@ h4 h1 :color #111 -h3 - :color #777 - ul > li :list-style none @@ -329,7 +326,7 @@ ul.dropdown #author_info :position relative - img + .avatar img :position relative :top 0px :display inline-block @@ -349,6 +346,7 @@ ul.dropdown :display inline-block :margin :bottom 10px + :right 10px &.show a @@ -2798,9 +2796,7 @@ h1.tag :font :size 12px :weight normal - :color #999 - :margin - :left 6px + :color #555 .add_tags :font diff --git a/public/stylesheets/sass/ui.sass b/public/stylesheets/sass/ui.sass index 94885023a..17e29802f 100644 --- a/public/stylesheets/sass/ui.sass +++ b/public/stylesheets/sass/ui.sass @@ -65,6 +65,9 @@ :border :top 1px solid #aaa +.button.in_aspects + @include linear-gradient(lighten(#76C000,8%),#76C000) + .right :position absolute :right 0