X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=config%2Froutes.rb;h=59fc6e55eed5f469be55b0768355f776eaaa46aa;hb=6e4ecd2a9d6e7b3c37a9f5a1609683eef7d95eee;hp=298471fe139075bc2d4ebb7b3ecbdd12f7619b4e;hpb=446bb160b02df2c5966188f18e28632e70723861;p=pettanr%2Fpettanr.git diff --git a/config/routes.rb b/config/routes.rb index 298471fe..59fc6e55 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,171 +1,447 @@ 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' - - resources :authors do + devise_for :demand_users + + Pettanr::Application.manifest.system_resources.license_groups.each do |klass, name| + 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 + + resources :scrolls do + new do + get :new + end collection do get :index get :show get :count post :create - get :list + end + member do + get :scroll_panels + get :panels + get :by_author + get :by_panel + get :play + get :edit + put :update + delete :destroy get :browse end + end + resources :scroll_panels do + new do + get :new + end + collection do + get :index + get :show + post :create + end member do + get :by_panel + get :by_scroll + get :edit put :update delete :destroy end end - resources :artists 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 :stories + get :by_author + get :by_me + get :play + get :edit put :update delete :destroy end end - resources :speach_balloon_templates do + resources :stories do + new do + get :new + end collection do get :index get :show - get :list - get :browse + post :create end member do + get :story_sheets + get :sheets + get :by_comic + get :by_sheet + get :by_author + get :play + get :edit + put :update delete :destroy end end - resources :speach_templates do + resources :story_sheets do + new do + get :new + end collection do get :index get :show - get :list - get :browse + post :create end member do + get :by_story + get :by_sheet + get :edit + put :update + delete :destroy end end - resources :balloon_templates do + resources :sheets do + new do + get :new + end collection do get :index get :show - get :list - get :browse + 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 :play + get :edit + put :update + delete :destroy end end - resources :speaches do + resources :sheet_panels do + new do + get :new + end collection do - get :list - get :browse + get :index + get :show + post :create + end + member do + get :by_sheet + get :by_panel + get :edit + put :update + delete :destroy + end + end + resources :panels do + new do + get :new + end + collection do + get :index + get :show + get :count + post :create end member do + get :scroll_panels + get :scrolls + get :sheet_panels + get :sheets + get :panel_pictures + get :speech_balloons + get :ground_pictures + get :ground_colors + get :by_scroll + get :by_sheet + get :by_author + get :catch + get :edit + put :update + delete :destroy + end + end + resources :panel_pictures do + new do + get :new + end + collection do + get :index + get :show + post :create + end + member do + get :by_panel + get :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 + post :create + end + member do + get :by_panel + get :by_author + #get :by_speech_balloon_template + get :edit + put :update + delete :destroy end end resources :balloons do collection do - get :list - get :browse + get :index + get :show end member do + get :by_speech_balloon + #get :by_system_picture end end - resources :speach_balloons do + resources :speeches do collection do - get :list - get :browse + get :index + get :show end member do + get :by_speech_balloon + get :by_writing_format end end - resources :panel_pictures do + resources :ground_pictures do + new do + get :new + end collection do get :index get :show + end + member do + get :by_panel + get :by_author + get :edit + put :update + delete :destroy + end + end + resources :ground_colors do + new do + get :new + end + collection do + get :index + get :show + end + member do + get :by_panel + get :by_author + get :edit + put :update + delete :destroy + end + end + resources :original_pictures do + new do + get :new + end + collection do + get :index + get :show + post :create + end + member do + get :edit + put :update + delete :destroy + get :history + end + end + resources :pictures do + collection do + get :show + get :credit + get :search get :list - get :browse end member do + get :credit + get :browse end end resources :resource_pictures do collection do get :index get :show + get :new + post :create get :count - get :list - get :browse end member do + get :by_license + get :by_license_group + get :artist + delete :destroy + get :credit end end - resources :original_pictures do + resources :speech_balloon_templates do collection do get :index get :show + end + member do + get :speech_balloons + get :panels + get :by_system_picture + delete :destroy + end + end + resources :writing_formats do + collection do + get :index + get :show + end + member do + get :speeches + get :by_system_picture + end + end + resources :license_groups do + collection do + get :index + get :show + end + member do + get :licenses + delete :destroy + end + end + resources :licenses do + collection do + get :index + get :show + get :search + end + member do + get :resource_pictures + get :by_license_group + get :by_system_picture + end + 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 :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 get :edit put :update delete :destroy end end - resources :panels do + 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 :resource_pictures + get :edit put :update delete :destroy end end - resources :comics do #, except: [:new, :edit] + resources :system_pictures do collection do get :index get :show - get :count + end + member do + #get :balloons + get :speech_balloon_templates + get :licenses + delete :destroy + end + end + resources :original_picture_license_groups do + new do + post :new + end + collection do post :create + end + end + resources :provider_sources do + collection do + get :index + post :import get :list get :browse end member do - put :update - delete :destroy end end - resources :licenses do + resources :providers do collection do get :index get :show get :list get :browse end + member do + delete :destroy + end end - resources :original_licenses do + resources :provider_statuses do collection do get :index get :show - get :new - post :create get :list get :browse end @@ -173,52 +449,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 :import + 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 @@ -262,11 +547,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