Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVSizov <fk@sphere.com>2011-10-15 20:56:53 +0400
committerVSizov <fk@sphere.com>2011-10-15 20:56:53 +0400
commitcb02f1cb82ad424ed6e9845e8654fa17e3c38351 (patch)
treec430f98daf7e31d730654f486e4db167293887f1 /app/controllers
parentde5d6e95566d4f9a6b673fcf3f95f84a5f96cb85 (diff)
Sortable issues
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/issues_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index f8b4719809b..3e5f2898228 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -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