diff options
| author | Michel Etienne | 2014-08-29 11:44:05 +0200 |
|---|---|---|
| committer | Michel Etienne | 2014-08-29 11:44:05 +0200 |
| commit | e1c8a62852616fcfcc6a79b6cc4aefc50e4bd628 (patch) | |
| tree | 7f1aa8ebd5b789ae1ce7a46ff9c4a2b87be7d578 /app/controllers | |
| parent | 47be58af8bdae063c7177bcab7019c19030c75db (diff) | |
| download | chouette-core-e1c8a62852616fcfcc6a79b6cc4aefc50e4bd628.tar.bz2 | |
active pagination on remote
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/import_tasks_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/stop_area_copies_controller.rb | 18 |
2 files changed, 4 insertions, 16 deletions
diff --git a/app/controllers/import_tasks_controller.rb b/app/controllers/import_tasks_controller.rb index 37de83f4d..1d7e8c3aa 100644 --- a/app/controllers/import_tasks_controller.rb +++ b/app/controllers/import_tasks_controller.rb @@ -1,6 +1,6 @@ class ImportTasksController < ChouetteController respond_to :html, :xml, :json - respond_to :js, :only => :show + respond_to :js, :only => [:show, :index] belongs_to :referential def new diff --git a/app/controllers/stop_area_copies_controller.rb b/app/controllers/stop_area_copies_controller.rb index 01dfc5894..dbb66c2bd 100644 --- a/app/controllers/stop_area_copies_controller.rb +++ b/app/controllers/stop_area_copies_controller.rb @@ -7,25 +7,13 @@ class StopAreaCopiesController < ChouetteController respond_to :html, :only => :new def new - @stop_area_copy = StopAreaCopy.new(:source_id => parent.id, :hierarchy => params[:hierarchy]) - if @stop_area_copy.hierarchy == "child" - if parent.area_type.underscore == "stop_place" - @stop_area_copy.area_type="commercial_stop_point" - else - @stop_area_copy.area_type="boarding_position" - end - else - if parent.area_type.underscore == "stop_place" || parent.area_type.underscore == "commercial_stop_point" - @stop_area_copy.area_type="stop_place" - else - @stop_area_copy.area_type="commercial_stop_point" - end - end + @stop_area_copy = StopAreaCopy.new(:hierarchy => params[:hierarchy], :source => parent) new! end -# TODO + def create @stop_area_copy = StopAreaCopy.new(params[:stop_area_copy]) + @stop_area = parent if @stop_area_copy.save redirect_to referential_stop_area_path( @referential,parent ), notice: I18n.t("stop_area_copies.new.success") else |
