2022-01-21 02:09:31 +00:00
|
|
|
Rails.application.routes.draw do
|
|
|
|
if ENV['worker_num']=='0' && File.basename($0) != 'rake' && !Rails.const_defined?('Console')
|
|
|
|
Thread.new do
|
|
|
|
EventNewsFeedCache.regenerate_all
|
|
|
|
end
|
|
|
|
end
|
|
|
|
locales = Site.first.in_use_locales rescue I18n.available_locales
|
|
|
|
|
|
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
|
|
|
namespace :admin do
|
|
|
|
post 'event_news/preview', to: 'event_news#preview'
|
|
|
|
post 'event_news/createfeed', to: 'event_news#createfeed'
|
|
|
|
post 'event_news/importanns', to: 'event_news#importanns'
|
|
|
|
post 'event_news/import_from_xml', to: 'event_news#import_from_xml'
|
|
|
|
get 'event_news/excel_format', to: 'event_news#excel_format'
|
|
|
|
get 'event_news/export_excel', to: 'event_news#export_excel'
|
|
|
|
patch 'event_news/updatefeed', to: 'event_news#updatefeed'
|
|
|
|
delete 'event_news/deletefeed', to: 'event_news#deletefeed'
|
|
|
|
get 'event_news/destroy_preview/:slug_title-:uid', to: 'event_news#destroy_preview'
|
|
|
|
post 'event_news/approve_event_news', to: 'event_news#approve_event_news'
|
|
|
|
get 'event_news/feed', to: 'event_news#feed'
|
|
|
|
get 'event_news/feedform', to: 'event_news#feedform'
|
|
|
|
get 'event_news/settings', to: 'event_news#settings'
|
|
|
|
get 'event_news/import', to: 'event_news#import'
|
2024-09-15 03:41:37 +00:00
|
|
|
get 'event_news/download_file_from_thread', to: 'event_news#download_file_from_thread'
|
2022-01-21 02:09:31 +00:00
|
|
|
post 'event_news/createsettings', to: 'event_news#createsettings'
|
|
|
|
patch 'event_news/updatesettings', to: 'event_news#updatesettings'
|
|
|
|
post 'event_news/import_from_wp', to: 'event_news#import_from_wp'
|
|
|
|
post 'event_news/generate_iframe_url' => 'event_news#generate_iframe_url'
|
|
|
|
resources :event_news do
|
|
|
|
collection do
|
|
|
|
get 'custom_fields_title'
|
|
|
|
post 'update_custom_title'
|
2024-07-18 12:59:34 +00:00
|
|
|
get "edit_sort"
|
|
|
|
post "update_sort_setting", to: 'event_news#update_sort_setting'
|
|
|
|
post "update_sort", to: 'event_news#update_sort'
|
2022-01-21 02:09:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :event_news do
|
|
|
|
collection do
|
2022-03-21 10:43:47 +00:00
|
|
|
get ':slug_title-:uid', to: 'event_news_mods#show', as: :display
|
2022-01-21 02:09:31 +00:00
|
|
|
end
|
|
|
|
end
|
2022-03-21 10:43:47 +00:00
|
|
|
get '/xhr/event_news/agenda' => 'event_news_mods#agenda'
|
2022-01-21 02:09:31 +00:00
|
|
|
get "/xhr/event_news/feed/:uid" => "event_news_feeds#feed"
|
|
|
|
get "/xhr/event_news/rssfeed/:uid" => "event_news_feeds#rssfeed"
|
|
|
|
get "/xhr/event_news/feeds" => "event_news_feeds#feeds"
|
|
|
|
get '/xhr/event_news/event_news.json', to: 'event_news_module#get_event_news'
|
2022-03-21 10:43:47 +00:00
|
|
|
get '/xhr/panel/event_news/widget/sync_data' => 'event_news_mods#show_widget'
|
|
|
|
get '/xhr/event_news/file/:id/*f_name', to: 'event_news_mods#get_file', format: false
|
2022-01-21 02:09:31 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|