OSDN Git Service

t#29781:lisence manager change to rubygems.org
[pettanr/pettanr.git] / config / routes.rb
index e2e60d6..ac3e8d8 100644 (file)
@@ -2,7 +2,11 @@ Pettanr::Application.routes.draw do
 
   devise_for :users , :controllers => { :registrations => "user_registrations" }
   devise_for :admins
-
+  
+  Pettanr::Application.licenses.each do |name, klass|
+    mount Module.const_get(klass)::Engine => "/#{name}"
+  end
+  
   resources :authors do
     collection do
       get :index
@@ -79,6 +83,7 @@ Pettanr::Application.routes.draw do
   resources :pictures do
     collection do
       get :show
+      get :md5
     end
     member do
       get :credit
@@ -105,6 +110,7 @@ Pettanr::Application.routes.draw do
     collection do
       get :index
       get :show
+      get :history
       post :create
       get :list
       get :browse
@@ -123,12 +129,32 @@ Pettanr::Application.routes.draw do
       post :create
     end
   end
-  resources :standard_licenses do
-    new do
-      get :new
+  resources :colors do
+    collection do
+      get :index
+    end
+    member do
     end
+  end
+  resources :panel_colors do
     collection do
-      post :create
+      get :index
+    end
+    member do
+    end
+  end
+  resources :ground_colors do
+    collection do
+      get :index
+    end
+    member do
+    end
+  end
+  resources :ground_pictures do
+    collection do
+      get :index
+    end
+    member do
     end
   end
   resources :panels do
@@ -196,35 +222,6 @@ Pettanr::Application.routes.draw do
       get :browse
     end
   end
-  resources :original_licenses do
-    collection do
-      get :index
-      get :show
-      get :new
-      post :create
-      post :import
-      get :list
-      get :browse
-    end
-    member do
-      get :edit
-      put :update
-      delete :destroy
-    end
-  end
-  resources :common_licenses do
-    collection do
-      get :index
-      get :show
-      post :import
-      get :list
-      get :browse
-    end
-    member do
-      put :update
-      delete :destroy
-    end
-  end
   resources :system_pictures do
     collection do
       get :index
@@ -247,8 +244,8 @@ 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 'home/(:action)', :controller => 'home'
-  match 'help/(:action)', :controller => 'help'
   match 'system/(:action)', :controller => 'system'
   match 'authors/(:action(/:id))', :controller => 'authors'