2011-04-13 10:19:51 +00:00
|
|
|
PrototypeR4::Application.routes.draw do
|
2011-07-12 08:00:57 +00:00
|
|
|
|
2010-03-08 08:04:05 +00:00
|
|
|
devise_for :users
|
2011-08-18 05:43:33 +00:00
|
|
|
|
|
|
|
# routes for sinatra app
|
|
|
|
match '/site/set_registered', :to => CentralServerExchangeApp
|
|
|
|
match '/site/public_key', :to => CentralServerExchangeApp
|
2011-08-23 07:01:22 +00:00
|
|
|
match '/site/update', :to => GithubApp
|
2011-08-18 05:43:33 +00:00
|
|
|
match '/purchase/design', :to => CentralServerExchangeApp
|
|
|
|
|
|
|
|
# routes for admin
|
2011-04-13 10:19:51 +00:00
|
|
|
namespace :admin do
|
|
|
|
resources :assets
|
2011-07-19 10:31:53 +00:00
|
|
|
resources :designs do
|
2011-08-11 10:20:16 +00:00
|
|
|
get 'upload_package' ,:on => :collection
|
|
|
|
post 'upload_package' ,:on => :collection
|
2011-07-19 10:31:53 +00:00
|
|
|
member do
|
2011-07-27 09:23:01 +00:00
|
|
|
post 'edit_file' => 'designs#edit_file'
|
2011-07-19 10:31:53 +00:00
|
|
|
end
|
|
|
|
end
|
2011-08-18 05:43:33 +00:00
|
|
|
resources :items
|
2011-05-13 01:08:42 +00:00
|
|
|
resources :links do
|
|
|
|
member do
|
|
|
|
get 'delete'
|
|
|
|
end
|
|
|
|
end
|
2011-06-01 04:00:41 +00:00
|
|
|
resources :pages do
|
|
|
|
member do
|
|
|
|
get 'delete'
|
|
|
|
end
|
|
|
|
end
|
2011-05-25 06:50:56 +00:00
|
|
|
resources :page_parts
|
2011-08-18 05:43:33 +00:00
|
|
|
resources :purchases do
|
|
|
|
member do
|
|
|
|
get 'download'
|
|
|
|
end
|
|
|
|
end
|
2011-08-22 05:45:21 +00:00
|
|
|
resources :sites
|
2011-04-13 10:19:51 +00:00
|
|
|
resources :snippets
|
|
|
|
resources :translations
|
2011-02-01 07:12:23 +00:00
|
|
|
resources :user_info_models
|
|
|
|
resources :user_role_models
|
2011-04-13 10:19:51 +00:00
|
|
|
end
|
2011-08-18 05:43:33 +00:00
|
|
|
# end admin
|
2011-04-13 10:19:51 +00:00
|
|
|
|
|
|
|
namespace :panel do
|
|
|
|
resources :users
|
|
|
|
end
|
|
|
|
|
2011-08-18 05:43:33 +00:00
|
|
|
# routes for gridfs files
|
|
|
|
match "/gridfs/*path" => "gridfs#serve"
|
2011-04-13 10:19:51 +00:00
|
|
|
|
2011-08-18 05:43:33 +00:00
|
|
|
# routes for pages to generate
|
2011-04-12 07:21:25 +00:00
|
|
|
match '*page_name' => 'pages#show', :as => :page, :constraints => lambda{|request|
|
|
|
|
!request.path.starts_with?("/panel")
|
|
|
|
}
|
2011-04-13 10:19:51 +00:00
|
|
|
|
|
|
|
root :to => 'pages#index'
|
|
|
|
|
2009-05-07 16:53:18 +00:00
|
|
|
end
|