2015-08-03 10:54:33 +00:00
|
|
|
Rails.application.routes.draw do
|
|
|
|
|
|
|
|
locales = Site.first.in_use_locales rescue I18n.available_locales
|
|
|
|
|
|
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
|
|
|
post "/xhr/ticket/create", to: 'admin/tickets_api#create'
|
|
|
|
post "/xhr/ticket/close", to: 'admin/tickets_api#close'
|
|
|
|
post "/xhr/ticket/reopen", to: 'admin/tickets_api#reopen'
|
|
|
|
get "/xhr/tickets/:ticket_id", to: 'admin/tickets_api#getticket'
|
|
|
|
get "/xhr/tickets", to: 'admin/tickets_api#gettickets'
|
|
|
|
get "/xhr/ticket/types", to: 'admin/tickets_api#tickettypes'
|
|
|
|
delete "/xhr/ticket/:ticket_id", to: 'admin/tickets_api#destroy'
|
|
|
|
namespace :admin do
|
2015-08-18 18:28:47 +00:00
|
|
|
get "tickets/search" => 'tickets#search'
|
|
|
|
post "ticket/submit_response" => 'tickets#submit_response'
|
2015-09-03 11:29:43 +00:00
|
|
|
delete "ticket/delete_response" => 'tickets#delete_response'
|
2015-08-03 10:54:33 +00:00
|
|
|
get "tickets/category/:category_id" => 'tickets#tickets_by_category'
|
2015-08-18 18:28:47 +00:00
|
|
|
get "tickets/my_tickets" => 'tickets#my_tickets'
|
2015-09-02 10:16:01 +00:00
|
|
|
post "comments/read" => 'tickets#mark_response_read'
|
2015-08-18 18:28:47 +00:00
|
|
|
resources :tickets do
|
|
|
|
get "start"
|
|
|
|
get "leave"
|
|
|
|
get "changecategory"
|
|
|
|
get "close"
|
|
|
|
post "toggleurgent"
|
2015-08-25 10:49:47 +00:00
|
|
|
post "reopen"
|
2015-08-18 18:28:47 +00:00
|
|
|
end
|
2015-08-03 10:54:33 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|