manage_organizations_status.html.erb
2.54 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
61
62
63
64
65
66
67
68
69
<h1><%= _('Manage organizations') %></h1>
<%= form_tag( { :action => 'manage_organizations_status' }, :method => 'get', :class => 'users-search' ) do %>
<div class="search-field">
<span class="formfield">
<%= text_field_tag 'q', @q, :title => _("Find profiles"), :style=>"width:85%" %>
</span>
<%= submit_button(:search, _('Search')) %>
</div>
<div class="environment-users-results-header">
<div id='environment-users-filter-title'><%= @title %></div>
<div id="environment-users-filter-filter">
<strong><%= _("Filter by: ") %></strong>
<select id="profile_filter_select">
<%= options_for_select([['Any', 'any'],["Disabled profiles", "disabled"], ["Enabled profiles", "enabled"]], @filter) %>
</select>
</div>
<div style="clear: both"></div>
</div>
<table>
<colgroup>
<col width="80%">
<col width="20%">
</colgroup>
<tr>
<th><%= _('Member') %></th>
<th><%= _('Actions') %></th>
</tr>
<% @collection.each do |p| %>
<tr title="<%= p.name %>">
<td><%= link_to_profile p.short_name, p.identifier, :title => p.name %> </td>
<td class='actions'>
<div class="members-buttons-cell">
<% if p.visible %>
<%= button_without_text :'deactivate-user', _('Deactivate'), {:controller => "profile_editor", :action => 'deactivate_profile', :profile => p.identifier, :id => p.id}, :confirm => _("Do you want to deactivate this profile ?") %>
<% else %>
<%= button_without_text :'activate-user', _('Activate'), {:controller => "profile_editor", :action => 'activate_profile', :profile => p.identifier, :id => p.id}, :confirm => _("Do you want to activate this profile ?") %>
<% end %>
<%= button_without_text :'delete', _('Remove'), {:controller => "profile_editor", :action => 'destroy_profile', :profile => p.identifier, :id => p.id, :return_to => "/admin/admin_panel/manage_organizations_status"}, :method => :post, :confirm => _("Do you want to deactivate this profile ?") %>
</div>
</td>
</tr>
<% end %>
</table>
<% end %>
<%= pagination_links @collection, {:param_name => 'npage', :page_links => true} %>
<% button_bar do %>
<%= button :back, _('Back'), :controller => 'admin_panel' %>
<% end %>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#profile_filter_select").change(function(){
document.location.href = '/admin/admin_panel/manage_organizations_status?filter='+this.value;
});
});
</script>