cirandas.net

ref: master

app/views/shared/_profile_suggestions_list.html.erb


<% per_page = defined?(:per_page) ? per_page : nil %>

<% if suggestions.empty? %>
  

<%= _('You have no more suggestions :(') %>

<% else %>
    <% suggestions.each do |s| %>
  • <%= 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 %>
    <%= profile_suggestion_profile_connections(s) %> <%= profile_suggestion_tag_connections(s) %>
    <% 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 %>
<% end %>