X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=config%2Froutes.rb;h=48f61d0e8b2e9182146205f61ae33eb41308900b;hb=eb397c27a98c59c856b91a5b09d1316b1135a15c;hp=a7b534180fea5ee20d13e1c15aa50222b2f773f0;hpb=85f03f74712cc59441ce6a25c9811c27647fecd6;p=pettanr%2Fpettanr.git diff --git a/config/routes.rb b/config/routes.rb index a7b53418..48f61d0e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,148 +1,323 @@ Pettanr::Application.routes.draw do - devise_for :users , :controllers => { :registrations => "user_registrations" } + devise_for :users devise_for :admins - - match 'original_pictures/:id(.:format)/refresh' => 'original_pictures#refresh' - + devise_for :demand_users + + Pettanr::Application.licenses.each do |name, klass| + mount Module.const_get(klass)::Engine => "/#{name}" + end + Pettanr::Application.speech_balloons.each do |klass , name| + mount Module.const_get(klass)::Engine => "/#{name}" + end + resources :authors do + new do + get :new + end collection do get :index get :show + get :count post :create get :list - get :browse end member do + get :edit put :update delete :destroy + get :browse + get :scrolls + get :scroll_panels + get :panels + get :panel_pictures + get :speech_balloons + get :ground_pictures + get :ground_colors end end resources :artists do + new do + get :new + end collection do get :index get :show + get :count post :create get :list - get :browse end member do + get :edit put :update delete :destroy + get :browse + get :resource_pictures end end - resources :speaches do + resources :comics do + new do + get :new + end collection do get :index get :show + get :count + post :create get :list - get :browse end member do + get :play + get :edit + put :update + delete :destroy + get :browse end end - resources :balloons do + resources :stories do + new do + get :new + end collection do get :index get :show + post :create get :list - get :browse end member do + get :edit + put :update + delete :destroy + get :browse end end - resources :speach_templates do + resources :sheets do + new do + get :new + end collection do get :index get :show + get :count + post :create get :list - get :browse end member do + get :edit + put :update + delete :destroy + get :browse end end - resources :balloon_templates 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 :scrolls 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 :speach_balloons do + resources :scroll_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 :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 :browse end end resources :panel_pictures do + new do + get :new + end collection do get :index get :show + post :create get :list - get :browse end member do + get :edit + put :update + delete :destroy + get :browse end end - resources :resource_pictures 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 :balloons do + collection do + get :index + get :show + get :list + end member do + get :browse end end - resources :original_pictures do + resources :speeches do collection do get :index get :show - get :new - post :create get :list + end + member do get :browse end + end + 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 + end + member do + get :edit + put :update + delete :destroy + get :browse + end + end + resources :original_pictures do + new do + get :new + end collection do get :index get :show post :create get :list - get :browse end member do + get :edit put :update delete :destroy + get :history + get :browse end end - resources :comics do #, except: [:new, :edit] + resources :resource_pictures do collection do get :index get :show - get :count + 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 - put :update + get :credit + get :browse + end + end + resources :speech_balloon_templates do + collection do + get :index + get :show + get :list + end + member do + get :browse delete :destroy end end @@ -150,16 +325,68 @@ Pettanr::Application.routes.draw do collection do get :index get :show + get :search get :list + end + member do get :browse end end - resources :original_licenses do + resources :license_groups do collection do get :index get :show - get :new + get :list + end + member do + get :browse + 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 + get :show + get :list + end + member do + get :browse + delete :destroy + end + end + resources :provider_sources do + collection do + get :index + post :import + get :list + get :browse + end + member do + end + end + resources :providers do + collection do + get :index + get :show + get :list + get :browse + end + member do + delete :destroy + end + end + resources :provider_statuses do + collection do + get :index + get :show get :list get :browse end @@ -167,52 +394,61 @@ Pettanr::Application.routes.draw do get :edit put :update delete :destroy + post :licenses_import + post :artists_import + post :original_pictures_import + post :import end end - resources :common_licenses do + resources :demanders do + new do + get :new + end collection do get :index get :show post :create get :list get :browse + post :req + get :licenses_export + get :artists_export + get :original_pictures_export + get :pictures_export + get :export end member do + get :edit put :update delete :destroy end end - resources :system_pictures do + resources :demander_statuses do collection do get :index get :show - post :create get :list get :browse end member do + get :edit put :update delete :destroy end end - # The priority is based upon order of creation: # first created -> highest priority. # 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 'scroll_panels/scroll/:id(.:format)' => 'scroll_panels#scroll' + match 'top/(:action)', :controller => 'top' match 'home/(:action)', :controller => 'home' - match 'help/(:action)', :controller => 'help' match 'system/(:action)', :controller => 'system' - match 'authors/(:action(/:id))', :controller => 'authors' -# 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 @@ -256,11 +492,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