@@ -1,48 +1,53 | |||||
1 | <div class="splitcontentleft"> |
|
1 | <div class="splitcontentleft"> | |
2 | <% if @group.users.any? %> |
|
2 | <% if @group.users.any? %> | |
3 | <table class="list users"> |
|
3 | <table class="list users"> | |
4 | <thead><tr> |
|
4 | <thead><tr> | |
5 | <th><%= l(:label_user) %></th> |
|
5 | <th><%= l(:label_user) %></th> | |
6 | <th style="width:15%"></th> |
|
6 | <th style="width:15%"></th> | |
7 | </tr></thead> |
|
7 | </tr></thead> | |
8 | <tbody> |
|
8 | <tbody> | |
9 | <% @group.users.sort.each do |user| %> |
|
9 | <% @group.users.sort.each do |user| %> | |
10 | <tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>"> |
|
10 | <tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>"> | |
11 | <td class="user"><%= link_to_user user %></td> |
|
11 | <td class="user"><%= link_to_user user %></td> | |
12 | <td class="buttons"> |
|
12 | <td class="buttons"> | |
13 | <%= link_to_remote l(:button_delete), { :url => group_user_path(@group, :user_id => user), :method => :delete }, :class => 'icon icon-del' %> |
|
13 | <%= link_to_remote( | |
|
14 | l(:button_delete), | |||
|
15 | { :url => group_user_path(@group, :user_id => user), | |||
|
16 | :method => :delete }, | |||
|
17 | :class => 'icon icon-del' | |||
|
18 | ) %> | |||
14 | </td> |
|
19 | </td> | |
15 | </tr> |
|
20 | </tr> | |
16 | <% end %> |
|
21 | <% end %> | |
17 | </tbody> |
|
22 | </tbody> | |
18 | </table> |
|
23 | </table> | |
19 | <% else %> |
|
24 | <% else %> | |
20 | <p class="nodata"><%= l(:label_no_data) %></p> |
|
25 | <p class="nodata"><%= l(:label_no_data) %></p> | |
21 | <% end %> |
|
26 | <% end %> | |
22 | </div> |
|
27 | </div> | |
23 |
|
28 | |||
24 | <div class="splitcontentright"> |
|
29 | <div class="splitcontentright"> | |
25 | <% users = User.active.not_in_group(@group).all(:limit => 100) %> |
|
30 | <% users = User.active.not_in_group(@group).all(:limit => 100) %> | |
26 | <% if users.any? %> |
|
31 | <% if users.any? %> | |
27 | <% remote_form_for(@group, :url => group_users_path(@group), :html => {:method => :post}) do |f| %> |
|
32 | <% remote_form_for(@group, :url => group_users_path(@group), :html => {:method => :post}) do |f| %> | |
28 | <fieldset><legend><%=l(:label_user_new)%></legend> |
|
33 | <fieldset><legend><%=l(:label_user_new)%></legend> | |
29 |
|
34 | |||
30 | <p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p> |
|
35 | <p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p> | |
31 | <%= observe_field(:user_search, |
|
36 | <%= observe_field(:user_search, | |
32 | :frequency => 0.5, |
|
37 | :frequency => 0.5, | |
33 | :update => :users, |
|
38 | :update => :users, | |
34 | :url => autocomplete_for_user_group_path(@group), |
|
39 | :url => autocomplete_for_user_group_path(@group), | |
35 | :method => :get, |
|
40 | :method => :get, | |
36 | :with => 'q') |
|
41 | :with => 'q') | |
37 | %> |
|
42 | %> | |
38 |
|
43 | |||
39 | <div id="users"> |
|
44 | <div id="users"> | |
40 | <%= principals_check_box_tags 'user_ids[]', users %> |
|
45 | <%= principals_check_box_tags 'user_ids[]', users %> | |
41 | </div> |
|
46 | </div> | |
42 |
|
47 | |||
43 | <p><%= submit_tag l(:button_add) %></p> |
|
48 | <p><%= submit_tag l(:button_add) %></p> | |
44 | </fieldset> |
|
49 | </fieldset> | |
45 | <% end %> |
|
50 | <% end %> | |
46 | <% end %> |
|
51 | <% end %> | |
47 |
|
52 | |||
48 | </div> |
|
53 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now