2012-03-05 08:19:08 +00:00
|
|
|
Orbit::Application.routes.draw do
|
2011-07-12 08:00:57 +00:00
|
|
|
|
2012-10-26 09:42:14 +00:00
|
|
|
devise_for :users
|
2012-05-07 02:23:16 +00:00
|
|
|
mount Resque::Server, :at => "/admin/resque"
|
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-11-14 02:22:31 +00:00
|
|
|
match '/purchase/:type', :to => CentralServerExchangeApp
|
2011-10-20 02:06:06 +00:00
|
|
|
|
2012-02-13 05:02:52 +00:00
|
|
|
match 'load_orbit_bar' => 'pages#load_orbit_bar'
|
|
|
|
|
2011-08-18 05:43:33 +00:00
|
|
|
# routes for admin
|
2011-04-13 10:19:51 +00:00
|
|
|
namespace :admin do
|
2012-04-13 04:10:47 +00:00
|
|
|
mount Resque::Server.new, :at => "/resque"
|
2012-05-16 03:07:11 +00:00
|
|
|
resources :assets do
|
|
|
|
collection do
|
2012-05-16 22:28:29 +00:00
|
|
|
get 'file_upload'
|
2012-08-13 16:59:01 +00:00
|
|
|
get 'delete'
|
2012-05-16 03:07:11 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
resources :asset_categories
|
2012-05-16 10:19:41 +00:00
|
|
|
resources :asset_tags
|
2012-01-19 09:47:52 +00:00
|
|
|
resources :app_auths
|
2012-02-09 09:48:51 +00:00
|
|
|
resources :object_auths do
|
2012-05-11 08:46:36 +00:00
|
|
|
match 'new_interface/:ob_type/:title/new' => "object_auths_new_interface#new" ,:as => :init_ob_auth,:via => :get
|
|
|
|
match 'new_interface' => "object_auths_new_interface#setting" ,:as => :ob_auth,:via => :get
|
|
|
|
match 'new_interface' => "object_auths_new_interface#update_setting" ,:as => :ob_auth,:via => :post
|
|
|
|
match 'new_interface' => "object_auths_new_interface#user_list" ,:as => :ob_auth_show,:via => :put
|
|
|
|
|
2012-02-09 11:04:06 +00:00
|
|
|
collection do
|
|
|
|
match 'new/:type/:obj_id',:action => 'new',:via => "get",:as => :init
|
|
|
|
end
|
2012-02-09 09:48:51 +00:00
|
|
|
member do
|
2012-02-09 11:04:06 +00:00
|
|
|
match ':id/create_role',:action => 'create_role',:via => "post",:as => :create_role
|
2012-02-09 09:48:51 +00:00
|
|
|
match 'remove/:type/:target_id' ,:action=> 'remove_role',:via => "delete",:as =>:remove
|
|
|
|
end
|
|
|
|
end
|
2012-02-07 08:16:48 +00:00
|
|
|
|
2012-04-17 08:03:48 +00:00
|
|
|
|
2012-05-01 10:23:42 +00:00
|
|
|
match 'ad_banners/:id/preview' => 'ad_banners#realtime_preview',:as => :realtime_preview_ad_banner,:via => :put
|
2012-05-16 08:42:43 +00:00
|
|
|
match 'ad_banners/:id/rename' => 'ad_banners#rename',:as => :rename_ad_banner,:via => :post
|
|
|
|
|
2012-04-01 15:39:49 +00:00
|
|
|
resources :ad_banners do
|
|
|
|
collection do
|
|
|
|
match 'new_ad_image' => 'ad_images#new',:as => :new_ad_image,:via => :get
|
|
|
|
match 'new_ad_image' => 'ad_images#create',:as => :create_ad_image,:via => :post
|
|
|
|
end
|
|
|
|
resources :ad_images ,:except => [:show,:index]
|
|
|
|
end
|
2012-02-13 05:02:52 +00:00
|
|
|
resources :dashboards
|
2011-07-19 10:31:53 +00:00
|
|
|
resources :designs do
|
2011-09-01 11:08:45 +00:00
|
|
|
collection do
|
|
|
|
get 'upload_package'
|
2012-08-13 16:59:01 +00:00
|
|
|
get 'delete'
|
2011-09-01 11:08:45 +00:00
|
|
|
post 'upload_package'
|
|
|
|
end
|
2011-07-19 10:31:53 +00:00
|
|
|
member do
|
2011-07-27 09:23:01 +00:00
|
|
|
post 'edit_file' => 'designs#edit_file'
|
2012-10-24 10:40:38 +00:00
|
|
|
post 'update_file' => 'designs#update_file'
|
|
|
|
post 'upload_image' => 'designs#upload_image'
|
2011-07-19 10:31:53 +00:00
|
|
|
end
|
|
|
|
end
|
2011-12-23 10:34:21 +00:00
|
|
|
resources :infos do
|
|
|
|
get 'add_attribute_field'
|
|
|
|
end
|
2011-08-18 05:43:33 +00:00
|
|
|
resources :items
|
2012-05-11 02:00:45 +00:00
|
|
|
match 'update_position' => 'items#update_position'
|
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'
|
2011-08-25 00:13:38 +00:00
|
|
|
get 'reload_themes'
|
2011-06-01 04:00:41 +00:00
|
|
|
end
|
|
|
|
end
|
2011-12-23 10:34:21 +00:00
|
|
|
resources :module_apps do
|
2012-05-11 08:46:36 +00:00
|
|
|
match 'manager_auth_proc' => "module_apps_new_interface#setting" ,:as => :manager_auth_proc,:via => :get
|
|
|
|
match 'manager_auth_proc' => "module_apps_new_interface#update_setting" ,:as => :manager_auth_proc,:via => :post
|
|
|
|
match 'manager_auth_proc' => "module_apps_new_interface#user_list" ,:as => :manager_auth_show,:via => :put
|
2012-01-19 09:47:52 +00:00
|
|
|
resources :app_auths do
|
|
|
|
member do
|
|
|
|
match 'remove/:type/:target_id' ,:action=> 'remove',:via => "delete",:as =>:remove
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-12-23 10:34:21 +00:00
|
|
|
member do
|
2012-01-13 10:20:04 +00:00
|
|
|
match 'assign_manager' ,:action=> 'assign_manager',:via => "post",:as =>:assign_manager
|
|
|
|
match 'assign_sub_manager' ,:action=> 'assign_sub_manager',:via => "post",:as =>:assign_sub_manager
|
|
|
|
|
|
|
|
match 'remove_manager/:app_manager_id' ,:action=> 'remove_manager',:via => "delete",:as =>:remove_manager
|
|
|
|
match 'remove_sub_manager/:app_sub_manager_id' ,:action=> 'remove_sub_manager',:via => "delete",:as =>:remove_sub_manager
|
2011-12-23 10:34:21 +00:00
|
|
|
get 'reload_frontend_pages'
|
|
|
|
end
|
|
|
|
end
|
2012-02-16 04:16:27 +00:00
|
|
|
resources :page_parts do
|
|
|
|
member do
|
|
|
|
get 'reload_widgets'
|
2012-07-26 08:39:29 +00:00
|
|
|
get 'reload_widget_styles'
|
2012-04-23 18:30:40 +00:00
|
|
|
get 'reload_r_tag_options'
|
2012-02-16 04:16:27 +00:00
|
|
|
end
|
|
|
|
end
|
2012-10-15 07:30:48 +00:00
|
|
|
resources :plugins
|
2011-08-18 05:43:33 +00:00
|
|
|
resources :purchases do
|
2011-11-16 07:21:31 +00:00
|
|
|
collection do
|
|
|
|
get 'install_app'
|
|
|
|
end
|
2011-08-18 05:43:33 +00:00
|
|
|
member do
|
|
|
|
get 'download'
|
|
|
|
end
|
|
|
|
end
|
2011-12-23 10:34:21 +00:00
|
|
|
resources :roles do
|
|
|
|
get 'add_sub_role'
|
|
|
|
get 'add_attribute_field'
|
|
|
|
end
|
2012-05-06 16:54:18 +00:00
|
|
|
resources :sites do
|
2012-07-25 07:10:15 +00:00
|
|
|
get 'mail_setting'
|
2012-05-06 16:54:18 +00:00
|
|
|
get 'site_info'
|
2012-07-25 07:10:15 +00:00
|
|
|
get 'sitemap'
|
2012-07-27 08:53:12 +00:00
|
|
|
get 'sitemap_frontend'
|
2012-07-26 07:37:29 +00:00
|
|
|
get 'sitemap_toggle', :on => :member
|
2012-05-06 16:54:18 +00:00
|
|
|
get 'system_info'
|
|
|
|
get 'ui_theme'
|
|
|
|
end
|
2012-02-14 16:32:20 +00:00
|
|
|
resources :tags
|
2011-11-17 12:02:58 +00:00
|
|
|
resources :users
|
2012-10-08 08:58:33 +00:00
|
|
|
resources :users_new_interface do
|
|
|
|
member do
|
|
|
|
get 'temp_edit'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
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
|
2012-06-04 10:00:06 +00:00
|
|
|
|
2012-03-28 10:53:30 +00:00
|
|
|
match '/desktop/'=>'desktop#index'
|
2012-06-04 10:00:06 +00:00
|
|
|
|
|
|
|
# Sinatra Routes start
|
|
|
|
|
2012-06-26 07:59:28 +00:00
|
|
|
# match '/desktop/desktop', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/app_manager', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/sections', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/settings', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/get_desktop_settings/', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/save_desktop_settings/', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/getgroups/', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/getsectionlist/', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/settingthemes/', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/settingsections/', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/getapplist/', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/newpositions/', :to => Desktopapp::DesktopApp
|
|
|
|
# match '/desktop/settingconnection/', :to => Desktopapp::DesktopApp
|
|
|
|
|
|
|
|
# match '/desktop/journal_p/', :to => Desktopapp::DesktopAppPublications
|
|
|
|
# match '/desktop/journal_p_list/', :to => Desktopapp::DesktopAppPublications
|
|
|
|
# match '/desktop/journal_p_add/', :to => Desktopapp::DesktopAppPublications
|
|
|
|
# match '/desktop_publications/getjournals', :to => Desktopapp::DesktopAppPublications
|
2012-06-04 10:00:06 +00:00
|
|
|
|
|
|
|
# match '/desktop/twitter/', :to => Desktopapp::Otheraccounts
|
|
|
|
# match '/desktop/forgmail/', :to => Desktopapp::Otheraccounts
|
|
|
|
# match '/desktop/getaccounts', :to => Desktopapp::Otheraccounts
|
|
|
|
# match '/desktop/save_account_info/', :to => Desktopapp::Otheraccounts
|
|
|
|
|
2012-06-26 07:59:28 +00:00
|
|
|
# match '/desktop_appstore/appstore', :to => Desktopapp::DesktopAppAppstore
|
|
|
|
# match '/desktop_appstore/widgets', :to => Desktopapp::DesktopAppAppstore
|
|
|
|
# match '/desktop_appstore/getuserwidgets', :to => Desktopapp::DesktopAppAppstore
|
|
|
|
# match '/desktop_appstore/widgets_settings', :to => Desktopapp::DesktopAppAppstore
|
2012-06-04 10:00:06 +00:00
|
|
|
|
|
|
|
# Sinatra Routes end
|
|
|
|
|
2012-06-26 07:59:28 +00:00
|
|
|
match '/desktop/desktop'=>'desktop#desktop'
|
|
|
|
match '/desktop/app_manager'=>'desktop#app_manager'
|
|
|
|
match '/desktop/sections'=>'desktop#sections'
|
|
|
|
match '/desktop/settings'=>'desktop#settings'
|
|
|
|
match '/desktop/get_desktop_settings/'=>'desktop#get_desktop_settings'
|
|
|
|
match '/desktop/save_desktop_settings/'=>'desktop#save_desktop_settings'
|
|
|
|
match '/desktop/getgroups/'=>'desktop#getgroups'
|
|
|
|
match '/desktop/getsectionlist/'=>'desktop#getsectionlist'
|
|
|
|
match '/desktop/settingthemes/'=>'desktop#settingthemes'
|
|
|
|
match '/desktop/settingsections/'=>'desktop#settingsections'
|
|
|
|
match '/desktop/getapplist/'=>'desktop#getapplist'
|
|
|
|
match '/desktop/newpositions/'=>'desktop#newpositions'
|
|
|
|
match '/desktop/settingconnection/'=>'desktop#settingconnection'
|
|
|
|
|
|
|
|
|
|
|
|
match '/desktop/journal_p/'=>'desktop_publications#journal_p'
|
|
|
|
match '/desktop/journal_p_list/'=>'desktop_publications#journal_p_list'
|
|
|
|
match '/desktop/journal_p_add/'=>'desktop_publications#journal_p_add'
|
|
|
|
match '/desktop_publications/getjournals' => 'desktop_publications#getjournals'
|
2012-07-04 10:31:00 +00:00
|
|
|
match '/desktop/books' => 'desktop_publications#books'
|
|
|
|
match '/desktop/books_list/'=>'desktop_publications#books_list'
|
|
|
|
match '/desktop/books_add/'=>'desktop_publications#books_add'
|
|
|
|
|
2012-07-04 11:12:02 +00:00
|
|
|
match '/desktop/seminar_p' => 'desktop_publications#seminar_p'
|
|
|
|
match '/desktop/seminar_p_list/'=>'desktop_publications#seminar_p_list'
|
|
|
|
match '/desktop/seminar_p_add/'=>'desktop_publications#seminar_p_add'
|
|
|
|
|
2012-08-08 13:35:51 +00:00
|
|
|
match '/desktop/research_d' => 'desktop_research#research_d'
|
|
|
|
match '/desktop/research_d_list/' => 'desktop_research#research_d_list'
|
|
|
|
match '/desktop/research_d_add' => 'desktop_research#research_d_add'
|
|
|
|
|
|
|
|
match '/desktop/research_p' => 'desktop_research#research_p'
|
|
|
|
match '/desktop/research_p_list/' => 'desktop_research#research_p_list'
|
|
|
|
match '/desktop/research_p_add' => 'desktop_research#research_p_add'
|
|
|
|
|
2012-05-03 13:30:12 +00:00
|
|
|
|
2012-05-04 12:28:12 +00:00
|
|
|
match '/desktop/twitter/'=>'otheraccounts#twitter'
|
2012-04-26 09:23:47 +00:00
|
|
|
match '/desktop/forgmail/'=>'otheraccounts#gmail'
|
2012-05-03 06:40:54 +00:00
|
|
|
match '/desktop/getaccounts'=>'otheraccounts#getaccounts'
|
2012-04-26 13:30:13 +00:00
|
|
|
match '/desktop/save_account_info/'=>'otheraccounts#saveaccountinfo'
|
2012-05-04 12:28:12 +00:00
|
|
|
|
2012-06-26 07:59:28 +00:00
|
|
|
match '/desktop_appstore/appstore'=>'desktop_appstore#appstore'
|
|
|
|
match '/desktop_appstore/widgets'=>'desktop_appstore#widgets'
|
|
|
|
match '/desktop_appstore/getuserwidgets'=>'desktop_appstore#getuserwidgets'
|
|
|
|
match '/desktop_appstore/widgets_settings'=>'desktop_appstore#widgets_settings'
|
|
|
|
|
|
|
|
match '/desktop_orbit/orbit' => 'desktop_orbit#orbit'
|
2012-08-21 11:36:49 +00:00
|
|
|
|
2012-07-02 13:06:20 +00:00
|
|
|
match '/desktop_orbit/eventajaxload'=> 'desktop_orbit#eventajaxload'
|
2012-07-06 08:11:03 +00:00
|
|
|
match '/desktop_orbit/gettimelinespan' => 'desktop_orbit#gettimelinespan'
|
2012-07-04 10:49:10 +00:00
|
|
|
|
2012-07-03 11:45:47 +00:00
|
|
|
#match '/desktop_orbit/eventajaxload' => 'desktop_publications#create_journal'
|
|
|
|
#match '/desktop_orbit/eventajaxload' => 'desktop_publications#delete_journal'
|
|
|
|
# match '/desktop_orbit/eventajaxload' => 'desktop_publications#update_journal'
|
2012-06-28 09:31:48 +00:00
|
|
|
|
2012-07-04 10:49:10 +00:00
|
|
|
|
2012-04-11 07:31:10 +00:00
|
|
|
match '/desktop/temp_func/'=>'desktop#temp_func'
|
2012-01-24 10:16:58 +00:00
|
|
|
|
2012-09-05 11:08:48 +00:00
|
|
|
match '/panel/:app_name/front_end/:app_action/:id(/:controller_action)' => 'pages#show_from_link', :constraints => lambda { |request|
|
2012-01-24 10:16:58 +00:00
|
|
|
!request.query_string.include?("inner=true")
|
|
|
|
}
|
|
|
|
|
|
|
|
match '/panel/:app_name/front_end/:app_action' => 'pages#index_from_link', :constraints => lambda { |request|
|
2011-12-23 10:34:21 +00:00
|
|
|
!request.query_string.include?("inner=true")
|
2012-01-24 10:16:58 +00:00
|
|
|
}
|
2012-08-07 21:40:50 +00:00
|
|
|
|
|
|
|
match '/share/:model/:id' => 'application#render_share'
|
2011-04-13 10:19:51 +00:00
|
|
|
|
2011-08-18 05:43:33 +00:00
|
|
|
# routes for gridfs files
|
2012-06-26 09:46:02 +00:00
|
|
|
match "/gridfs/*path" => "gridfs#serve"
|
|
|
|
|
2011-09-01 11:08:45 +00:00
|
|
|
# match "/images/*path" => "gridfs#serve_images"
|
|
|
|
# match "/admin/pages/images/*path" => "gridfs#serve_images"
|
2011-08-25 00:13:38 +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
|