Adds routes for group users.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7946 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-11-27 10:47:36 +00:00
parent 1ebe9640a6
commit f680e7f8ac
5 changed files with 15 additions and 8 deletions
+4 -5
View File
@@ -10,9 +10,7 @@
<tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>">
<td class="user"><%= link_to_user user %></td>
<td class="buttons">
<%= link_to_remote l(:button_delete), { :url => { :controller => 'groups', :action => 'remove_user', :id => @group, :user_id => user },
:method => :post },
:class => 'icon icon-del' %>
<%= link_to_remote l(:button_delete), { :url => group_user_path(@group, :user_id => user), :method => :delete }, :class => 'icon icon-del' %>
</td>
</tr>
<% end %>
@@ -26,14 +24,15 @@
<div class="splitcontentright">
<% users = User.active.not_in_group(@group).all(:limit => 100) %>
<% if users.any? %>
<% remote_form_for(:group, @group, :url => {:controller => 'groups', :action => 'add_users', :id => @group}, :method => :post) do |f| %>
<% remote_form_for(@group, :url => group_users_path(@group), :html => {:method => :post}) do |f| %>
<fieldset><legend><%=l(:label_user_new)%></legend>
<p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
<%= observe_field(:user_search,
:frequency => 0.5,
:update => :users,
:url => { :controller => 'groups', :action => 'autocomplete_for_user', :id => @group },
:url => autocomplete_for_user_group_path(@group),
:method => :get,
:with => 'q')
%>