<%= link_to_profile profile_image(s.suggestion, :minor, :title => s.suggestion.short_name),
s.suggestion.identifier, :class => 'profile-link' %>
<% if collection == :friends_suggestions %>
<%= link_to '+ %s' % s.suggestion.short_name,
s.suggestion.add_url,
:class => 'accept-suggestion',
:title => _('Add suggestion'),
:remote => true
%>
<% elsif collection == :communities_suggestions %>
<%= link_to '+ %s' % s.suggestion.name,
s.suggestion.join_url,
:class => 'accept-suggestion',
:title => _('Add suggestion'),
:remote => true
%>
<% end %>
<% if collection == :friends_suggestions %>
<%= link_to 'x',
{ :controller => 'friends', :action => 'remove_suggestion', :id => s.suggestion.identifier, :per_page => per_page },
:class => 'remove-suggestion',
:title => _('Remove suggestion'),
data: {confirm: _('Are you sure you want to remove this suggestion?')},
:remote => true
%>
<% elsif collection == :communities_suggestions %>
<%= link_to 'x',
{ :controller => 'memberships', :action => 'remove_suggestion', :id => s.suggestion.identifier, :per_page => per_page },
:class => 'remove-suggestion',
:title => _('Remove suggestion'),
data: {confirm: _('Are you sure you want to remove this suggestion?')},
:remote => true
%>
<% end %>
<% end %>