recruitment_mod/config/routes.rb

54 lines
2.7 KiB
Ruby

Rails.application.routes.draw do
locales = Site.first.in_use_locales rescue I18n.available_locales
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do
post 'recruitment/preview', to: 'recruitment#preview'
post 'recruitment/createfeed', to: 'recruitment#createfeed'
post 'recruitment/importanns', to: 'recruitment#importanns'
post 'recruitment/import_from_xml', to: 'recruitment#import_from_xml'
get 'recruitment/excel_format', to: 'recruitment#excel_format'
get 'recruitment/export_excel', to: 'recruitment#export_excel'
patch 'recruitment/updatefeed', to: 'recruitment#updatefeed'
delete 'recruitment/deletefeed', to: 'recruitment#deletefeed'
get 'recruitment/destroy_preview/:slug_title-:uid', to: 'recruitment#destroy_preview'
post 'recruitment/approve_recruitment', to: 'recruitment#approve_recruitment'
get 'recruitment/feed', to: 'recruitment#feed'
get 'recruitment/feedform', to: 'recruitment#feedform'
get 'recruitment/settings', to: 'recruitment#settings'
get 'recruitment/import', to: 'recruitment#import'
get 'recruitment/download_file_from_thread', to: 'recruitment#download_file_from_thread'
post 'recruitment/createsettings', to: 'recruitment#createsettings'
patch 'recruitment/updatesettings', to: 'recruitment#updatesettings'
post 'recruitment/import_from_wp', to: 'recruitment#import_from_wp'
post 'recruitment/generate_iframe_url' => 'recruitment#generate_iframe_url'
resources :recruitment do
collection do
get 'custom_fields_title'
post 'update_custom_title'
get "edit_sort"
post "update_sort_setting", to: 'recruitment#update_sort_setting'
post "update_sort", to: 'recruitment#update_sort'
end
end
end
resources :recruitment do
collection do
get ':slug_title-:uid', to: 'recruitment_mods#show', as: :display
end
end
post "/xhr/recruitment_mods/feed_add_remote/:uid" => "recruitment_feeds#feed_add_remote"
post "/xhr/recruitment_mods/feed_remove_remote/:uid" => "recruitment_feeds#feed_remove_remote"
get '/xhr/recruitment/agenda' => 'recruitment_mods#agenda'
get "/xhr/recruitment/feed/:uid" => "recruitment_feeds#feed"
get "/xhr/recruitment/rssfeed/:uid" => "recruitment_feeds#rssfeed"
get "/xhr/recruitment/feeds" => "recruitment_feeds#feeds"
get '/xhr/recruitment/recruitment.json', to: 'recruitment_module#get_recruitment'
get '/xhr/panel/recruitment/widget/sync_data' => 'recruitment_mods#show_widget'
get '/xhr/recruitment/file/:id/*f_name', to: 'recruitment_mods#get_file', format: false
end
end