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 / 72 / 727305cacc5a8bee2f7d67e0d597cb6dc8cee74d.svn-base @ 1297:0a574315af3e

History | View | Annotate | Download (1.33 KB)

1 1296:038ba2d95de8 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
          <%= delete_link group_user_path(@group, :user_id => user), :remote => true %>
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
  <%= form_for(@group, :remote => true, :url => group_users_path(@group),
28
               :html => {:method => :post}) do |f| %>
29
    <fieldset><legend><%=l(:label_user_new)%></legend>
30
31
    <p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
32
    <%= javascript_tag "observeSearchfield('user_search', 'users', '#{ escape_javascript autocomplete_for_user_group_path(@group) }')" %>
33
34
    <div id="users">
35
      <%= principals_check_box_tags 'user_ids[]', users %>
36
    </div>
37
38
    <p><%= submit_tag l(:button_add) %></p>
39
    </fieldset>
40
  <% end %>
41
<% end %>
42
43
</div>