Commit cbfe27a980adc5aaa8f780abe5d7d9c8e2c9460a
1 parent
5c973f1e
Exists in
merge_deactive_and_ban
manage_organization: Add delete button on manage organization and refactoring the html
Signed-off-by: David Carlos <ddavidcarlos1392@gmail.com> Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing
3 changed files
with
45 additions
and
39 deletions
Show diff stats
... | ... | @@ -0,0 +1,33 @@ |
1 | +<div class="environment-users-results-header"> | |
2 | + <div style="clear: both"></div> | |
3 | +</div> | |
4 | +<table> | |
5 | + <colgroup> | |
6 | + <col width="80%"> | |
7 | + <col width="20%"> | |
8 | + </colgroup> | |
9 | + | |
10 | + <tr> | |
11 | + <th><%= _('Member') %></th> | |
12 | + <th><%= _('Actions') %></th> | |
13 | + </tr> | |
14 | + | |
15 | + <% @collection.each do |p| %> | |
16 | + <tr title="<%= p.name %>"> | |
17 | + <td><%= link_to_profile p.short_name, p.identifier, :title => p.name %> </td> | |
18 | + | |
19 | + <td class='actions'> | |
20 | + <div class="members-buttons-cell"> | |
21 | + <% if p.visible %> | |
22 | + <%= 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 ?") %> | |
23 | + <% else %> | |
24 | + <%= 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 ?") %> | |
25 | + <% end %> | |
26 | + <%= button_without_text :'delete', _('Remove'), {:controller=>"profile_editor", :action => 'destroy_profile', :id => p.id, :profile => p.identifier}, :method => :post, :filter => @filter, :confirm => _("Do you want to remove this profile?") %> | |
27 | + </div> | |
28 | + </td> | |
29 | + </tr> | |
30 | +<% end %> | |
31 | +</table> | |
32 | + | |
33 | +<%= pagination_links @collection, {:param_name => 'npage', :page_links => true} %> | ... | ... |
app/views/admin_panel/manage_organizations_status.html.erb
... | ... | @@ -2,17 +2,11 @@ |
2 | 2 | |
3 | 3 | <%= form_tag( { :action => 'manage_organizations_status' }, :method => 'get', :class => 'users-search' ) do %> |
4 | 4 | |
5 | - <div class="search-field"> | |
6 | - <span class="formfield"> | |
7 | - <%= text_field_tag 'q', @q, :title => _("Find profiles"), :style=>"width:85%" %> | |
8 | - </span> | |
9 | 5 | |
10 | - <%= submit_button(:search, _('Search')) %> | |
6 | + <div id="search-softwares"> | |
7 | + <%= render :partial => "organization_search" %> | |
11 | 8 | </div> |
12 | 9 | |
13 | - <div class="environment-users-results-header"> | |
14 | - <div id='environment-users-filter-title'><%= @title %></div> | |
15 | - | |
16 | 10 | <div id="environment-users-filter-filter"> |
17 | 11 | <strong><%= _("Filter by: ") %></strong> |
18 | 12 | |
... | ... | @@ -23,42 +17,14 @@ |
23 | 17 | <div style="clear: both"></div> |
24 | 18 | </div> |
25 | 19 | |
26 | - <table> | |
27 | - <colgroup> | |
28 | - <col width="80%"> | |
29 | - <col width="20%"> | |
30 | - </colgroup> | |
31 | - | |
32 | - <tr> | |
33 | - <th><%= _('Member') %></th> | |
34 | - <th><%= _('Actions') %></th> | |
35 | - </tr> | |
36 | - | |
37 | - <% @collection.each do |p| %> | |
38 | - <tr title="<%= p.name %>"> | |
39 | - <td><%= link_to_profile p.short_name, p.identifier, :title => p.name %> </td> | |
40 | - | |
41 | - <td class='actions'> | |
42 | - <div class="members-buttons-cell"> | |
43 | - <% if p.visible %> | |
44 | - <%= 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 ?") %> | |
45 | - <% else %> | |
46 | - <%= 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 ?") %> | |
47 | - <% end %> | |
48 | - </div> | |
49 | - </td> | |
50 | - </tr> | |
51 | - <% end %> | |
52 | - </table> | |
20 | + <%= render :partial => "profiles_list" %> | |
53 | 21 | |
54 | 22 | <% end %> |
55 | 23 | |
56 | -<%= pagination_links @collection, {:param_name => 'npage', :page_links => true} %> | |
57 | - | |
58 | -<script type="text/javascript"> | |
24 | + <script type="text/javascript"> | |
59 | 25 | jQuery(document).ready(function(){ |
60 | 26 | jQuery("#profile_filter_select").change(function(){ |
61 | 27 | document.location.href = '/admin/admin_panel/manage_organizations_status?filter='+this.value; |
62 | 28 | }); |
63 | 29 | }); |
64 | -</script> | |
65 | 30 | \ No newline at end of file |
31 | +</script> | ... | ... |