orbit-announcement/config/routes.rb

53 lines
2.1 KiB
Ruby

Rails.application.routes.draw do
namespace :panel do
namespace :announcement do
namespace :back_end do
match 'public' => "announcements#public",:as => :public
match 'approval_setting' => "approvals#setting" ,:as => :approval_setting,:via => :get
match 'approval_setting' => "approvals#update_setting" ,:as => :approval_setting,:via => :post
match 'approval_setting' => "approvals#user_list" ,:as => :approval_user_list,:via => :put
resources :bulletins do
match "approve/:bulletin_id" => "approvals#preview_and_approve",:as => :approval_preview,:via => :put
match "approve/:bulletin_id" => "approvals#approve",:as => :approve,:via => :post
member do
get 'load_quick_edit'
end
collection do
post "preview"
put "preview"
get 'delete'
end
end
resources :bulletin_links
resources :bulletin_files
end
namespace :front_end do
match "index_by_unit" => "bulletins#index_bulletins_by_unit",:as => :index_bulletins_by_unit
match "search_result" => "bulletins#search_result"
resources :bulletins # do
# match "preview" => "bulletins#preview_content",:as => :get_preview_content
# end
end
namespace :widget do
match "index" => "bulletins#index"
match "bulletins_and_web_links" => "bulletins#bulletins_and_web_links"
match "reload_bulletins" => "bulletins#reload_bulletins"
match "reload_web_links" => "bulletins#reload_web_links"
match "bulletins_side_bar" => "bulletins#bulletins_side_bar"
match "bulletins_search_block" => "bulletins#bulletins_search_block"
match "sync_data" => "bulletins#sync_data",:as => :sync_data,:via => :get
match "show_sync_data/:id" => "bulletins#show_sync_data",:as => :show_sync_data,:via => :get
end
namespace :api do
get "categories_tags.json" => "bulletins#get_categories_tags"
get "bulletins.json" => "bulletins#get_bulletins"
end
end
end
end