|
<%= pluralize(@user.friends.count, "RailsSpace friend") %>
|
<% @user.friends.each do |friend| %>
|
<%= link_to thumbnail_tag(friend), profile_for(friend) %>
|
<%= link_to friend.name, profile_for(friend) %> |
<% unless hide_edit_links? %>
<%= link_to "Delete",
{ :controller => "friendship", :action => "delete",
:id => friend.screen_name },
:confirm =>
"Really delete friendship with #{friend.name}?" %>
<% end %>
|
<% end %>
<% unless @user.requested_friends.empty? or hide_edit_links? %>
|
<%= pluralize(@user.requested_friends.count, "requested friend") %>
|
<% @user.requested_friends.each do |requester| %>
| <%= link_to thumbnail_tag(requester), profile_for(requester) %> |
<%= link_to requester.name, profile_for(requester) %> |
<%= link_to "Accept",
:controller => "friendship", :action => "accept",
:id => requester.screen_name %> /
<%= link_to "Decline",
{ :controller => "friendship", :action => "decline",
:id => requester.screen_name },
:confirm =>
"Really decline friendship with #{requester.name}?" %>
|
<% end %>
<% end %>
<% unless @user.pending_friends.empty? or hide_edit_links? %>
|
<%= pluralize(@user.pending_friends.count, "pending friend") %>
|
<% @user.pending_friends.each do |pending_friend| %>
| <%= link_to thumbnail_tag(pending_friend),
profile_for(pending_friend) %> |
<%= link_to pending_friend.name,
profile_for(pending_friend) %> |
<%= link_to "Cancel request",
{ :controller => "friendship", :action => "cancel",
:id => pending_friend.screen_name },
:confirm =>
"Cancel friendship request?" %> |
<% end %>
<% end %>