From d44df7e97733934d1a07946c9b97287099272784 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 13 Dec 2010 16:37:56 -0800 Subject: [PATCH] put remove contact link under aspect membership --- app/helpers/people_helper.rb | 8 -------- app/views/people/_aspect_list.haml | 1 + app/views/people/_profile_sidebar.html.haml | 10 ++++++---- public/stylesheets/sass/application.sass | 2 ++ 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/helpers/people_helper.rb b/app/helpers/people_helper.rb index c3fbf7b1f..3a042b022 100644 --- a/app/helpers/people_helper.rb +++ b/app/helpers/people_helper.rb @@ -20,14 +20,6 @@ module PeopleHelper end end - def action_link(person, is_contact) - if is_contact - link_to t('people.profile_sidebar.remove_contact'), person, :confirm => t('are_you_sure'), :method => :delete - elsif person == current_user.person - link_to t('people.profile_sidebar.edit_my_profile'), edit_person_path(person) - end - end - def pending_request_for(person) current_user.request_for(person) end diff --git a/app/views/people/_aspect_list.haml b/app/views/people/_aspect_list.haml index 0cc238fb2..1642060d4 100644 --- a/app/views/people/_aspect_list.haml +++ b/app/views/people/_aspect_list.haml @@ -48,3 +48,4 @@ .right = link_to "done editing", "#", :id => "done_contact_aspects" + = link_to t('people.profile_sidebar.remove_contact'), person, :confirm => t('are_you_sure'), :method => :delete diff --git a/app/views/people/_profile_sidebar.html.haml b/app/views/people/_profile_sidebar.html.haml index 0820dbb57..95b416d2f 100644 --- a/app/views/people/_profile_sidebar.html.haml +++ b/app/views/people/_profile_sidebar.html.haml @@ -18,16 +18,18 @@ .profile_photo = person_image_link(person, :size => :thumb_large, :to => :photos) - %p - = action_link(person, contact) + - if person == current_user.person + %p + = link_to t('people.profile_sidebar.edit_my_profile'), edit_person_path(person) - %hr{:style=>"width:300px;"} + %hr{:style=>"width:300px;"} %ul - if contact %li = render :partial => 'people/aspect_list', - :locals => {:contact => contact, + :locals => {:person => person, + :contact => contact, :aspects_with_person => @aspects_with_person, :aspects_without_person => @aspects.reject{ |aspect| @aspects_with_person.include?(aspect)}} %br diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 97a763a4f..ea0ffb5e5 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -2005,6 +2005,8 @@ h3,h4 .aspects :position relative + :margin + :top 1em .right :right 12px