OSDN Git Service

temp
[pettanr/pettanr.git] / config / routes.rb
index 30ba8d5..a5b0024 100644 (file)
@@ -4,7 +4,10 @@ Pettanr::Application.routes.draw do
   devise_for :admins
   devise_for :demand_users
   
-  Pettanr::Application.licenses.each do |name, klass|
+  Pettanr::Application.manifest.system_resources.licenses.each do |name, klass|
+    mount Module.const_get(klass)::Engine => "/#{name}"
+  end
+  Pettanr::Application.manifest.system_resources.speech_balloon_templates.each do |klass , name|
     mount Module.const_get(klass)::Engine => "/#{name}"
   end
   
@@ -20,12 +23,22 @@ Pettanr::Application.routes.draw do
       get :list
     end
     member do
+      get :edit
       put :update
       delete :destroy
       get :browse
+      get :scrolls
+      get :scroll_panels
       get :comics
       get :stories
+      get :story_sheets
+      get :sheets
+      get :sheet_panels
       get :panels
+      get :panel_pictures
+      get :speech_balloons
+      get :ground_pictures
+      get :ground_colors
     end
   end
   resources :artists do
@@ -40,171 +53,243 @@ Pettanr::Application.routes.draw do
       get :list
     end
     member do
+      get :edit
       put :update
       delete :destroy
       get :browse
       get :resource_pictures
     end
   end
-  resources :speech_balloon_templates do
+  resources :comics do
+    new do
+      get :new
+    end
     collection do
       get :index
       get :show
+      get :count
+      post :create
       get :list
     end
     member do
-      get :browse
+      get :play
+      get :edit
+      put :update
       delete :destroy
+      get :browse
     end
   end
-  resources :speeches do
+  resources :stories do
+    new do
+      get :new
+    end
     collection do
       get :index
       get :show
+      post :create
       get :list
     end
     member do
+      get :play
+      get :edit
+      put :update
+      delete :destroy
       get :browse
     end
   end
-  resources :balloons do
+  resources :story_sheets do
+    new do
+      get :new
+    end
     collection do
       get :index
       get :show
+      post :create
       get :list
     end
     member do
+      get :edit
+      put :update
+      delete :destroy
       get :browse
     end
   end
-  resources :speech_balloons do
+  resources :sheets do
+    new do
+      get :new
+    end
     collection do
       get :index
       get :show
+      get :count
+      post :create
       get :list
     end
     member do
+      get :play
+      get :edit
+      put :update
+      delete :destroy
       get :browse
     end
   end
-  resources :panel_pictures do
+  resources :sheet_panels do
+    new do
+      get :new
+    end
     collection do
       get :index
       get :show
+      post :create
       get :list
     end
     member do
+      get :edit
+      put :update
+      delete :destroy
       get :browse
     end
   end
-  resources :pictures do
+  resources :scrolls do
+    new do
+      get :new
+    end
     collection do
+      get :index
       get :show
-      get :credit
-      get :search
+      get :count
+      post :create
       get :list
     end
     member do
-      get :credit
+      get :play
+      get :edit
+      put :update
+      delete :destroy
       get :browse
     end
   end
-  resources :resource_pictures do
+  resources :scroll_panels do
+    new do
+      get :new
+    end
     collection do
       get :index
       get :show
-      get :new
       post :create
-      get :count
       get :list
     end
     member do
+      get :edit
+      put :update
       delete :destroy
-      get :credit
       get :browse
     end
   end
-  resources :original_pictures do
+  resources :panels do
     new do
       get :new
     end
     collection do
       get :index
       get :show
+      get :count
       post :create
       get :list
     end
     member do
+      get :catch
       get :edit
       put :update
       delete :destroy
-      get :history
       get :browse
     end
   end
-  resources :original_picture_license_groups do
+  resources :panel_pictures do
     new do
-      post :new
+      get :new
     end
     collection do
+      get :index
+      get :show
       post :create
+      get :list
+    end
+    member do
+      get :edit
+      put :update
+      delete :destroy
+      get :browse
     end
   end
-  resources :colors do
+  resources :speech_balloons do
+    new do
+      get :new
+    end
     collection do
       get :index
       get :show
+      post :create
       get :list
     end
     member do
+      get :edit
+      put :update
+      delete :destroy
       get :browse
     end
   end
-  resources :panel_colors do
+  resources :balloons do
     collection do
       get :index
       get :show
+      get :list
     end
     member do
       get :browse
     end
   end
-  resources :ground_colors do
+  resources :speeches do
     collection do
       get :index
       get :show
+      get :list
     end
     member do
       get :browse
     end
   end
-  resources :ground_pictures do
+  resources :ground_colors do
+    new do
+      get :new
+    end
     collection do
       get :index
       get :show
     end
     member do
+      get :edit
+      put :update
+      delete :destroy
       get :browse
     end
   end
-  resources :panels do
+  resources :ground_pictures do
     new do
       get :new
     end
     collection do
       get :index
       get :show
-      get :count
-      post :create
-      get :list
     end
     member do
+      get :edit
       put :update
       delete :destroy
       get :browse
     end
   end
-  resources :stories do
+  resources :original_pictures do
     new do
       get :new
     end
@@ -215,27 +300,58 @@ Pettanr::Application.routes.draw do
       get :list
     end
     member do
-      get :comic
+      get :edit
       put :update
       delete :destroy
+      get :history
       get :browse
     end
   end
-  resources :comics do
-    new do
+  resources :resource_pictures do
+    collection do
+      get :index
+      get :show
       get :new
+      post :create
+      get :count
+      get :list
     end
+    member do
+      delete :destroy
+      get :credit
+      get :browse
+    end
+  end
+  resources :pictures do
+    collection do
+      get :show
+      get :credit
+      get :search
+      get :list
+    end
+    member do
+      get :credit
+      get :browse
+    end
+  end
+  resources :speech_balloon_templates do
     collection do
       get :index
       get :show
-      get :count
-      post :create
       get :list
     end
     member do
-      get :edit
-      put :update
+      get :browse
       delete :destroy
+    end
+  end
+  resources :writing_formats do
+    collection do
+      get :index
+      get :show
+      get :list
+    end
+    member do
       get :browse
     end
   end
@@ -261,6 +377,14 @@ Pettanr::Application.routes.draw do
       delete :destroy
     end
   end
+  resources :original_picture_license_groups do
+    new do
+      post :new
+    end
+    collection do
+      post :create
+    end
+  end
   resources :system_pictures do
     collection do
       get :index
@@ -354,10 +478,11 @@ Pettanr::Application.routes.draw do
   # 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'
+  #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
@@ -401,11 +526,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