From 20b5ca7570a75018e5db1b42f21a73ad3074a852 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Tue, 15 Mar 2011 22:10:20 -0700 Subject: [PATCH] added tag helper text on profile, edit on hover --- app/views/people/show.html.haml | 12 +++++++++- app/views/profiles/edit.html.haml | 2 +- config/locales/diaspora/en.yml | 3 +++ public/stylesheets/sass/application.sass | 30 ++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 2 deletions(-) diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 61cae69e9..0da030909 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -59,7 +59,17 @@ %span.diaspora_handle = @person.diaspora_handle .description - = @person.profile.format_tags(@person.profile.tag_string) + - if !@person.profile.tag_string.blank? + = @person.profile.format_tags(@person.profile.tag_string) + - if @person == current_user.person + %span.hover_edit + = link_to t('.edit'), edit_profile_path + - else + - if @person == current_user.person + %i + = t('.you_have_no_tags') + %span.add_tags + = link_to t('.add_some'), edit_profile_path %hr - if @posts.count > 0 diff --git a/app/views/profiles/edit.html.haml b/app/views/profiles/edit.html.haml index 7cd5b1c5c..bea1de098 100644 --- a/app/views/profiles/edit.html.haml +++ b/app/views/profiles/edit.html.haml @@ -13,7 +13,7 @@ .span-12.prepend-5.last - content_for :submit_block do - = link_to t('cancel'), edit_user_path(current_user) + = link_to t('cancel'), person_path(current_user.person) = t('or') = submit_tag t('.update_profile') = render :partial => 'edit', :locals => {:person => @person, diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index ca680ee6e..378be7e34 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -333,6 +333,9 @@ en: fail: "Sorry, we couldn't find %{handle}." show: no_posts: "no posts to display!" + you_have_no_tags: "you have no tags!" + add_some: "add some" + edit: "edit" incoming_request: "%{name} wants to share with you" return_to_aspects: "Return to your aspects page" to_accept_or_ignore: "to accept or ignore it." diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index b8883ee4a..0abadf07b 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -250,6 +250,8 @@ header :top 4px :margin :right 1em + &:active + :top 5px .stream audio @@ -1698,6 +1700,9 @@ h3 span.current_gs_step :size smaller :width 28px + &:active + :top 6px + a :z-index 5 :position absolute @@ -2760,8 +2765,16 @@ ul.show_comments :display none .tag + &:hover + :text + :decoration none + :border + :bottom 1px solid $blue + :background :color lighten($blue, 47%) + :border + :bottom 1px dotted $blue :font :weight bold @@ -2772,3 +2785,20 @@ ul.show_comments :color #999 :margin :left 6px + +.add_tags + :font + :weight normal + :size 11px + +.hover_edit + :display none + :font + :weight normal + :size 11px + :margin + :left 5px + +.description:hover + .hover_edit + :display inline