X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=config%2Froutes.rb;h=3ccb1e9402622856a09aeb0c9eb4d0a63f3c9673;hb=279324e2ea829a8e13358a850335cbd765e98fe5;hp=102b4136703fd8f0f8801e68763ee56978e2aa75;hpb=2c135f0da2f6e8e2bbd8f7223d39b780e327df4b;p=pettanr%2Fpettanr.git diff --git a/config/routes.rb b/config/routes.rb index 102b4136..3ccb1e94 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,12 +1,11 @@ Pettanr::Application.routes.draw do - - devise_for :users + devise_for :users, controllers: {sessions: 'user_sessions', omniauth_callbacks: "omniauth_callbacks"} devise_for :admins devise_for :demand_users - Manifest.manifest.system_resources.engine_resources.each do |engine_resource_name, engine_resource| - if engine_resource.add_route? - engine_resource.resource_items.each do |klass, name| + Manifest.manifest.system_resources.templates.each do |template_name, template| + if template.add_route? + template.template_items.each do |klass, name| mount Module.const_get(klass)::Engine => "/#{name}" end end @@ -19,8 +18,8 @@ Pettanr::Application.routes.draw do collection do get :root get :index + get :watch get :show - get :count post :create end member do @@ -36,19 +35,15 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do get :by_author get :by_panel - get :count_by_author - get :count_by_panel get :play get :edit put :update delete :destroy - get :browse end end resources :scroll_panels do @@ -58,16 +53,13 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do get :by_panel get :by_scroll get :by_author - get :count_by_panel - get :count_by_scroll - get :count_by_author + get :play get :edit put :update delete :destroy @@ -80,14 +72,11 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do get :by_author get :by_story - get :count_by_author - get :count_by_story get :play get :edit put :update @@ -101,16 +90,12 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do get :by_comic get :by_story get :by_author - get :count_by_comic - get :count_by_story - get :count_by_author get :edit put :update delete :destroy @@ -123,16 +108,12 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do get :by_comic get :by_sheet get :by_author - get :count_by_comic - get :count_by_sheet - get :count_by_author get :play get :edit put :update @@ -146,16 +127,12 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do get :by_story get :by_sheet get :by_author - get :count_by_story - get :count_by_sheet - get :count_by_author get :edit put :update delete :destroy @@ -168,7 +145,6 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do @@ -179,9 +155,6 @@ Pettanr::Application.routes.draw do get :by_story get :by_panel get :by_author - get :count_by_story - get :count_by_panel - get :count_by_author get :play get :edit put :update @@ -195,16 +168,12 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do get :by_sheet get :by_panel get :by_author - get :count_by_sheet - get :count_by_panel - get :count_by_author get :edit put :update delete :destroy @@ -217,7 +186,6 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do @@ -225,11 +193,6 @@ Pettanr::Application.routes.draw do get :by_sheet get :by_author get :by_speech_balloon_template - get :count_by_scroll - get :count_by_sheet - get :count_by_author - get :count_by_speech_balloon_template - get :catch get :edit put :update delete :destroy @@ -242,14 +205,11 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do get :by_panel get :by_author - get :count_by_panel - get :count_by_author get :edit put :update delete :destroy @@ -262,16 +222,12 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do get :by_panel get :by_author get :by_speech_balloon_template - get :count_by_panel - get :count_by_author - get :count_by_speech_balloon_template get :edit put :update delete :destroy @@ -281,12 +237,12 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count end member do + get :by_author get :by_speech_balloon - #get :by_system_picture - get :count_by_speech_balloon + get :by_speech_balloon_template + get :by_system_picture get :edit put :update end @@ -295,13 +251,13 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count end member do + get :by_author get :by_speech_balloon + get :by_author + get :by_speech_balloon_template get :by_writing_format - get :count_by_speech_balloon - get :count_by_writing_format get :edit put :update end @@ -313,13 +269,10 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count end member do get :by_panel get :by_author - get :count_by_panel - get :count_by_author get :edit put :update delete :destroy @@ -332,13 +285,10 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count end member do get :by_panel get :by_author - get :count_by_panel - get :count_by_author get :edit put :update delete :destroy @@ -351,7 +301,6 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do @@ -365,48 +314,50 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count get :credit get :search - get :list end member do + get :by_artist get :credit - get :browse end end resources :resource_pictures do collection do get :index get :show - get :count get :new post :create - get :count end member do + get :by_original_picture + get :by_license_group get :by_license - get :by_license_group get :by_artist - get :count_by_license - get :count_by_license_group - get :count_by_artist delete :destroy get :credit end end + resources :resource_picture_pictures do + collection do + get :index + get :show + end + member do + get :by_original_picture + get :by_resource_picture + get :by_picture + end + end resources :speech_balloon_templates do collection do get :index get :show - get :count post :create end member do get :by_panel get :by_system_picture - get :count_by_system_picture - get :count_by_panel put :update delete :destroy end @@ -415,14 +366,12 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do get :speeches get :by_system_picture get :speeches_count - get :count_by_system_picture put :update delete :destroy end @@ -431,12 +380,10 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do - get :licenses - get :licenses_count + get :by_resource_picture put :update delete :destroy end @@ -445,7 +392,6 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count get :search post :create end @@ -454,8 +400,6 @@ Pettanr::Application.routes.draw do get :by_license_group get :by_system_picture get :resource_pictures_count - get :count_by_license_group - get :count_by_system_picture put :update delete :destroy end @@ -467,7 +411,6 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do @@ -483,7 +426,6 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count post :create end member do @@ -496,14 +438,11 @@ Pettanr::Application.routes.draw do collection do get :index get :show - get :count end member do #get :balloons get :speech_balloon_templates get :licenses - get :speech_balloon_templates_count - get :licenses_count delete :destroy end end @@ -515,6 +454,14 @@ Pettanr::Application.routes.draw do post :create end end + resources :original_picture_licenses do + new do + post :new + end + collection do + post :create + end + end resources :provider_sources do collection do get :index @@ -600,9 +547,9 @@ Pettanr::Application.routes.draw do # match 'resource_pictures/full/:id(.:format)/' => 'resource_pictures#show' # match 'pictures/:subdir/:id(.:format)/' => 'pictures#show' #match 'scroll_panels/scroll/:id(.:format)' => 'scroll_panels#scroll' - match 'top/(:action)', :controller => 'top' - match 'home/(:action)', :controller => 'home' - match 'system/(:action)', :controller => 'system' + match 'top/(:action)', :controller => 'top', via: [:get] + match 'home/(:action)', :controller => 'home', via: [:get] + match 'system/(:action)', :controller => 'system', via: [:get, :post] #match 'authors/(:action(/:id))', :controller => 'authors' # Sample of named route: @@ -653,5 +600,5 @@ Pettanr::Application.routes.draw do # This is a legacy wild controller route that's not recommended for RESTful applications. # Note: This route will make all actions in every controller accessible via GET requests. - match ':controller(/:action(/:id(.:format)))' + match ':controller(/:action(/:id(.:format)))', via: [:get, :post] end