announcement-test/config/routes.rb

56 lines
3.1 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
get "announcement/get_all_anncs_without_subannc", to: "announcements#get_all_anncs_without_subannc"
post 'announcement/get_preview_action', to: 'announcements#get_preview_action'
post 'announcement/preview', to: 'announcements#preview'
post 'announcement/createfeed', to: 'announcements#createfeed'
post 'announcement/importanns', to: 'announcements#importanns'
post 'announcement/import_from_xml', to: 'announcements#import_from_xml'
get 'announcement/excel_format', to: 'announcements#excel_format'
get 'announcement/export_excel', to: 'announcements#export_excel'
patch 'announcement/updatefeed', to: 'announcements#updatefeed'
delete 'announcement/deletefeed', to: 'announcements#deletefeed'
get 'announcement/destroy_preview/:slug_title-:uid', to: 'announcements#destroy_preview'
post 'announcement/approve_bulletin', to: 'announcements#approve_bulletin'
get 'announcement/feed', to: 'announcements#feed'
get 'announcements/feedform', to: 'announcements#feedform'
get 'announcement/settings', to: 'announcements#settings'
get 'announcement/import', to: 'announcements#import'
get 'announcement/download_file_from_thread', to: 'announcements#download_file_from_thread'
post 'announcement/createsettings', to: 'announcements#createsettings'
patch 'announcement/updatesettings', to: 'announcements#updatesettings'
post 'announcement/import_from_wp', to: 'announcements#import_from_wp'
post 'announcement/generate_iframe_url' => 'announcements#generate_iframe_url'
delete 'announcements/delete', to: 'announcements#delete'
resources :announcements
get 'announcements/:id/comment'=> 'announcements#comment'
get 'annc-comment-hidden/:id' => 'announcements#comment_hidden'
resource :announcement,:only => [] do
collection do
get "edit_sort"
post "update_sort_setting", to: 'announcements#update_sort_setting'
post "update_sort", to: 'announcements#update_sort'
end
end
end
resources :announcements do
collection do
get ':slug_title-:uid', to: 'announcements#show', as: :display
end
end
post "/xhr/announcements/feed_add_remote/:uid" => "announcement_feeds#feed_add_remote"
post "/xhr/announcements/feed_remove_remote/:uid" => "announcement_feeds#feed_remove_remote"
get "/xhr/announcements/feed/:uid" => "announcement_feeds#feed"
get "/xhr/announcements/rssfeed/:uid" => "announcement_feeds#rssfeed"
get "/xhr/announcements/feeds" => "announcement_feeds#feeds"
get '/xhr/announcements/announcement.json', to: 'bulletins#get_bulletins'
get '/xhr/panel/announcement/widget/sync_data' => 'announcements#show_widget'
get '/xhr/announcements/:slug_title-:uid/comment', to: 'announcements#comment'
get '/xhr/announcements/file/:id/*f_name', to: 'announcements#get_file', format: false
end
end