diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-10-15 21:54:39 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-10-15 21:54:39 +0400 |
commit | f77986bf5efc95c3447302acec50348244b74a64 (patch) | |
tree | e64cc06d6f704673e4495caeea749ceb9f51eb91 /app/controllers | |
parent | 975d13c734b813feb46be893ddff858d1d4b010b (diff) | |
parent | 3226b4fe7a00b3543ac3c81d1475dd860adaff98 (diff) |
Merge branch 'issue_im'
Conflicts:
config/initializers/rails_footnotes.rb
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/issues_controller.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index f8b4719809b..1f507660540 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -5,7 +5,7 @@ class IssuesController < ApplicationController # Authorize before_filter :add_project_abilities before_filter :authorize_read_issue! - before_filter :authorize_write_issue!, :only => [:new, :create, :close, :edit, :update] + before_filter :authorize_write_issue!, :only => [:new, :create, :close, :edit, :update, :sort] before_filter :authorize_admin_issue!, :only => [:destroy] respond_to :js @@ -69,4 +69,14 @@ class IssuesController < ApplicationController format.js { render :nothing => true } end end + + def sort + @issues = @project.issues.all + @issues.each do |issue| + issue.position = params['issue'].index(issue.id.to_s) + 1 + issue.save + end + + render :nothing => true + end end |