<% @user.friends.each do |friend| %> <% end %> <% unless @user.requested_friends.empty? or hide_edit_links? %> <% @user.requested_friends.each do |requester| %> <% end %> <% end %> <% unless @user.pending_friends.empty? or hide_edit_links? %> <% @user.pending_friends.each do |pending_friend| %> <% end %> <% end %>
<%= pluralize(@user.friends.count, "RailsSpace 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 %>
<%= pluralize(@user.requested_friends.count, "requested friend") %>
<%= 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}?" %>
<%= pluralize(@user.pending_friends.count, "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?" %>