forked from saurabh/personal-book
38 lines
1.2 KiB
Ruby
38 lines
1.2 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
|
|
get 'book_setting' => "books#setting"
|
|
get 'books/download_excel_format' => 'books#excel_format'
|
|
post 'books/import_from_excel' => 'books#import_from_excel'
|
|
|
|
resources :books do
|
|
collection do
|
|
get 'toggle_hide' => 'books#toggle_hide'
|
|
get 'analysis'
|
|
get 'analysis_report'
|
|
get "download_excel"
|
|
end
|
|
end
|
|
|
|
resources :members do
|
|
collection do
|
|
scope '(:name-:uid)' do
|
|
resources :books do
|
|
collection do
|
|
get 'frontend_setting' => 'books#frontend_setting'
|
|
post 'update_frontend_setting' => 'books#update_frontend_setting'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
resources :book_author_types
|
|
resources :book_types
|
|
resources :book_intros
|
|
end
|
|
get "/xhr/personal_book/get_fields_for_index" => "personal_books#get_fields_for_index"
|
|
post "/xhr/personal_book/save_index_fields" => "personal_books#save_index_fields"
|
|
end
|
|
end
|