forked from saurabh/personal-journal
40 lines
1.7 KiB
Ruby
40 lines
1.7 KiB
Ruby
Rails.application.routes.draw do
|
|
|
|
locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
|
namespace :admin do
|
|
match 'writing_journal_setting' => "journal_papers#writing_journal_setting" ,as: :writing_journal_setting, via: [:get]
|
|
resources :journal_papers do
|
|
collection do
|
|
get 'delete'
|
|
get 'data_share'
|
|
end
|
|
match "add_level" => "journal_papers#add_level" ,as: :add_level, via: [:get, :post]
|
|
match "edit_level" => "journal_papers#edit_level" ,as: :edit_level, via: [:get, :post]
|
|
match "add_author_type" => "journal_papers#add_author_type" ,as: :add_author_type, via: [:get, :post]
|
|
match "edit_author_type" => "journal_papers#edit_author_type" ,as: :edit_author_type, via: [:get, :post]
|
|
match "add_paper_type" => "journal_papers#add_paper_type" ,as: :add_paper_type, via: [:get, :post]
|
|
match "edit_paper_type" => "journal_papers#edit_paper_type" ,as: :edit_paper_type, via: [:get, :post]
|
|
end
|
|
|
|
resources :members do
|
|
collection do
|
|
scope '(:name-:uid)' do
|
|
resources :journal_papers do
|
|
collection do
|
|
get 'frontend_setting' => 'journal_papers#frontend_setting'
|
|
post 'update_frontend_setting' => 'journal_papers#update_frontend_setting'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
resources :journal_levels
|
|
resources :journal_paper_author_types
|
|
resources :journal_paper_types
|
|
resources :journal_paper_intros
|
|
end
|
|
end
|
|
end
|