summaryrefslogtreecommitdiffstats
path: root/app/controllers/trackers_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-02 16:55:16 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-02 16:55:16 +0000
commit3a32edc3bd108ed07ef2802fbf13dcc886d76607 (patch)
treed6db898248dfa8b008e452fb99d0540fb3035779 /app/controllers/trackers_controller.rb
parent462c986452e25d00b4a76db6494b2649ca9d2285 (diff)
downloadredmine-3a32edc3bd108ed07ef2802fbf13dcc886d76607.tar.gz
redmine-3a32edc3bd108ed07ef2802fbf13dcc886d76607.zip
Adds a view for editing all trackers fields.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10283 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/trackers_controller.rb')
-rw-r--r--app/controllers/trackers_controller.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/controllers/trackers_controller.rb b/app/controllers/trackers_controller.rb
index 5d4bfcaf1..074514d96 100644
--- a/app/controllers/trackers_controller.rb
+++ b/app/controllers/trackers_controller.rb
@@ -80,4 +80,22 @@ class TrackersController < ApplicationController
end
redirect_to :action => 'index'
end
+
+ def fields
+ if request.post? && params[:trackers]
+ params[:trackers].each do |tracker_id, tracker_params|
+ tracker = Tracker.find_by_id(tracker_id)
+ if tracker
+ tracker.core_fields = tracker_params[:core_fields]
+ tracker.custom_field_ids = tracker_params[:custom_field_ids]
+ tracker.save
+ end
+ end
+ flash[:notice] = l(:notice_successful_update)
+ redirect_to :action => 'fields'
+ return
+ end
+ @trackers = Tracker.sorted.all
+ @custom_fields = IssueCustomField.all.sort
+ end
end