members.html.erb
1.83 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
56
57
58
59
60
<div class="common-profile-list-block">
<h1><%= _("Members") + " (#{@total_members})" %></h1>
<h3 class="community-name-members"><%= _("%s") % profile.name %></h3>
<% cache_timeout(profile.members_cache_key(params), 4.hours) do %>
<div class='profile-admins'>
<h2><%= "#{@profile_admins.count} "+_("admins") %></h2>
<ul class='profile-list'>
<% @profile_admins.each do |admin| %>
<%= profile_image_link(admin) %>
<% end %>
</ul>
</div>
<div class="profile-members-title-sort">
<h2><%= "#{@members_count} "+ _("members") %></h2>
<div id="members-display-options-sort">
<%= label_tag("sort", _("Sort by:")) %>
<%= select_tag("sort",
options_for_select(
[
[_("Name A-Z"), 'asc'],
[_("Name Z-A"), 'desc'],
], :selected=>params[:sort])
) %>
</div>
</div>
<div class='profile-members'>
<ul class='profile-list'>
<% @members_except_admins.each do |member| %>
<%= profile_image_link(member) %>
<% end %>
</ul>
</div>
<div id='pagination-profiles'>
<%= pagination_links @members_except_admins, :param_name => 'npage' %>
</div>
<% 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 "current_profile", profile.identifier %>
</div><!-- fim class="common-profile-list-block" -->
<%= javascript_include_tag "members_page.js" %>