1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
%li.remote_friend{:id => "uid_" + friend.uid, :uid => friend.uid}
.right
-if friend.contact && !friend.contact.pending
= t('people.person.already_connected')
- elsif (friend.contact && friend.contact.pending) || (friend.request && friend.request.sender_id != friend.person.id)
= t('people.person.pending_request')
- elsif (friend.request && friend.request.sender_id == friend.person.id)
= link_to t('people.show.incoming_request', :name => truncate(friend.person.name, :length => 20, :separator => ' ', :omission => '')),
'#',
:class => 'button'
- elsif friend.invitation_id
= t('invitations.new.already_invited')
%br
= link_to t('.resend'), service_inviter_path(:uid => friend.uid, :provider => 'facebook', :invitation_id => friend.invitation_id)
- elsif friend.person
= link_to t('people.show.start_sharing'),
'#',
:class => 'button'
- elsif current_user.invites > 0
= form_tag service_inviter_path(:provider => 'facebook') do
= select_tag(:aspect_id, options_from_collection_for_select(@all_aspects, 'id', 'name'))
= hidden_field_tag :uid, friend.uid
= submit_tag t('.invite')
- if friend.person
= person_image_link(friend.person)
- else
= image_tag(friend.photo_url, :class => 'avatar')
%h4.name
- if friend.person
= link_to friend.name, person_path(friend.person)
- else
= friend.name
- unless friend.person.nil? || (friend.contact && friend.contact.pending) || (friend.request && friend.request.sender_id != friend.person.id)
%li{:id => "options_" + friend.uid, :class => "share_with hidden", :style => "height:auto"}
- contact = friend.contact
- contact ||= Contact.new
= render :partial => 'contacts/share_with_list',
:locals => {:person => friend.person,
:contact => contact,
:aspects_with_person => [],
:aspects_without_person => current_user.aspects,
:friend_finder => true}
|