members.html.erb
2.05 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
52
53
54
55
<div class="common-profile-list-block">
<h1><%= _("Members (%d)") % @profile_members.total_entries %></h1>
<h2 class="community-name"><%= profile.name %></h2>
<% cache_timeout(profile.members_cache_key(params), 4.hours) do %>
<div class="profile-members-tabs-container">
<% tabs = [] %>
<% div_members = content_tag :div, :class => "profile-members" do
render :partial => 'profile_members_list',
:locals => {
:users => @profile_members,
:role => "members"
}
end %>
<% tabs << {:title => _("%d Members") % @profile_members.total_entries,
:id => "members-tab",
:content => div_members
} %>
<% div_admins = content_tag :div, :class => "profile-admins" do
render :partial => 'profile_members_list',
:locals => {
:users => @profile_admins,
:role => "admins"
}
end %>
<% tabs << {:title => _("%d Administrators") % @profile_admins.total_entries,
:id => "admins-tab",
:content => div_admins
} %>
<%= render_tabs(tabs) %>
</div><!-- end of class="profile-members-tabs-container" -->
<% end %>
<% button_bar do %>
<%= button :back, _('Go back'), { :controller => 'profile' } %>
<% if profile.community? and user %>
<% if user.has_permission?(:invite_members, profile) %>
<%= button :person, _('Invite people to join'), :controller => 'invite', :action => 'invite_friends' %>
<% end %>
<% if user.has_permission?(:send_mail_to_members, profile) %>
<%= button :send, _('Send e-mail to members'), :controller => 'profile', :action => 'send_mail' %>
<% end %>
<% end %>
<% end %>
<%= hidden_field_tag "profile_url", @profile_members_url %>
</div><!-- end of class="common-profile-list-block" -->
<%= javascript_include_tag "members_page.js" %>