2010-06-03 15:32:40 +00:00
|
|
|
# Locomotive::Application.routes.draw do |map|
|
2010-07-30 21:27:41 +00:00
|
|
|
Rails.application.routes.draw do
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2010-04-13 14:26:40 +00:00
|
|
|
# admin authentication
|
2010-06-10 22:07:59 +00:00
|
|
|
devise_for :admin, :class_name => 'Account', :controllers => { :sessions => 'admin/sessions', :passwords => 'admin/passwords' }
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-01-11 11:42:12 +00:00
|
|
|
as :admin do
|
|
|
|
get '/admin' => 'admin/sessions#new'
|
|
|
|
end
|
|
|
|
|
2010-04-13 14:26:40 +00:00
|
|
|
# admin interface for each website
|
|
|
|
namespace 'admin' do
|
2011-01-11 11:42:12 +00:00
|
|
|
root :to => 'sessions#new'
|
2010-07-22 22:10:40 +00:00
|
|
|
|
|
|
|
resources :pages do
|
2010-05-02 23:33:17 +00:00
|
|
|
put :sort, :on => :member
|
2010-07-22 22:10:40 +00:00
|
|
|
get :get_path, :on => :collection
|
|
|
|
end
|
|
|
|
|
2010-05-02 23:33:17 +00:00
|
|
|
resources :snippets
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2010-07-28 00:42:33 +00:00
|
|
|
resources :sites
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-07-06 18:48:04 +00:00
|
|
|
resource :current_site, :controller => 'current_site'
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
resources :accounts
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-07-06 18:48:04 +00:00
|
|
|
resource :my_account, :controller => 'my_account'
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2010-05-11 21:38:52 +00:00
|
|
|
resources :memberships
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2010-10-10 21:59:56 +00:00
|
|
|
resources :theme_assets do
|
|
|
|
get :all, :action => 'index', :on => :collection, :defaults => { :all => true }
|
|
|
|
end
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-06-21 13:12:20 +00:00
|
|
|
resources :assets
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2010-05-24 00:18:23 +00:00
|
|
|
resources :content_types
|
2010-07-22 22:10:40 +00:00
|
|
|
|
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-07-22 22:10:40 +00:00
|
|
|
|
2010-06-22 13:04:40 +00:00
|
|
|
resources :api_contents, :path => 'api/:slug/contents', :controller => 'api_contents', :only => [:create]
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2010-06-22 13:04:40 +00:00
|
|
|
resources :custom_fields, :path => 'custom/:parent/:slug/fields'
|
2010-07-28 00:42:33 +00:00
|
|
|
|
|
|
|
resources :cross_domain_sessions, :only => [:new, :create]
|
2010-09-28 22:08:11 +00:00
|
|
|
|
2011-07-04 13:25:02 +00:00
|
|
|
resource :import, :only => [:new, :show, :create], :controller => 'import'
|
|
|
|
|
|
|
|
resource :export, :only => [:new], :controller => 'export'
|
2010-10-27 00:11:44 +00:00
|
|
|
|
|
|
|
# installation guide
|
|
|
|
match '/installation' => 'installation#show', :defaults => { :step => 1 }, :as => :installation
|
|
|
|
match '/installation/:step' => 'installation#show', :as => :installation_step
|
|
|
|
|
2010-04-11 23:59:18 +00:00
|
|
|
end
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2010-07-13 00:46:17 +00:00
|
|
|
# sitemap
|
|
|
|
match '/sitemap.xml' => 'admin/sitemaps#show', :format => 'xml'
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-07-05 20:34:15 +00:00
|
|
|
# robots.txt
|
|
|
|
match '/robots.txt' => 'admin/robots#show', :format => 'txt'
|
|
|
|
|
2010-05-12 00:16:39 +00:00
|
|
|
# magic urls
|
2010-06-03 15:32:40 +00:00
|
|
|
match '/' => 'admin/rendering#show'
|
2010-09-02 23:03:20 +00:00
|
|
|
match '*path/edit' => 'admin/rendering#show', :defaults => { :editing => true }
|
2010-06-03 15:32:40 +00:00
|
|
|
match '*path' => 'admin/rendering#show'
|
2010-03-29 22:01:47 +00:00
|
|
|
end
|