X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=config%2Froutes.rb;h=dcca394b8e6cab9ec796fd97613b63bf882b68be;hb=32af7a076b4244f157cb560d156e86d183a148e3;hp=08ac97b3a8a77f2441f013d6a17b73113e53cc12;hpb=2a757d724155bd506f611cd6117b4d3cac7302c6;p=pettanr%2Fpettanr.git diff --git a/config/routes.rb b/config/routes.rb index 08ac97b3..dcca394b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,35 +4,33 @@ Pettanr::Application.routes.draw do devise_for :admins devise_for :demand_users - Pettanr::Application.licenses.each do |name, klass| - mount Module.const_get(klass)::Engine => "/#{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 end - resources :authors do + resources :folders do new do get :new end collection do + get :root get :index + get :watch get :show get :count post :create - get :list end member do + get :edit put :update delete :destroy - get :browse - get :comics - get :stories - get :panels - get :panel_pictures - get :ground_pictures - get :ground_colors - get :panel_colors end end - resources :artists do + resources :scrolls do new do get :new end @@ -41,13 +39,42 @@ Pettanr::Application.routes.draw do get :show get :count post :create - get :list end member do + get :by_author + get :by_panel + get :count_by_author + get :count_by_panel + get :count_play + get :play + get :edit put :update delete :destroy get :browse - get :resource_pictures + end + end + resources :scroll_panels do + new do + get :new + end + collection do + get :index + get :show + get :count + post :create + end + member do + get :by_panel + get :by_scroll + get :by_author + get :play + get :count_by_panel + get :count_by_scroll + get :count_by_author + get :count_play + get :edit + put :update + delete :destroy end end resources :comics do @@ -59,13 +86,38 @@ Pettanr::Application.routes.draw do get :show get :count post :create - get :list end member do + get :by_author + get :by_story + get :count_by_author + get :count_by_story + get :play + get :edit + put :update + delete :destroy + end + end + resources :comic_stories do + new do + get :new + end + 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 - get :browse end end resources :stories do @@ -75,14 +127,91 @@ Pettanr::Application.routes.draw do collection do get :index get :show + get :count post :create - get :list end member do - get :comic + 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 + delete :destroy + end + end + resources :story_sheets do + new do + get :new + end + 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 + end + end + resources :sheets do + new do + get :new + end + collection do + get :index + get :show + get :count + post :create + end + member do + get :story_sheets + get :stories + get :sheet_panels + get :panels + 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 + delete :destroy + end + end + resources :sheet_panels do + new do + get :new + end + 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 - get :browse end end resources :panels do @@ -94,70 +223,128 @@ Pettanr::Application.routes.draw do get :show get :count post :create - get :list end member do + get :by_scroll + 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 - get :browse end end resources :panel_pictures do + new do + get :new + end collection do get :index get :show - get :list + get :count + post :create end member do - get :browse + get :by_panel + get :by_author + get :count_by_panel + get :count_by_author + get :edit + put :update + delete :destroy end end resources :speech_balloons do + new do + get :new + end collection do get :index get :show - get :list + get :count + post :create end member do - get :browse + 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 end end resources :balloons do collection do get :index get :show - get :list + get :count end member do - get :browse + get :by_author + get :by_speech_balloon + get :count_by_author + get :edit + put :update end end resources :speeches do collection do get :index get :show - get :list + get :count end member do - get :browse + get :by_author + get :by_speech_balloon + get :count_by_author + get :edit + put :update end end - resources :ground_colors do + resources :ground_pictures do + new do + get :new + end collection do get :index get :show + get :count end member do - get :browse + get :by_panel + get :by_author + get :count_by_panel + get :count_by_author + get :edit + put :update + delete :destroy end end - resources :ground_pictures do + resources :ground_colors do + new do + get :new + end collection do get :index get :show + get :count end member do - get :browse + get :by_panel + get :by_author + get :count_by_panel + get :count_by_author + get :edit + put :update + delete :destroy end end resources :original_pictures do @@ -167,52 +354,95 @@ Pettanr::Application.routes.draw do collection do get :index get :show + get :count post :create - get :list end member do get :edit put :update delete :destroy get :history - get :browse + end + end + resources :pictures do + collection do + get :index + get :show + get :count + get :credit + get :search + end + member do + get :by_artist + get :count_by_artist + get :credit end end resources :resource_pictures do collection do get :index get :show + get :count get :new post :create get :count - get :list end member do + get :by_license_group + get :by_license + get :by_artist + get :count_by_license_group + get :count_by_license + get :count_by_artist delete :destroy get :credit - get :browse end end - resources :pictures do + resources :speech_balloon_templates do collection do + get :index get :show - get :credit - get :search - get :list + get :count + post :create end member do - get :credit - get :browse + get :by_panel + get :by_system_picture + get :count_by_system_picture + get :count_by_panel + put :update + delete :destroy end end - resources :speech_balloon_templates do + resources :writing_formats do collection do get :index get :show - get :list + get :count + post :create end member do - get :browse + get :speeches + get :by_system_picture + get :speeches_count + get :count_by_system_picture + put :update + delete :destroy + end + end + resources :license_groups do + collection do + get :index + get :show + get :count + post :create + end + member do + get :resource_pictures + get :resource_pictures_count + get :licenses + get :licenses_count + put :update delete :destroy end end @@ -220,43 +450,84 @@ Pettanr::Application.routes.draw do collection do get :index get :show + get :count get :search - get :list + post :create end member do - get :browse + get :resource_pictures + 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 end - resources :license_groups do + resources :authors do + new do + get :new + end collection do get :index get :show - get :list + get :count + post :create end member do - get :browse + get :edit + put :update delete :destroy end end - resources :original_picture_license_groups do + resources :artists do new do - post :new + get :new end collection do + get :index + get :show + get :count post :create end + member do + get :edit + put :update + delete :destroy + end end resources :system_pictures do collection do get :index get :show - get :list + get :count end member do - get :browse + #get :balloons + get :speech_balloon_templates + get :licenses + get :speech_balloon_templates_count + get :licenses_count delete :destroy end end + resources :original_picture_license_groups do + new do + post :new + end + collection 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 @@ -337,12 +608,15 @@ Pettanr::Application.routes.draw do # Sample of regular route: # match 'products/:id' => 'catalog#view' # Keep in mind you can assign values other than :controller and :action - match 'resource_pictures/:subdir/:id(.:format)/' => 'resource_pictures#show' - match 'pictures/:subdir/:id(.:format)/' => 'pictures#show' - match 'stories/comic/:id(.:format)' => 'stories#comic' + + # resource_pictures/1.png?subdir=full + # 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 'authors/(:action(/:id))', :controller => 'authors' + #match 'authors/(:action(/:id))', :controller => 'authors' # Sample of named route: # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase @@ -386,11 +660,11 @@ Pettanr::Application.routes.draw do # You can have the root of your site routed with "root" # just remember to delete public/index.html. - root :to => 'comics#top' + root :to => 'top#index' # See how all your routes lay out with "rake routes" # 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)))' end