Commit 0b8734e89c38a0b1f721a9fb2c0328f4bcbd6cb2

Authored by AntonioTerceiro
1 parent a890f7a5

ActionItem36: only present link to add friend if not already friend


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1502 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/views/blocks/profile_info_actions/person.rhtml
1 1 <ul>
2   - <%if logged_in? && (user != profile) %>
  2 + <%if logged_in? && (user != profile) && (! user.friends.include?(profile)) %>
3 3 <li><%= link_to _('Add friend'), :profile => user.identifier, :controller => 'friends', :action => 'add', :id => profile.id %></li>
4 4 <% end %>
5 5 </ul>
... ...