index.rhtml 1.84 KB
<div id="manage_friends">

<h1><%= __("%s's friends") % profile.name %></h1>

<% if @friends.empty? %>
<p>
<em>
  <%= __('You have no friends yet.') %>
  <%= link_to _('Do you want to see other people in this environment?'), :controller => 'search', :action => 'assets', :asset => 'people' %>
</em>
</p>
<% else %>
  <% button_bar do %>
    <%= button(:back, _('Go back'), :controller => 'profile_editor') %>
    <%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %>
    <%= button(:search, _('Invite people from my e-mail contacts'), :action => 'invite') %>
  <% end %>
<% end %>

<ul class="profile-list">
  <% @friends.each do |friend| %>
    <li>
    <%= link_to_profile profile_image(friend) + '<br/>' + friend.name,
                        friend.identifier, :class => 'profile-link' %>
    <div class="controll">
      <%= link_to content_tag('span',_('remove')),
          { :action => 'remove', :id => friend.id },
            :class => 'button icon-delete',
            :title => _('remove'),
            :help => __('Clicking on this button will remove your friend relation with %s.') % friend.name %>
      <%= link_to content_tag('span',_('contact')),
            friend.url.merge(:controller => 'contact', :action => 'new'),
            :class => 'button icon-menu-mail',
            :title => _('contact'),
            :help => __('Clicking on this button will let you send a message to %s.') % friend.name %>
    </div><!-- end class="controll" -->
    </li>
  <% end %>
</ul>

<% button_bar do %>
  <%= button(:back, _('Go back'), :controller => 'profile_editor') %>
  <%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %>
  <%= button(:search, _('Invite people from my e-mail contacts'), :action => 'invite') %>
<% end %>

</div><!-- end id="manage_friends" -->