2014-06-04 09:38:58 +00:00
|
|
|
Rails.application.routes.draw do
|
|
|
|
locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales
|
2015-01-09 07:38:49 +00:00
|
|
|
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
2014-06-04 09:38:58 +00:00
|
|
|
namespace :admin do
|
2015-01-09 07:38:49 +00:00
|
|
|
get 'book_setting' => "books#setting"
|
2015-12-15 10:08:07 +00:00
|
|
|
get 'books/download_excel_format' => 'books#excel_format'
|
|
|
|
post 'books/import_from_excel' => 'books#import_from_excel'
|
2015-01-09 07:38:49 +00:00
|
|
|
|
|
|
|
resources :books do
|
|
|
|
collection do
|
|
|
|
get 'toggle_hide' => 'books#toggle_hide'
|
|
|
|
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
|
2014-06-04 09:38:58 +00:00
|
|
|
end
|
2016-04-01 05:56:20 +00:00
|
|
|
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"
|
2014-06-04 09:38:58 +00:00
|
|
|
end
|
|
|
|
end
|