person.rhtml 626 Bytes
<ul>
  <%if logged_in? && (user != profile) %>

    <% if !user.already_request_friendship?(profile) and !user.is_a_friend?(profile) %>
      <li><%= link_to content_tag('span', __('Add friend')), user.url.merge(:controller => 'friends', :action => 'add', :id => profile.id), :class => 'button with-text icon-add' %></li>
    <% end %>

    <% if user.is_a_friend?(profile) && profile.enable_contact? %>
      <li> <%= link_to content_tag('span', _('Contact')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, :class => 'button with-text icon-menu-mail' %> </li>
    <% end %>

  <% end %>
</ul>