-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #73 part 2. - Added Setting.base_url scope to routes
- Loading branch information
1 parent
7e10fc2
commit 2dc8316
Showing
1 changed file
with
107 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,130 +1,131 @@ | ||
FatFreeCRM::Application.routes.draw do | ||
scope Setting.base_url.blank? ? "/" : Setting.base_url do | ||
root :to => 'home#index' | ||
|
||
root :to => 'home#index' | ||
match 'activities' => 'home#index' | ||
match 'admin' => 'admin/users#index', :as => :admin | ||
match 'login' => 'authentications#new', :as => :login | ||
match 'logout' => 'authentications#destroy', :as => :logout | ||
match 'options' => 'home#options' | ||
match 'profile' => 'users#show', :as => :profile | ||
match 'signup' => 'users#new', :as => :signup | ||
match 'timeline' => 'home#timeline', :as => :timeline | ||
match 'timezone' => 'home#timezone', :as => :timezone | ||
match 'toggle' => 'home#toggle' | ||
|
||
match 'activities' => 'home#index' | ||
match 'admin' => 'admin/users#index', :as => :admin | ||
match 'login' => 'authentications#new', :as => :login | ||
match 'logout' => 'authentications#destroy', :as => :logout | ||
match 'options' => 'home#options' | ||
match 'profile' => 'users#show', :as => :profile | ||
match 'signup' => 'users#new', :as => :signup | ||
match 'timeline' => 'home#timeline', :as => :timeline | ||
match 'timezone' => 'home#timezone', :as => :timezone | ||
match 'toggle' => 'home#toggle' | ||
resource :authentication | ||
resources :comments | ||
resources :emails | ||
resources :passwords | ||
|
||
resource :authentication | ||
resources :comments | ||
resources :emails | ||
resources :passwords | ||
|
||
resources :accounts do | ||
collection do | ||
get :options | ||
get :search | ||
post :auto_complete | ||
post :redraw | ||
end | ||
member do | ||
put :attach | ||
post :discard | ||
end | ||
end | ||
|
||
resources :campaigns do | ||
collection do | ||
get :filter | ||
get :options | ||
get :search | ||
post :auto_complete | ||
post :redraw | ||
end | ||
member do | ||
put :attach | ||
post :discard | ||
end | ||
end | ||
|
||
resources :contacts do | ||
collection do | ||
get :options | ||
get :search | ||
post :auto_complete | ||
post :redraw | ||
end | ||
member do | ||
put :attach | ||
post :discard | ||
resources :accounts do | ||
collection do | ||
get :options | ||
get :search | ||
post :auto_complete | ||
post :redraw | ||
end | ||
member do | ||
put :attach | ||
post :discard | ||
end | ||
end | ||
end | ||
|
||
resources :leads do | ||
collection do | ||
get :filter | ||
get :options | ||
get :search | ||
post :auto_complete | ||
post :redraw | ||
end | ||
member do | ||
get :convert | ||
post :discard | ||
put :attach | ||
put :promote | ||
put :reject | ||
resources :campaigns do | ||
collection do | ||
get :filter | ||
get :options | ||
get :search | ||
post :auto_complete | ||
post :redraw | ||
end | ||
member do | ||
put :attach | ||
post :discard | ||
end | ||
end | ||
end | ||
|
||
resources :opportunities do | ||
collection do | ||
get :filter | ||
get :options | ||
get :search | ||
post :auto_complete | ||
post :redraw | ||
end | ||
member do | ||
put :attach | ||
post :discard | ||
resources :contacts do | ||
collection do | ||
get :options | ||
get :search | ||
post :auto_complete | ||
post :redraw | ||
end | ||
member do | ||
put :attach | ||
post :discard | ||
end | ||
end | ||
end | ||
|
||
resources :tasks do | ||
collection do | ||
get :filter | ||
post :auto_complete | ||
end | ||
member do | ||
put :complete | ||
resources :leads do | ||
collection do | ||
get :filter | ||
get :options | ||
get :search | ||
post :auto_complete | ||
post :redraw | ||
end | ||
member do | ||
get :convert | ||
post :discard | ||
put :attach | ||
put :promote | ||
put :reject | ||
end | ||
end | ||
end | ||
|
||
resources :users do | ||
member do | ||
get :avatar | ||
get :password | ||
put :upload_avatar | ||
put :change_password | ||
resources :opportunities do | ||
collection do | ||
get :filter | ||
get :options | ||
get :search | ||
post :auto_complete | ||
post :redraw | ||
end | ||
member do | ||
put :attach | ||
post :discard | ||
end | ||
end | ||
end | ||
|
||
namespace :admin do | ||
resources :users do | ||
resources :tasks do | ||
collection do | ||
get :search | ||
get :filter | ||
post :auto_complete | ||
end | ||
member do | ||
get :confirm | ||
put :suspend | ||
put :reactivate | ||
put :complete | ||
end | ||
end | ||
|
||
resources :settings | ||
resources :plugins | ||
end | ||
resources :users do | ||
member do | ||
get :avatar | ||
get :password | ||
put :upload_avatar | ||
put :change_password | ||
end | ||
end | ||
|
||
namespace :admin do | ||
resources :users do | ||
collection do | ||
get :search | ||
post :auto_complete | ||
end | ||
member do | ||
get :confirm | ||
put :suspend | ||
put :reactivate | ||
end | ||
end | ||
|
||
match '/:controller(/:action(/:id))' | ||
resources :settings | ||
resources :plugins | ||
end | ||
|
||
match '/:controller(/:action(/:id))' | ||
end | ||
end | ||
|