_profile_suggestions_list.html.erb
2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<% if suggestions.empty? %>
<p>
<em>
<%= _('You have no more suggestions :(') %>
</em>
</p>
<% else %>
<ul class="profile-list">
<% suggestions.each do |s| %>
<li>
<%= link_to_profile profile_image(s.suggestion, :minor) + '<br/>' + s.suggestion.short_name,
s.suggestion.identifier, :class => 'profile-link' %>
<%= button_without_text :help, content_tag('span',_('info about suggestion')),
'#',
:class => 'explain-suggestion',
:title => _('Why this suggestion?') %>
<div class='extra_info' style='display:none'>
<%= profile_suggestion_categories(s) %>
</div>
<div class="controll">
<% if collection == :friends_suggestions %>
<%= button_without_text :add, content_tag('span',_('add')),
s.suggestion.add_url,
:class => 'add-friend accept-suggestion',
:title => _('Add friend') %>
<%= button_without_text :remove, content_tag('span',_('remove')),
{ :controller => 'friends', :action => 'remove_suggestion', :id => s.suggestion.identifier },
:class => 'remove-suggestion',
:title => _('Remove suggestion'),
:confirm => _('Are you sure you want to remove this suggestion?') %>
<% elsif collection == :communities_suggestions %>
<%= button_without_text :add, content_tag('span',_('join')),
s.suggestion.join_url,
:class => 'join-community accept-suggestion',
:title => _("Join %s") % s.suggestion.name %>
<%= button_without_text :remove, content_tag('span',_('remove')),
{ :action => 'remove_suggestion', :id => s.suggestion.identifier },
:class => 'remove-suggestion',
:title => _('Remove suggestion'),
:confirm => _('Are you sure you want to remove this suggestion?') %>
<% end %>
</div><!-- end class="controll" -->
</li>
<% end %>
</ul>
<% end %>
<br style="clear:both" />