Merge branch 'issue_im'
Conflicts: config/initializers/rails_footnotes.rb
This commit is contained in:
commit
99777cab2a
18 changed files with 70 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue