2010-06-03 15:32:40 +00:00
|
|
|
# Locomotive::Application.routes.draw do |map|
|
|
|
|
Rails.application.routes.draw do |map|
|
2010-04-11 23:59:18 +00:00
|
|
|
|
|
|
|
constraints(Locomotive::Routing::DefaultConstraint) do
|
|
|
|
root :to => 'home#show'
|
2010-04-13 14:26:40 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# admin authentication
|
2010-06-10 22:07:59 +00:00
|
|
|
devise_for :admin, :class_name => 'Account', :controllers => { :sessions => 'admin/sessions', :passwords => 'admin/passwords' }
|
|
|
|
|
2010-04-13 14:26:40 +00:00
|
|
|
# admin interface for each website
|
|
|
|
namespace 'admin' do
|
2010-04-24 00:32:36 +00:00
|
|
|
root :to => 'pages#index'
|
|
|
|
|
2010-05-02 23:33:17 +00:00
|
|
|
resources :pages do
|
|
|
|
put :sort, :on => :member
|
|
|
|
get :get_path, :on => :collection
|
|
|
|
end
|
|
|
|
|
2010-05-09 12:44:53 +00:00
|
|
|
resources :layouts do
|
|
|
|
resources :page_parts, :only => :index
|
|
|
|
end
|
2010-05-02 23:33:17 +00:00
|
|
|
resources :snippets
|
2010-04-24 00:32:36 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
resources :site
|
|
|
|
|
|
|
|
resource :current_site
|
|
|
|
|
|
|
|
resources :accounts
|
|
|
|
|
|
|
|
resource :my_account
|
|
|
|
|
2010-05-11 21:38:52 +00:00
|
|
|
resources :memberships
|
|
|
|
|
|
|
|
resources :theme_assets
|
2010-05-12 00:16:39 +00:00
|
|
|
|
|
|
|
resources :asset_collections
|
|
|
|
|
2010-06-22 13:04:40 +00:00
|
|
|
resources :assets, :path => 'asset_collections/:collection_id/assets'
|
2010-05-24 00:18:23 +00:00
|
|
|
|
|
|
|
resources :content_types
|
|
|
|
|
2010-06-22 13:04:40 +00:00
|
|
|
resources :contents, :path => 'content_types/:slug/contents' do
|
2010-05-25 00:32:12 +00:00
|
|
|
put :sort, :on => :collection
|
|
|
|
end
|
2010-06-10 13:30:22 +00:00
|
|
|
|
2010-06-22 13:04:40 +00:00
|
|
|
resources :api_contents, :path => 'api/:slug/contents', :controller => 'api_contents', :only => [:create]
|
2010-06-10 13:30:22 +00:00
|
|
|
|
2010-06-22 13:04:40 +00:00
|
|
|
resources :custom_fields, :path => 'custom/:parent/:slug/fields'
|
2010-04-11 23:59:18 +00:00
|
|
|
end
|
|
|
|
|
2010-05-12 00:16:39 +00:00
|
|
|
# magic urls
|
2010-06-03 15:32:40 +00:00
|
|
|
match '/' => 'admin/rendering#show'
|
|
|
|
match '*path' => 'admin/rendering#show'
|
2010-03-29 22:01:47 +00:00
|
|
|
end
|