summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-04 17:04:50 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-04 17:04:50 +0000
commitc216ab325bc56123819fb5b700a759753959ead8 (patch)
treea90493432ae7a2ca681c193e65627d16341bf53e /app/controllers
parent479b9b54336c3fa5ce3f9fccb56307a52b48dd0c (diff)
downloadredmine-c216ab325bc56123819fb5b700a759753959ead8.tar.gz
redmine-c216ab325bc56123819fb5b700a759753959ead8.zip
Added position on Enumeration model.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@800 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/enumerations_controller.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/controllers/enumerations_controller.rb b/app/controllers/enumerations_controller.rb
index e77af49ab..7a7f1685a 100644
--- a/app/controllers/enumerations_controller.rb
+++ b/app/controllers/enumerations_controller.rb
@@ -59,6 +59,21 @@ class EnumerationsController < ApplicationController
end
end
+ def move
+ @enumeration = Enumeration.find(params[:id])
+ case params[:position]
+ when 'highest'
+ @enumeration.move_to_top
+ when 'higher'
+ @enumeration.move_higher
+ when 'lower'
+ @enumeration.move_lower
+ when 'lowest'
+ @enumeration.move_to_bottom
+ end if params[:position]
+ redirect_to :action => 'index'
+ end
+
def destroy
Enumeration.find(params[:id]).destroy
flash[:notice] = l(:notice_successful_delete)