remove trailing white-spaces from app/controllers/groups_controller.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6904 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
fefb5fb298
commit
a98a341be0
@ -1,27 +1,27 @@
|
|||||||
# Redmine - project management software
|
# Redmine - project management software
|
||||||
# Copyright (C) 2006-2009 Jean-Philippe Lang
|
# Copyright (C) 2006-2011 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# as published by the Free Software Foundation; either version 2
|
# as published by the Free Software Foundation; either version 2
|
||||||
# of the License, or (at your option) any later version.
|
# of the License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class GroupsController < ApplicationController
|
class GroupsController < ApplicationController
|
||||||
layout 'admin'
|
layout 'admin'
|
||||||
|
|
||||||
before_filter :require_admin
|
before_filter :require_admin
|
||||||
|
|
||||||
helper :custom_fields
|
helper :custom_fields
|
||||||
|
|
||||||
# GET /groups
|
# GET /groups
|
||||||
# GET /groups.xml
|
# GET /groups.xml
|
||||||
def index
|
def index
|
||||||
@ -48,7 +48,7 @@ class GroupsController < ApplicationController
|
|||||||
# GET /groups/new.xml
|
# GET /groups/new.xml
|
||||||
def new
|
def new
|
||||||
@group = Group.new
|
@group = Group.new
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
format.xml { render :xml => @group }
|
format.xml { render :xml => @group }
|
||||||
@ -107,22 +107,22 @@ class GroupsController < ApplicationController
|
|||||||
format.xml { head :ok }
|
format.xml { head :ok }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_users
|
def add_users
|
||||||
@group = Group.find(params[:id])
|
@group = Group.find(params[:id])
|
||||||
users = User.find_all_by_id(params[:user_ids])
|
users = User.find_all_by_id(params[:user_ids])
|
||||||
@group.users << users if request.post?
|
@group.users << users if request.post?
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'users' }
|
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'users' }
|
||||||
format.js {
|
format.js {
|
||||||
render(:update) {|page|
|
render(:update) {|page|
|
||||||
page.replace_html "tab-content-users", :partial => 'groups/users'
|
page.replace_html "tab-content-users", :partial => 'groups/users'
|
||||||
users.each {|user| page.visual_effect(:highlight, "user-#{user.id}") }
|
users.each {|user| page.visual_effect(:highlight, "user-#{user.id}") }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_user
|
def remove_user
|
||||||
@group = Group.find(params[:id])
|
@group = Group.find(params[:id])
|
||||||
@group.users.delete(User.find(params[:user_id])) if request.post?
|
@group.users.delete(User.find(params[:user_id])) if request.post?
|
||||||
@ -131,13 +131,13 @@ class GroupsController < ApplicationController
|
|||||||
format.js { render(:update) {|page| page.replace_html "tab-content-users", :partial => 'groups/users'} }
|
format.js { render(:update) {|page| page.replace_html "tab-content-users", :partial => 'groups/users'} }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def autocomplete_for_user
|
def autocomplete_for_user
|
||||||
@group = Group.find(params[:id])
|
@group = Group.find(params[:id])
|
||||||
@users = User.active.not_in_group(@group).like(params[:q]).all(:limit => 100)
|
@users = User.active.not_in_group(@group).like(params[:q]).all(:limit => 100)
|
||||||
render :layout => false
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_membership
|
def edit_membership
|
||||||
@group = Group.find(params[:id])
|
@group = Group.find(params[:id])
|
||||||
@membership = Member.edit_membership(params[:membership_id], params[:membership], @group)
|
@membership = Member.edit_membership(params[:membership_id], params[:membership], @group)
|
||||||
@ -160,7 +160,7 @@ class GroupsController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy_membership
|
def destroy_membership
|
||||||
@group = Group.find(params[:id])
|
@group = Group.find(params[:id])
|
||||||
Member.find(params[:membership_id]).destroy if request.post?
|
Member.find(params[:membership_id]).destroy if request.post?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user