index.html.erb 1.44 KB
<div id="manage_friends">

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

<% cache_timeout(profile.manage_friends_cache_key(params), 4.hours) do %>
  <% 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>
  <% end %>

  <% button_bar do %>
    <%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
    <%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %>
    <% unless @plugins.dispatch(:remove_invite_friends_button).include?(true) %>
      <%= button(:search, _('Invite people from my e-mail contacts'), :controller => 'invite', :action => 'select_address_book') %>
    <% end %>
  <% end %>

  <%= render :partial => 'profile_list', :locals => { :profiles => @friends, :collection => :friends } %>
  <div id='pagination-friends'>
    <%= pagination_links @friends, :param_name => 'npage' %>
  </div>

<% end %>

<% unless @suggestions.empty? %>
  <br style="clear:both" />
  <h2><%= _("Friends suggestions") %></h2>

  <%= render :partial => 'profile_list', :locals => { :profiles => @suggestions, :collection => :suggestions } %>

  <% button_bar do %>
    <%= link_to _('See more suggestions...'), :action => 'suggest' %>
  <% end %>
<% end %>

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