index.rhtml
1.98 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
48
49
50
51
<div id="manage_friends">
<h1><%= __("%s's friends") % profile.name %></h1>
<% cache_timeout(profile.manage_friends_cache_key(params), 4.hours.from_now) do %>
<% if @friends.empty? %>
<p>
<em>
<%= __('You have no friends yet.') %>
<%= link_to _('Do you want to see other people in this environment?'), :controller => 'search', :action => 'assets', :asset => 'people' %>
</em>
</p>
<% else %>
<% button_bar do %>
<%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
<%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %>
<%= button(:search, _('Invite people from my e-mail contacts'), :controller => 'invite', :action => 'friends') %>
<% end %>
<% end %>
<ul class="profile-list">
<% @friends.each do |friend| %>
<li>
<%= link_to_profile profile_image(friend) + '<br/>' + friend.short_name,
friend.identifier, :class => 'profile-link' %>
<div class="controll">
<%= link_to content_tag('span',_('remove')),
{ :action => 'remove', :id => friend.id },
:class => 'button icon-delete',
:title => _('remove') %>
<%= link_to content_tag('span',_('contact')),
friend.url.merge(:controller => 'contact', :action => 'new'),
:class => 'button icon-menu-mail',
:title => _('contact') %>
</div><!-- end class="controll" -->
</li>
<% end %>
</ul>
<div id='pagination-friends'>
<%= pagination_links @friends, :param_name => 'npage' %>
</div>
<% button_bar do %>
<%= button(:back, _('Back to control panel'), :controller => 'profile_editor') %>
<%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %>
<%= button(:search, _('Invite people from my e-mail contacts'), :controller => 'invite', :action => 'friends') %>
<% end %>
<% end %>
</div><!-- end id="manage_friends" -->