2014-04-14 03:27:09 +00:00
|
|
|
Orbit::Application.routes.draw do
|
2014-04-03 03:17:07 +00:00
|
|
|
|
2014-05-01 08:44:01 +00:00
|
|
|
mount Ckeditor::Engine => '/ckeditor'
|
|
|
|
|
2014-04-14 10:40:17 +00:00
|
|
|
resources :sessions
|
|
|
|
|
|
|
|
get "logout", to: "sessions#destroy", as: "logout"
|
|
|
|
|
|
|
|
|
2014-04-01 07:10:21 +00:00
|
|
|
get "/pages/edit_view" => "pages#edit_view"
|
|
|
|
get "/pages/preview" => "pages#preview"
|
2014-04-21 07:19:29 +00:00
|
|
|
get "/pages/get_categories" => "pages#get_categories"
|
|
|
|
post "/pages/update_item_position" => "pages#update_item_position"
|
2014-03-12 04:42:59 +00:00
|
|
|
|
2014-04-01 07:10:21 +00:00
|
|
|
get "/page_parts/getwidgets" => "page_parts#getwidgets"
|
|
|
|
get "/page_parts/info" => "page_parts#info"
|
2014-05-22 11:19:25 +00:00
|
|
|
get "/page_parts/edit_sub_part" => "page_parts#edit_sub_part"
|
2014-04-01 07:10:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
resources :pages
|
2014-05-22 11:19:25 +00:00
|
|
|
resources :page_parts do
|
|
|
|
member do
|
|
|
|
patch 'update_sub_part'
|
|
|
|
end
|
|
|
|
end
|
2014-04-01 07:10:21 +00:00
|
|
|
|
2014-03-12 04:42:59 +00:00
|
|
|
get "/module/:name" => "home#index"
|
|
|
|
get "/module/:name/show" => "home#show"
|
|
|
|
# The priority is based upon order of creation: first created -> highest priority.
|
|
|
|
# See how all your routes lay out with "rake routes".
|
|
|
|
|
|
|
|
# You can have the root of your site routed with "root"
|
2014-04-07 07:57:06 +00:00
|
|
|
root 'pages#home'
|
2014-05-05 04:29:39 +00:00
|
|
|
get 'admin/authorizations/modal_select/:module(/:type(/:id))' => 'admin/authorizations#modal_select', :as => :modal_select_authorizations
|
|
|
|
match 'admin/authorizations/add_users/:module(/:type(/:id))' => 'admin/authorizations#add_users', :as => :add_users_authorizations, via: [:get, :post]
|
|
|
|
match 'admin/authorizations/add_roles/:module(/:type(/:id))' => 'admin/authorizations#add_roles', :as => :add_roles_authorizations, via: [:get, :post]
|
|
|
|
match 'admin/authorizations/remove_users/:module(/:type(/:id))' => 'admin/authorizations#remove_users', :as => :remove_users_authorizations, via: [:delete]
|
2014-04-08 10:46:27 +00:00
|
|
|
|
2014-04-21 02:48:36 +00:00
|
|
|
locales = Site.first.in_use_locales rescue I18n.available_locales
|
2014-04-08 10:46:27 +00:00
|
|
|
|
|
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
2014-05-09 06:03:55 +00:00
|
|
|
resources :users do
|
|
|
|
collection do
|
|
|
|
get 'confirm_user'
|
|
|
|
get 'post_confirmation'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :passwords
|
2014-04-10 09:13:42 +00:00
|
|
|
|
2014-05-22 11:19:25 +00:00
|
|
|
|
|
|
|
|
2014-04-07 09:26:43 +00:00
|
|
|
namespace :admin do
|
2014-05-15 11:32:51 +00:00
|
|
|
resources :dashboards do
|
|
|
|
collection do
|
|
|
|
get 'reload_all_content'
|
|
|
|
get 'reload_most_visited'
|
|
|
|
get 'reload_recent_update'
|
|
|
|
get 'get_cpu_usage'
|
|
|
|
get 'get_mem_usage'
|
|
|
|
get 'get_disk_usage'
|
|
|
|
get 'get_month_traffic'
|
|
|
|
end
|
|
|
|
end
|
2014-05-01 07:14:16 +00:00
|
|
|
resources :members
|
2014-05-09 06:03:55 +00:00
|
|
|
resources :roles do
|
|
|
|
get 'role_field'
|
|
|
|
post 'toggle'
|
|
|
|
end
|
|
|
|
|
2014-05-12 08:18:35 +00:00
|
|
|
resources :module_apps do
|
|
|
|
resources :categories do
|
|
|
|
collection do
|
|
|
|
post 'create_in_form'
|
|
|
|
end
|
|
|
|
member do
|
|
|
|
post 'toggle'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resources :tags do
|
|
|
|
collection do
|
|
|
|
post 'add_to_default'
|
|
|
|
post 'add_from_default'
|
|
|
|
post 'create_in_form'
|
|
|
|
post 'delete_tags'
|
|
|
|
post 'merge'
|
|
|
|
post 'remove_default'
|
|
|
|
post 'update_included_default'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2014-05-01 07:14:16 +00:00
|
|
|
|
2014-05-16 06:49:42 +00:00
|
|
|
resources :assets do
|
|
|
|
collection do
|
|
|
|
post 'file_upload'
|
|
|
|
get 'delete'
|
|
|
|
post 'delete_files'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-05-01 07:14:16 +00:00
|
|
|
get 'authorizations(/:module(/:type(/:id)))' => 'authorizations#index', :as => :authorizations
|
|
|
|
|
|
|
|
resources :authorizations
|
2014-04-08 10:46:27 +00:00
|
|
|
resources :items
|
2014-05-12 08:18:35 +00:00
|
|
|
resources :categories do
|
|
|
|
member do
|
|
|
|
post 'toggle'
|
|
|
|
end
|
|
|
|
end
|
2014-04-21 02:48:36 +00:00
|
|
|
resources :tags do
|
|
|
|
collection do
|
|
|
|
post 'add_to_default'
|
2014-05-12 08:18:35 +00:00
|
|
|
post 'add_from_default'
|
2014-04-21 02:48:36 +00:00
|
|
|
post 'delete_tags'
|
|
|
|
post 'merge'
|
|
|
|
post 'remove_default'
|
|
|
|
post 'update_included_default'
|
|
|
|
end
|
|
|
|
end
|
2014-04-08 10:46:27 +00:00
|
|
|
|
2014-04-30 10:57:09 +00:00
|
|
|
resources :sites do
|
2014-05-05 04:29:39 +00:00
|
|
|
get 'mail_setting'
|
|
|
|
get 'site_info'
|
|
|
|
get 'responsive_setting'
|
|
|
|
get 'search_engine'
|
|
|
|
get 'sitemap'
|
|
|
|
get 'sitemap_frontend'
|
|
|
|
get 'sitemap_toggle', :on => :member
|
|
|
|
get 'system_info'
|
|
|
|
get 'ui_theme'
|
|
|
|
get 'change_design'
|
|
|
|
get 'reset_default_locale'
|
|
|
|
get 'preference'
|
|
|
|
get 'update_manager'
|
|
|
|
get 'get_update_history'
|
|
|
|
get 'check_updates'
|
|
|
|
get 'update_orbit'
|
|
|
|
get 'restart_server'
|
2014-04-30 10:57:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
2014-04-08 10:46:27 +00:00
|
|
|
|
2014-05-20 02:31:44 +00:00
|
|
|
resources :designs do
|
|
|
|
collection do
|
|
|
|
get 'upload_package'
|
|
|
|
get 'delete'
|
|
|
|
post 'upload_package'
|
|
|
|
end
|
|
|
|
member do
|
|
|
|
post 'edit_file' => 'designs#edit_file'
|
|
|
|
post 'update_file' => 'designs#update_file'
|
|
|
|
post 'upload_image' => 'designs#upload_image'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
get 'design_list' => 'designs#design_list'
|
|
|
|
|
2014-04-08 10:46:27 +00:00
|
|
|
get 'module_store' => 'module_store#index'
|
2014-04-07 09:26:43 +00:00
|
|
|
end
|
2014-04-03 03:17:07 +00:00
|
|
|
get ':page(/:page)(/:page)(/:page)', to: 'pages#show', constraints: KeywordConstraint.new
|
|
|
|
resources :pages
|
2014-04-01 07:10:21 +00:00
|
|
|
end
|
2014-03-12 04:42:59 +00:00
|
|
|
# Example of regular route:
|
|
|
|
# get 'products/:id' => 'catalog#view'
|
|
|
|
|
|
|
|
# Example of named route that can be invoked with purchase_url(id: product.id)
|
|
|
|
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
|
|
|
|
|
|
|
# Example resource route (maps HTTP verbs to controller actions automatically):
|
|
|
|
# resources :products
|
|
|
|
|
|
|
|
# Example resource route with options:
|
|
|
|
# resources :products do
|
|
|
|
# member do
|
|
|
|
# get 'short'
|
|
|
|
# post 'toggle'
|
|
|
|
# end
|
|
|
|
#
|
|
|
|
# collection do
|
|
|
|
# get 'sold'
|
|
|
|
# end
|
|
|
|
# end
|
|
|
|
|
|
|
|
# Example resource route with sub-resources:
|
|
|
|
# resources :products do
|
|
|
|
# resources :comments, :sales
|
|
|
|
# resource :seller
|
|
|
|
# end
|
|
|
|
|
|
|
|
# Example resource route with more complex sub-resources:
|
|
|
|
# resources :products do
|
|
|
|
# resources :comments
|
|
|
|
# resources :sales do
|
|
|
|
# get 'recent', on: :collection
|
|
|
|
# end
|
|
|
|
# end
|
|
|
|
|
|
|
|
# Example resource route with concerns:
|
|
|
|
# concern :toggleable do
|
|
|
|
# post 'toggle'
|
|
|
|
# end
|
|
|
|
# resources :posts, concerns: :toggleable
|
|
|
|
# resources :photos, concerns: :toggleable
|
|
|
|
|
|
|
|
# Example resource route within a namespace:
|
|
|
|
namespace :admin do
|
|
|
|
# Directs /admin/products/* to Admin::ProductsController
|
|
|
|
# (app/controllers/admin/products_controller.rb)
|
|
|
|
resources :users
|
|
|
|
end
|
2014-04-03 03:17:07 +00:00
|
|
|
end
|