comparison app/controllers/projects_controller.rb @ 1128:cd2db8872493 redmine-2.2-integration

Removed line from the Projects Controller that was mistakenly left after the merge from the pristine branch.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 09 Jan 2013 11:25:55 +0000
parents bb32da3bea34
children 16826c3afbba
comparison
equal deleted inserted replaced
1127:736d01c1d2d0 1128:cd2db8872493
55 sort_update %w(name lft created_on updated_on) 55 sort_update %w(name lft created_on updated_on)
56 @limit = per_page_option 56 @limit = per_page_option
57 @project_count = Project.visible_roots.count 57 @project_count = Project.visible_roots.count
58 @project_pages = Paginator.new self, @project_count, @limit, params['page'] 58 @project_pages = Paginator.new self, @project_count, @limit, params['page']
59 @offset ||= @project_pages.current.offset 59 @offset ||= @project_pages.current.offset
60 @projects = Project.visible_roots.all(:offset => @offset, :limit => @limit, :order => sort_clause) 60 @projects = Project.visible_roots.all(:offset => @offset, :limit => @limit, :order => sort_clause)
61 if User.current.logged? 61 if User.current.logged?
62 # seems sort_by gives us case-sensitive ordering, which we don't want 62 # seems sort_by gives us case-sensitive ordering, which we don't want
63 # @user_projects = User.current.projects.sort_by(&:name) 63 # @user_projects = User.current.projects.sort_by(&:name)
64 @user_projects = User.current.projects.all(:order => :name) 64 @user_projects = User.current.projects.all(:order => :name)
65 end 65 end
173 end 173 end
174 rescue ActiveRecord::RecordNotFound 174 rescue ActiveRecord::RecordNotFound
175 # source_project not found 175 # source_project not found
176 render_404 176 render_404
177 end 177 end
178 178
179 # Show @project 179 # Show @project
180 def show 180 def show
181 if params[:jump] 181 if params[:jump]
182 # try to redirect to the requested menu item 182 # try to redirect to the requested menu item
183 redirect_to_project_menu_item(@project, params[:jump]) && return 183 redirect_to_project_menu_item(@project, params[:jump]) && return
244 flash[:notice] = l(:notice_successful_update) 244 flash[:notice] = l(:notice_successful_update)
245 end 245 end
246 redirect_to :action => 'settings', :id => @project, :tab => 'overview' 246 redirect_to :action => 'settings', :id => @project, :tab => 'overview'
247 end 247 end
248 248
249 verify :method => :post, :only => :modules, :render => {:nothing => true, :status => :method_not_allowed }
250
251 def modules 249 def modules
252 @project.enabled_module_names = params[:enabled_module_names] 250 @project.enabled_module_names = params[:enabled_module_names]
253 flash[:notice] = l(:notice_successful_update) 251 flash[:notice] = l(:notice_successful_update)
254 redirect_to :action => 'settings', :id => @project, :tab => 'modules' 252 redirect_to :action => 'settings', :id => @project, :tab => 'modules'
255 end 253 end