2015-09-22 05:56:02 +00:00
|
|
|
Rails.application.routes.draw do
|
|
|
|
|
|
|
|
locales = Site.first.in_use_locales rescue I18n.available_locales
|
|
|
|
|
|
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
|
|
|
namespace :admin do
|
|
|
|
post "space/add_floor", to: 'spaces#add_floor'
|
|
|
|
post "space/update_floor", to: 'spaces#update_floor'
|
2015-09-24 15:43:47 +00:00
|
|
|
post "space/save_floor_layout", to: 'spaces#save_floor_layout'
|
|
|
|
|
|
|
|
post "space/create_floor_unit", to: 'spaces#create_floor_unit'
|
|
|
|
patch "space/update_floor_unit", to: 'spaces#update_floor_unit'
|
|
|
|
patch "space/update_sub_unit", to: 'spaces#update_sub_unit'
|
|
|
|
post "space/save_unit_layout", to: 'spaces#save_unit_layout'
|
|
|
|
|
|
|
|
post "space/upload_sub_unit_image", to: 'spaces#upload_sub_unit_image'
|
|
|
|
post "space/create_sub_unit", to: 'spaces#create_sub_unit'
|
|
|
|
|
|
|
|
|
2015-09-22 05:56:02 +00:00
|
|
|
get "spaces/:building_id/:floor_id/units", to: 'spaces#units'
|
2015-09-24 15:43:47 +00:00
|
|
|
get "spaces/floor/:floor_id/add_floor_unit", to: 'spaces#add_floor_unit'
|
|
|
|
|
2015-09-22 05:56:02 +00:00
|
|
|
get "spaces/floor/:floor_id/layout", to: 'spaces#floor_layout'
|
2015-09-24 15:43:47 +00:00
|
|
|
get "spaces/unit/:unit_id/layout", to: 'spaces#unit_layout'
|
|
|
|
|
|
|
|
get "spaces/unit/:unit_id/edit", to: 'spaces#edit_floor_unit'
|
|
|
|
get "spaces/:floor_id/:unit_id/sub_units", to: 'spaces#sub_units'
|
|
|
|
|
|
|
|
get "spaces/unit/:unit_id/add_sub_unit", to: 'spaces#add_sub_unit'
|
|
|
|
get "spaces/sub_unit/:sub_unit_id/edit", to: 'spaces#edit_sub_unit'
|
2015-11-24 05:51:47 +00:00
|
|
|
delete "spaces/sub_unit/:sub_unit_id/delete", to: 'spaces#destroy_sub_unit'
|
2015-09-24 15:43:47 +00:00
|
|
|
|
|
|
|
delete "spaces/unit/:unit_id/delete", to: 'spaces#delete_floor_unit'
|
2015-09-22 05:56:02 +00:00
|
|
|
delete "spaces/floor/:floor_id/delete", to: 'spaces#delete_floor'
|
|
|
|
resources :spaces do
|
|
|
|
get "floors"
|
|
|
|
end
|
|
|
|
end
|
2015-10-13 10:28:29 +00:00
|
|
|
get "/xhr/spaces/get_floor_units", to: 'spaces#floor_units'
|
|
|
|
get "/xhr/spaces/get_floor_sub_units", to: 'spaces#floor_sub_units'
|
|
|
|
get "/xhr/spaces/showcase", to: 'spaces#showcase'
|
2015-09-22 05:56:02 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|