summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
commitb80bd744ad873f6fc43018bc4bfb90677de167bd (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /config/routes.rb
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
Start of GS5.
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb375
1 files changed, 375 insertions, 0 deletions
diff --git a/config/routes.rb b/config/routes.rb
new file mode 100644
index 0000000..64d64cf
--- /dev/null
+++ b/config/routes.rb
@@ -0,0 +1,375 @@
+Gemeinschaft42c::Application.routes.draw do
+ resources :automatic_call_distributors
+
+ resources :gs_cluster_sync_log_entries
+
+ resources :gs_nodes do
+ member do
+ get 'sync'
+ end
+ end
+
+ resources :gui_functions
+
+ namespace :api do
+ resources :rows
+ end
+
+ resources :acd_agents, :only => [] do
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ end
+
+ resources :automatic_call_distributors, :only => [] do
+ resources :acd_agents
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ end
+
+ resources :hunt_group_members, :only => [] do
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ end
+
+ resources :hunt_groups, :only => [] do
+ resources :hunt_group_members
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ end
+
+ if CALLTHROUGH_HAS_WHITELISTS == true
+ resources :whitelists, :only => [] do
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ end
+ end
+
+ resources :access_authorizations, :only => [] do
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ end
+
+ resources :fax_documents
+
+ resources :fax_accounts, :only => [] do
+ resources :fax_documents
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ end
+
+ resources :gemeinschaft_setups, :only => [:new, :create]
+
+ resources :phone_number_ranges, :only => [] do
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ end
+
+ resources :conferences, :only => [] do
+ resources :conference_invitees
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ end
+
+ resources :phone_numbers, :only => [] do
+ resources :call_forwards
+ resources :ringtones
+ end
+
+ resources :addresses
+
+ resources :sip_domains
+
+ resources :manufacturers do
+ resources :phone_models
+ end
+
+ # Log-in / log-out / sign-up:
+ get "log_in" => "sessions#new" , :as => "log_in"
+ get "log_out" => "sessions#destroy" , :as => "log_out"
+ get "sign_up" => "users#new" , :as => "sign_up"
+ get "login" => "sessions#new" , :as => "log_in"
+ get "logout" => "sessions#destroy" , :as => "log_out"
+ get "signup" => "users#new" , :as => "sign_up"
+
+ # Provisioning:
+ # Snom
+ get "config_snom/:phone/:sip_account/idle_screen" => "config_snom#idle_screen"
+ get "config_snom/:phone/:sip_account/log_in" => "config_snom#log_in"
+ get "config_snom/:phone/:sip_account/phone_book" => "config_snom#phone_book"
+ get "config_snom/:phone/:sip_account/call_history" => "config_snom#call_history"
+ get "config_snom/:phone/:sip_account/call_history_:type" => "config_snom#call_history"
+ get "config_snom/:phone/:sip_account/call_forwarding" => "config_snom#call_forwarding"
+ get "config_snom/exit" => "config_snom#exit"
+ get "config_snom/:phone/exit" => "config_snom#exit"
+ get "config_snom/:phone/:sip_account/exit" => "config_snom#exit"
+ get "config_snom/:phone/:sip_account/hunt_group" => "config_snom#hunt_group"
+ get "config_snom/:phone/state_settings" => "config_snom#state_settings"
+ get "config_snom/:phone/log_out" => "config_snom#log_out"
+ get "config_snom/:phone/:sip_account/log_out" => "config_snom#log_out"
+ get "config_snom/:phone/log_in" => "config_snom#log_in"
+ get "config_snom/:phone/:sip_account/log_in" => "config_snom#log_in"
+ get "config_snom/:phone/:sip_account/acd" => "config_snom#acd"
+
+ # Siemens
+ get "config_siemens/:phone/call_history" => "config_siemens#call_history"
+ get "config_siemens/:phone/:sip_account/call_history" => "config_siemens#call_history"
+ get "config_siemens/:phone/:sip_account/call_forwarding" => "config_siemens#call_forwarding"
+ get "config_siemens/:phone/hunt_group" => "config_siemens#hunt_group"
+ get "config_siemens/:phone/:sip_account/hunt_group" => "config_siemens#hunt_group"
+ get "config_siemens/:phone/menu" => "config_siemens#menu"
+ get "config_siemens/:phone/:sip_account/menu" => "config_siemens#menu"
+
+ #Polycom
+ get "config_polycom/:phone/:sip_account/phone_book" => "config_polycom#phone_book"
+ get "config_polycom/:phone/:sip_account/call_history" => "config_polycom#call_history"
+ get "config_polycom/:phone/:sip_account/idle_screen" => "config_polycom#idle_screen"
+
+ # Unified path for Snom phones.
+ # Enter e.g. "http://192.168.1.105:3000/settings"
+ # as the Setting URL (Advanced -> Update).
+ match 'snom-:provisioning_key' => 'config_snom#show',
+ :via => [:get],
+ :format => 'xml'
+ match 'settings-:mac_address' => 'config_snom#show',
+ :constraints => { :mac_address => /000413[0-9A-F]{6}/i },
+ :via => [:get],
+ :format => 'xml'
+ match "/DeploymentService/LoginService" => 'config_siemens#index',
+ :via => [:post],
+ :format => 'xml'
+ match ':mac_address.cfg' => 'config_polycom#config_files',
+ :constraints => { :mac_address => /0004f2[0-9A-F]{6}/i },
+ :via => [:get],
+ :format => 'xml'
+ match 'settings-:mac_address.cfg' => 'config_polycom#settings',
+ :constraints => { :mac_address => /0004f2[0-9A-F]{6}/i },
+ :via => [:get],
+ :format => 'xml'
+ match ':mac_address-directory' => 'config_polycom#settings_directory',
+ :constraints => { :mac_address => /0004f2[0-9A-F]{6}/i },
+ :via => [:get],
+ :format => 'xml'
+
+ # Snom default path.
+ # e.g. "/snom360-000413000000.htm"
+ # Enter e.g. "http://192.168.1.105:3000"
+ # as the Setting URL (Advanced -> Update).
+ match 'snom:model-:mac_address' => 'config_snom#show',
+ :constraints => { :mac_address => /000413[0-9A-F]{6}/i, :model => /[0-9]{3}/ },
+ :via => [:get],
+ :format => 'xml'
+
+ resources :sessions
+
+ get "page/index"
+ get "page/conference"
+
+ root :to => "page#index"
+
+ get "wizards/new_initial_setup"
+ post "wizards/create_initial_setup"
+
+ resources :users do
+ # Display all phone books that the current user owns:
+ resources :phone_books
+ resources :user_groups, :only => [ :index, :show ]
+ resources :sip_accounts
+ resources :phones
+ resources :conferences
+ resources :fax_accounts
+ resources :system_messages, :except => [ :edit, :update, :destroy ]
+ end
+
+ resources :user_groups do
+ # Display all phone books that the group of the current user owns:
+ resources :phone_books
+ resources :sip_accounts
+ resources :fax_accounts
+ resources :user_group_memberships
+ end
+
+ resources :tenants do
+ # Display all phone books that the tenant of the current user owns:
+ resources :phone_books
+ resources :users do
+ get "destroy_avatar"
+ end
+ resources :user_groups
+ resources :sip_accounts
+ resources :phones
+ resources :conferences
+ resources :phone_number_ranges
+ resources :callthroughs
+ if CALLTHROUGH_HAS_WHITELISTS == true
+ resources :whitelists
+ end
+ resources :hunt_groups
+ resources :automatic_call_distributors
+ end
+
+ resources :callthroughs, :only => [] do
+ resources :access_authorizations
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ if CALLTHROUGH_HAS_WHITELISTS == true
+ resources :whitelists
+ end
+ end
+
+ resources :sip_accounts, :only => [] do
+ resources :phones_sip_accounts
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ resources :softkeys do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ resources :call_histories do
+ collection do
+ delete 'destroy_multiple'
+ end
+ member do
+ put 'call'
+ end
+ end
+ resources :voicemail_messages do
+ collection do
+ delete 'destroy_multiple'
+ end
+ member do
+ put 'call'
+ put 'mark_read'
+ put 'mark_unread'
+ end
+ end
+ resources :voicemail_settings
+ end
+
+ resources :phones, :only => [] do
+ resources :phone_sip_accounts
+ end
+
+ # Display all phone book entries that the current user can access:
+ resources :phone_book_entries, :only => [ :index, :show ] do
+ resources :phone_numbers do
+ member do
+ put 'move_higher'
+ put 'move_lower'
+ end
+ end
+ end
+
+ # Display all phone books that the current user can access:
+ resources :phone_books, :only => [ :index, :show ] do
+ resources :phone_book_entries
+ end
+
+ # Search
+ post "search" => "phone_book_entries#index", :as => 'search'
+
+ # http://0.0.0.0:3000/phone_books/3?name=Wintermeyer
+
+
+ # The priority is based upon order of creation:
+ # first created -> highest priority.
+
+ # Sample of regular route:
+ # match 'products/:id' => 'catalog#view'
+ # Keep in mind you can assign values other than :controller and :action
+
+ # Sample of named route:
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
+ # This route can be invoked with purchase_url(:id => product.id)
+
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
+ # resources :products
+
+ # Sample resource route with options:
+ # resources :products do
+ # member do
+ # get 'short'
+ # post 'toggle'
+ # end
+ #
+ # collection do
+ # get 'sold'
+ # end
+ # end
+
+ # Sample resource route with sub-resources:
+ # resources :products do
+ # resources :comments, :sales
+ # resource :seller
+ # end
+
+ # Sample resource route with more complex sub-resources
+ # resources :products do
+ # resources :comments
+ # resources :sales do
+ # get 'recent', :on => :collection
+ # end
+ # end
+
+ # Sample resource route within a namespace:
+ # namespace :admin do
+ # # Directs /admin/products/* to Admin::ProductsController
+ # # (app/controllers/admin/products_controller.rb)
+ # resources :products
+ # end
+
+ # You can have the root of your site routed with "root"
+ # just remember to delete public/index.html.
+ # root :to => 'welcome#index'
+
+ # See how all your routes lay out with "rake routes"
+
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
+ # Note: This route will make all actions in every controller accessible via GET requests.
+ # match ':controller(/:action(/:id(.:format)))'
+end