aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/stop_areas_controller.rb
diff options
context:
space:
mode:
authorLuc Donnet2014-10-10 10:21:54 +0200
committerLuc Donnet2014-10-10 10:21:54 +0200
commitceda2215d35e1ac2923af62f3f00f2feb214764e (patch)
tree1951404af48e750d757ed3cdb47bfc35677e39b4 /app/controllers/stop_areas_controller.rb
parent5e79dbe396a2e0cebca960b7f540fc14011263b0 (diff)
downloadchouette-core-ceda2215d35e1ac2923af62f3f00f2feb214764e.tar.bz2
Fix layout when no sidebar Refs #0029169
Diffstat (limited to 'app/controllers/stop_areas_controller.rb')
-rw-r--r--app/controllers/stop_areas_controller.rb19
1 files changed, 16 insertions, 3 deletions
diff --git a/app/controllers/stop_areas_controller.rb b/app/controllers/stop_areas_controller.rb
index 560b20626..b164f4bc8 100644
--- a/app/controllers/stop_areas_controller.rb
+++ b/app/controllers/stop_areas_controller.rb
@@ -68,6 +68,13 @@ class StopAreasController < ChouetteController
end
end
+ def create
+ @map = StopAreaMap.new( Chouette::StopArea.new).with_helpers(self)
+ @map.editable = true
+
+ create!
+ end
+
def show
map.editable = false
@access_points = @stop_area.access_points
@@ -83,14 +90,20 @@ class StopAreasController < ChouetteController
end
def edit
- stop_area.position ||= stop_area.default_position
-
- map.editable = true
edit! do
+ stop_area.position ||= stop_area.default_position
+ map.editable = true
build_breadcrumb :edit
end
end
+ def update
+ stop_area.position ||= stop_area.default_position
+ map.editable = true
+
+ update!
+ end
+
def default_geometry
count = referential.stop_areas.without_geometry.default_geometry!
flash[:notice] = I18n.translate("stop_areas.default_geometry_success", :count => count)