This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/config/routes.rb

147 lines
4.6 KiB
Ruby
Raw Normal View History

Orbit::Application.routes.draw do
2011-07-12 08:00:57 +00:00
2010-03-08 08:04:05 +00:00
devise_for :users
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
match '/purchase/:type', :to => CentralServerExchangeApp
match 'load_orbit_bar' => 'pages#load_orbit_bar'
2011-08-18 05:43:33 +00:00
# routes for admin
namespace :admin do
resources :assets
resources :app_auths
resources :object_auths do
collection do
2012-02-16 05:57:28 +00:00
match 'new/:type/:obj_id',:action => 'new',:via => "get",:as => :init
end
member do
match ':id/create_role',:action => 'create_role',:via => "post",:as => :create_role
match 'remove/:type/:target_id' ,:action=> 'remove_role',:via => "delete",:as =>:remove
end
end
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
resources :dashboards
2011-07-19 10:31:53 +00:00
resources :designs do
collection do
get 'upload_package'
post 'upload_package'
end
2011-07-19 10:31:53 +00:00
member do
post 'edit_file' => 'designs#edit_file'
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
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'
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
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
resources :page_parts do
member do
get 'reload_widgets'
end
end
2011-08-18 05:43:33 +00:00
resources :purchases do
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
resources :sites
resources :snippets
2012-02-14 16:32:20 +00:00
resources :tags
resources :translations
2011-11-17 12:02:58 +00:00
resources :users
end
2011-08-18 05:43:33 +00:00
# end admin
namespace :panel do
resources :users
end
2012-03-28 10:53:30 +00:00
match '/desktop/'=>'desktop#index'
2012-03-29 07:23:48 +00:00
match '/desktop/desktop'=>'desktop#desktop'
2012-03-29 11:50:23 +00:00
match '/desktop/app_manager'=>'desktop#app_manager'
match '/desktop/sections'=>'desktop#sections'
match '/desktop/settings'=>'desktop#settings'
2012-04-05 12:32:56 +00:00
match '/desktop/get_desktop_settings/'=>'desktop#get_desktop_settings'
match '/desktop/save_desktop_settings/'=>'desktop#save_desktop_settings'
2012-04-11 07:31:10 +00:00
match '/desktop/getgroups/'=>'desktop#getgroups'
match '/desktop/getsectionlist/'=>'desktop#getsectionlist'
2012-04-11 09:26:25 +00:00
match '/desktop/settingthemes/'=>'desktop#settingthemes'
2012-04-11 09:58:52 +00:00
match '/desktop/settingsections/'=>'desktop#settingsections'
2012-04-12 06:44:08 +00:00
match '/desktop/getapplist/'=>'desktop#getapplist'
match '/desktop/newpositions/'=>'desktop#newpositions'
2012-04-24 08:45:26 +00:00
match '/desktop/journal_p/'=>'desktop#journal_p'
match '/desktop/journal_p_list/'=>'desktop#journal_p_list'
match '/desktop/journal_p_add/'=>'desktop#journal_p_add'
match '/desktop/settingconnection/'=>'desktop#settingconnection'
2012-04-26 09:23:47 +00:00
match '/desktop/forgmail/'=>'otheraccounts#gmail'
match '/desktop/save_account_info/'=>'otheraccounts#saveaccountinfo'
2012-04-11 07:31:10 +00:00
match '/desktop/temp_func/'=>'desktop#temp_func'
2012-04-11 09:26:25 +00:00
match '/panel/:app_name/front_end/:app_action/:id' => 'pages#show_from_link', :constraints => lambda { |request|
!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")
}
2011-08-18 05:43:33 +00:00
# routes for gridfs files
match "/gridfs/*path" => "gridfs#serve"
# match "/images/*path" => "gridfs#serve_images"
# match "/admin/pages/images/*path" => "gridfs#serve_images"
2011-08-18 05:43:33 +00:00
# routes for pages to generate
match '*page_name' => 'pages#show', :as => :page, :constraints => lambda{|request|
!request.path.starts_with?("/panel")
}
root :to => 'pages#index'
2009-05-07 16:53:18 +00:00
end