To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / .svn / pristine / 0f / 0f55ca10803bce4cf5a650e17d0e04f01a9b964d.svn-base @ 912:5e80956cc792

History | View | Annotate | Download (1.49 KB)

1 909:cbb26bc654de Chris
<div class="splitcontentleft">
2
<% if @group.users.any? %>
3
  <table class="list users">
4
    <thead><tr>
5
      <th><%= l(:label_user) %></th>
6
      <th style="width:15%"></th>
7
    </tr></thead>
8
    <tbody>
9
    <% @group.users.sort.each do |user| %>
10
      <tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>">
11
        <td class="user"><%= link_to_user user %></td>
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' %>
14
        </td>
15
      </tr>
16
    <% end %>
17
    </tbody>
18
  </table>
19
<% else %>
20
  <p class="nodata"><%= l(:label_no_data) %></p>
21
<% end %>
22
</div>
23
24
<div class="splitcontentright">
25
<% users = User.active.not_in_group(@group).all(:limit => 100) %>
26
<% if users.any? %>
27
  <% remote_form_for(@group, :url => group_users_path(@group), :html => {:method => :post}) do |f| %>
28
    <fieldset><legend><%=l(:label_user_new)%></legend>
29
30
    <p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
31
    <%= observe_field(:user_search,
32
                 :frequency => 0.5,
33
                 :update => :users,
34
                 :url => autocomplete_for_user_group_path(@group),
35
                 :method => :get,
36
                 :with => 'q')
37
                  %>
38
39
    <div id="users">
40
      <%= principals_check_box_tags 'user_ids[]', users %>
41
    </div>
42
43
    <p><%= submit_tag l(:button_add) %></p>
44
    </fieldset>
45
  <% end %>
46
<% end %>
47
48
</div>