OSDN Git Service

t#28985:add credit
[pettanr/pettanr.git] / config / routes.rb
index 849d93b..e2e60d6 100644 (file)
@@ -1,14 +1,13 @@
 Pettanr::Application.routes.draw do
 
+  devise_for :users , :controllers => { :registrations => "user_registrations" }
   devise_for :admins
-  devise_for :authors
 
-  match 'original_pictures/:id(.:format)/refresh' => 'original_pictures#refresh'
-
-  resources :artists do
+  resources :authors do
     collection do
       get :index
       get :show
+      get :count
       post :create
       get :list
       get :browse
@@ -18,17 +17,21 @@ Pettanr::Application.routes.draw do
       delete :destroy
     end
   end
-  resources :speaches do
+  resources :artists do
     collection do
       get :index
       get :show
+      get :count
+      post :create
       get :list
       get :browse
     end
     member do
+      put :update
+      delete :destroy
     end
   end
-  resources :balloons do
+  resources :speech_balloon_templates do
     collection do
       get :index
       get :show
@@ -36,39 +39,31 @@ Pettanr::Application.routes.draw do
       get :browse
     end
     member do
+      delete :destroy
     end
   end
-  resources :speach_templates do
+  resources :speeches do
     collection do
-      get :index
-      get :show
       get :list
       get :browse
     end
     member do
     end
   end
-  resources :balloon_templates do
+  resources :balloons do
     collection do
-      get :index
-      get :show
       get :list
       get :browse
     end
     member do
     end
   end
-  resources :speach_balloons do
+  resources :speech_balloons do
     collection do
-      get :index
-      get :show
-      post :create
       get :list
       get :browse
     end
     member do
-      put :update
-      delete :destroy
     end
   end
   resources :panel_pictures do
@@ -81,21 +76,35 @@ Pettanr::Application.routes.draw do
     member do
     end
   end
+  resources :pictures do
+    collection do
+      get :show
+    end
+    member do
+      get :credit
+    end
+  end
   resources :resource_pictures do
     collection do
       get :index
+      get :new
       get :show
+      post :create
+      get :count
       get :list
       get :browse
     end
     member do
+      get :credit
     end
   end
   resources :original_pictures do
+    new do
+      get :new
+    end
     collection do
       get :index
       get :show
-      get :new
       post :create
       get :list
       get :browse
@@ -106,10 +115,30 @@ Pettanr::Application.routes.draw do
       delete :destroy
     end
   end
+  resources :original_picture_license_groups do
+    new do
+      get :new
+    end
+    collection do
+      post :create
+    end
+  end
+  resources :standard_licenses do
+    new do
+      get :new
+    end
+    collection do
+      post :create
+    end
+  end
   resources :panels do
+    new do
+      get :new
+    end
     collection do
       get :index
       get :show
+      get :count
       post :create
       get :list
       get :browse
@@ -119,10 +148,29 @@ Pettanr::Application.routes.draw do
       delete :destroy
     end
   end
-  resources :comics do #, except: [:new, :edit]
+  resources :stories do
+    new do
+      get :new
+    end
+    collection do
+      get :show
+      post :create
+      get :list
+      get :browse
+    end
+    member do
+      put :update
+      delete :destroy
+    end
+  end
+  resources :comics do
+    new do
+      get :new
+    end
     collection do
       get :index
       get :show
+      get :count
       post :create
       get :list
       get :browse
@@ -132,7 +180,7 @@ Pettanr::Application.routes.draw do
       delete :destroy
     end
   end
-  resources :lisences do
+  resources :licenses do
     collection do
       get :index
       get :show
@@ -140,12 +188,21 @@ Pettanr::Application.routes.draw do
       get :browse
     end
   end
-  resources :original_lisences do
+  resources :license_groups do
+    collection do
+      get :index
+      get :show
+      get :list
+      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
@@ -155,11 +212,11 @@ Pettanr::Application.routes.draw do
       delete :destroy
     end
   end
-  resources :common_lisences do
+  resources :common_licenses do
     collection do
       get :index
       get :show
-      post :create
+      post :import
       get :list
       get :browse
     end
@@ -188,16 +245,12 @@ 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 'comics/:id(.:format)/play' => 'comics#play'
   match 'resource_pictures/:subdir/:id(.:format)/' => 'resource_pictures#show'
+  match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
   match 'home/(:action)', :controller => 'home'
   match 'help/(:action)', :controller => 'help'
   match 'system/(:action)', :controller => 'system'
-#  controller 'system' do
-#    get 'start'
-#    get 'index'
-##    match 'start', :to => 'system#start'
-#  end
+  match 'authors/(:action(/:id))', :controller => 'authors'
   
   # Sample of named route:
   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase