event_ann/config/routes.rb

42 lines
1.9 KiB
Ruby
Raw Normal View History

2020-07-13 08:04:57 +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
namespace :admin do
post 'event_ann/preview', to: 'event_anns#preview'
post 'event_ann/createfeed', to: 'event_anns#createfeed'
post 'event_ann/importeanns', to: 'event_anns#importeanns'
post 'event_ann/import_from_xml', to: 'event_anns#import_from_xml'
get 'event_ann/excel_format', to: 'event_anns#excel_format'
get 'event_ann/export_excel', to: 'event_anns#export_excel'
patch 'event_ann/updatefeed', to: 'event_anns#updatefeed'
delete 'event_ann/deletefeed', to: 'event_anns#deletefeed'
get 'event_ann/destroy_preview/:slug_title-:uid', to: 'event_anns#destroy_preview'
post 'event_ann/approve_bulletin', to: 'event_anns#approve_bulletin'
get 'event_ann/feed', to: 'event_anns#feed'
get 'event_ann/feedform', to: 'event_anns#feedform'
get 'event_ann/settings', to: 'event_anns#settings'
get 'event_ann/import', to: 'event_anns#import'
post 'event_ann/createsettings', to: 'event_anns#createsettings'
patch 'event_ann/updatesettings', to: 'event_anns#updatesettings'
post 'event_ann/import_from_wp', to: 'event_anns#import_from_wp'
post 'event_ann/generate_iframe_url' => 'event_anns#generate_iframe_url'
resources :event_anns
end
resources :event_anns do
collection do
get ':slug_title-:uid', to: 'event_anns#show', as: :display
end
end
get "/xhr/event_anns/feed/:uid" => "event_ann_feeds#feed"
get "/xhr/event_anns/rssfeed/:uid" => "event_ann_feeds#rssfeed"
get "/xhr/event_anns/feeds" => "event_ann_feeds#feeds"
get '/xhr/event_anns/event_ann.json', to: 'bulletin_events#get_bulletins'
get '/xhr/panel/event_anns/widget/sync_data' => 'event_anns#show_widget'
end
end