_members_list.html.erb
1.5 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
<% members = @data ? @data[:members] : profile.members_by('name') %>
<% collection = @collection == :profile_admins ? profile.admins : members %>
<% title = @title ? @title : _('Current members') %>
<% remove_action = @remove_action ? @remove_action : {:action => 'unassociate'} %>
<%= javascript_include_tag params[:controller] %>
<h3><%= title %></h3>
<table>
<col width="1">
<tr>
<th><%= check_box_tag 'checkbox-all', 1, false, :onClick => "toggle(this)" %></th>
<th><%= _('Member') %></th>
<th><%= _('Actions') %></th>
</tr>
<% collection.each do |m| %>
<tr title="<%= m.name %>">
<td><%= labelled_check_box('', 'members_filtered[]', m.id.to_s, false, :id => 'checkbox-'+m.identifier) %></td>
<td><%= link_to_profile m.short_name, m.identifier, :title => m.name %> </td>
<td>
<div class="members-buttons-cell">
<%= button_without_text :edit, _('Edit'), :action => 'change_role', :id => m %>
<%= button_to_remote_without_text(:remove, _('Remove'),
:update => 'members-list',
:loading => "jQuery('#members-list').addClass('loading')",
:success => "jQuery('#tr-#{m.identifier}').show()",
:complete => "jQuery('#members-list').removeClass('loading')",
:url => { :id => m }.merge(remove_action)) if m != user %>
</div>
</td>
</tr>
<% end %>
</table>
<% if collection.empty? %>
<p>
<em><%= _('No members found to: %s') % profile.name %></em>
</p>
<% end %>