<% if @group.users.any? %> <% @group.users.sort.each do |user| %> <% end %>
<%= l(:label_user) %>
<%= link_to_user user %> <%= delete_link group_user_path(@group, :user_id => user), :remote => true %>
<% else %>

<%= l(:label_no_data) %>

<% end %>
<% users = User.active.not_in_group(@group).all(:limit => 100) %> <% if users.any? %> <%= form_for(@group, :remote => true, :url => group_users_path(@group), :html => {:method => :post}) do |f| %>
<%=l(:label_user_new)%>

<%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %>

<%= javascript_tag "observeSearchfield('user_search', 'users', '#{ escape_javascript autocomplete_for_user_group_path(@group) }')" %>
<%= principals_check_box_tags 'user_ids[]', users %>

<%= submit_tag l(:button_add) %>

<% end %> <% end %>