49 lines
2.5 KiB
Ruby
49 lines
2.5 KiB
Ruby
Rails.application.routes.draw do
|
|
|
|
locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
|
namespace :admin do
|
|
resources :client_managements
|
|
end
|
|
|
|
scope :cpanel do
|
|
get "sites" => "client_managements#index"
|
|
get "site/:site_uid" => "client_managements#show", as: "cpanel_site_show"
|
|
get "site/:site_uid/tickets" => "client_managements#site_tickets"
|
|
get "dofirstrun" => "client_managements#dofirstrun"
|
|
get "user_sites" => "client_managements#user_sites"
|
|
get "addsite" => "client_managements#addsite", as: "cpanel_add_site"
|
|
post "addsitestouser" => "client_managements#addsitestouser"
|
|
get "addnewsite" => "client_managements#addnewsite", as: "cpanel_add_new_site"
|
|
post "requestsite" => "client_managements#requestsite"
|
|
|
|
# profile
|
|
get "myprofile" => "client_managements#myprofile", as: "cpanel_myprofile"
|
|
patch "update_member_profile" => "client_managements#update_member_profile"
|
|
get "myprofilepassword" => "client_managements#myprofilepassword", as: "cpanel_myprofilepassword"
|
|
patch "update_member_profile_password" => "client_managements#update_member_profile_password"
|
|
|
|
# ticket
|
|
get "site/:site_uid/new_ticket" => "client_managements#new_ticket"
|
|
post "site/:site_uid/create_ticket" => "client_managements#create_ticket"
|
|
get "ticket/:ticket_id/close" => "client_managements#close_ticket"
|
|
get "ticket/:ticket_id/reopen" => "client_managements#reopen_ticket"
|
|
delete "ticket/:ticket_id/delete" => "client_managements#delete_ticket"
|
|
get "ticket/:ticket_id" => "client_managements#show_ticket", as: "cpanel_show_ticket"
|
|
post "ticket/:ticket_id/create_ticket_query" => "client_managements#create_ticket_query"
|
|
|
|
get "signup" => "c_panel_sessions#signup", as: "cpanel_signup"
|
|
post "create_user" => "c_panel_sessions#create_user"
|
|
get "login" => "c_panel_sessions#login", as: "cpanel_login"
|
|
get "logout" => "c_panel_sessions#logout", as: "cpanel_logout"
|
|
get "requestpassword" => "c_panel_sessions#requestpassword", as: "requestpassword"
|
|
post "instructions" => "c_panel_sessions#instructions"
|
|
get "reset_password" => "c_panel_sessions#reset_password", as: "cpanel_reset_password"
|
|
get "confirm_email" => "c_panel_sessions#confirm_email", as: "cpanel_confirm_email"
|
|
post "update_password" => "c_panel_sessions#update_cpanel_user_password"
|
|
post "loguserin" => "c_panel_sessions#loguserin"
|
|
|
|
end
|
|
end
|
|
end
|