put remove contact link under aspect membership

This commit is contained in:
Raphael 2010-12-13 16:37:56 -08:00
parent 02d76441e4
commit d44df7e977
4 changed files with 9 additions and 12 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -2005,6 +2005,8 @@ h3,h4
.aspects
:position relative
:margin
:top 1em
.right
:right 12px