Mercurial > hg > soundsoftware-site
comparison app/controllers/custom_fields_controller.rb @ 441:cbce1fd3b1b7 redmine-1.2
Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author | Chris Cannam |
---|---|
date | Mon, 06 Jun 2011 14:24:13 +0100 |
parents | 513646585e45 |
children | cbb26bc654de |
comparison
equal
deleted
inserted
replaced
245:051f544170fe | 441:cbce1fd3b1b7 |
---|---|
36 | 36 |
37 if request.post? and @custom_field.save | 37 if request.post? and @custom_field.save |
38 flash[:notice] = l(:notice_successful_create) | 38 flash[:notice] = l(:notice_successful_create) |
39 call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field) | 39 call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field) |
40 redirect_to :action => 'index', :tab => @custom_field.class.name | 40 redirect_to :action => 'index', :tab => @custom_field.class.name |
41 else | |
42 @trackers = Tracker.find(:all, :order => 'position') | |
41 end | 43 end |
42 @trackers = Tracker.find(:all, :order => 'position') | |
43 end | 44 end |
44 | 45 |
45 def edit | 46 def edit |
46 @custom_field = CustomField.find(params[:id]) | 47 @custom_field = CustomField.find(params[:id]) |
47 if request.post? and @custom_field.update_attributes(params[:custom_field]) | 48 if request.post? and @custom_field.update_attributes(params[:custom_field]) |
48 flash[:notice] = l(:notice_successful_update) | 49 flash[:notice] = l(:notice_successful_update) |
49 call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field) | 50 call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field) |
50 redirect_to :action => 'index', :tab => @custom_field.class.name | 51 redirect_to :action => 'index', :tab => @custom_field.class.name |
52 else | |
53 @trackers = Tracker.find(:all, :order => 'position') | |
51 end | 54 end |
52 @trackers = Tracker.find(:all, :order => 'position') | |
53 end | 55 end |
54 | 56 |
55 def destroy | 57 def destroy |
56 @custom_field = CustomField.find(params[:id]).destroy | 58 @custom_field = CustomField.find(params[:id]).destroy |
57 redirect_to :action => 'index', :tab => @custom_field.class.name | 59 redirect_to :action => 'index', :tab => @custom_field.class.name |