OSDN Git Service

t#32046:
[pettanr/pettanr.git] / config / routes.rb
1 Pettanr::Application.routes.draw do
2
3   devise_for :users
4   devise_for :admins
5   devise_for :demand_users
6   
7   Pettanr::Application.licenses.each do |name, klass|
8     mount Module.const_get(klass)::Engine => "/#{name}"
9   end
10   Pettanr::Application.speech_balloons.each do |klass , name|
11     mount Module.const_get(klass)::Engine => "/#{name}"
12   end
13   
14   resources :authors do
15     new do
16       get :new
17     end
18     collection do
19       get :index
20       get :show
21       get :count
22       post :create
23       get :list
24     end
25     member do
26       get :edit
27       put :update
28       delete :destroy
29       get :browse
30       get :scrolls
31       get :scroll_panels
32       get :panels
33       get :panel_pictures
34       get :speech_balloons
35       get :ground_pictures
36       get :ground_colors
37     end
38   end
39   resources :artists do
40     new do
41       get :new
42     end
43     collection do
44       get :index
45       get :show
46       get :count
47       post :create
48       get :list
49     end
50     member do
51       get :edit
52       put :update
53       delete :destroy
54       get :browse
55       get :resource_pictures
56     end
57   end
58   resources :comics do
59     new do
60       get :new
61     end
62     collection do
63       get :index
64       get :show
65       get :count
66       post :create
67       get :list
68     end
69     member do
70       get :play
71       get :edit
72       put :update
73       delete :destroy
74       get :browse
75     end
76   end
77   resources :stories do
78     new do
79       get :new
80     end
81     collection do
82       get :index
83       get :show
84       post :create
85       get :list
86     end
87     member do
88       get :edit
89       put :update
90       delete :destroy
91       get :browse
92     end
93   end
94   resources :sheets do
95     new do
96       get :new
97     end
98     collection do
99       get :index
100       get :show
101       get :count
102       post :create
103       get :list
104     end
105     member do
106       get :edit
107       put :update
108       delete :destroy
109       get :browse
110     end
111   end
112   resources :sheet_panels do
113     new do
114       get :new
115     end
116     collection do
117       get :index
118       get :show
119       post :create
120       get :list
121     end
122     member do
123       get :edit
124       put :update
125       delete :destroy
126       get :browse
127     end
128   end
129   resources :scrolls do
130     new do
131       get :new
132     end
133     collection do
134       get :index
135       get :show
136       get :count
137       post :create
138       get :list
139     end
140     member do
141       get :play
142       get :edit
143       put :update
144       delete :destroy
145       get :browse
146     end
147   end
148   resources :scroll_panels do
149     new do
150       get :new
151     end
152     collection do
153       get :index
154       get :show
155       post :create
156       get :list
157     end
158     member do
159       get :edit
160       put :update
161       delete :destroy
162       get :browse
163     end
164   end
165   resources :panels do
166     new do
167       get :new
168     end
169     collection do
170       get :index
171       get :show
172       get :count
173       post :create
174       get :list
175     end
176     member do
177       get :catch
178       get :edit
179       put :update
180       delete :destroy
181       get :browse
182     end
183   end
184   resources :panel_pictures do
185     new do
186       get :new
187     end
188     collection do
189       get :index
190       get :show
191       post :create
192       get :list
193     end
194     member do
195       get :edit
196       put :update
197       delete :destroy
198       get :browse
199     end
200   end
201   resources :speech_balloons do
202     new do
203       get :new
204     end
205     collection do
206       get :index
207       get :show
208       post :create
209       get :list
210     end
211     member do
212       get :edit
213       put :update
214       delete :destroy
215       get :browse
216     end
217   end
218   resources :balloons do
219     collection do
220       get :index
221       get :show
222       get :list
223     end
224     member do
225       get :browse
226     end
227   end
228   resources :speeches do
229     collection do
230       get :index
231       get :show
232       get :list
233     end
234     member do
235       get :browse
236     end
237   end
238   resources :ground_colors do
239     new do
240       get :new
241     end
242     collection do
243       get :index
244       get :show
245     end
246     member do
247       get :edit
248       put :update
249       delete :destroy
250       get :browse
251     end
252   end
253   resources :ground_pictures do
254     new do
255       get :new
256     end
257     collection do
258       get :index
259       get :show
260     end
261     member do
262       get :edit
263       put :update
264       delete :destroy
265       get :browse
266     end
267   end
268   resources :original_pictures do
269     new do
270       get :new
271     end
272     collection do
273       get :index
274       get :show
275       post :create
276       get :list
277     end
278     member do
279       get :edit
280       put :update
281       delete :destroy
282       get :history
283       get :browse
284     end
285   end
286   resources :resource_pictures do
287     collection do
288       get :index
289       get :show
290       get :new
291       post :create
292       get :count
293       get :list
294     end
295     member do
296       delete :destroy
297       get :credit
298       get :browse
299     end
300   end
301   resources :pictures do
302     collection do
303       get :show
304       get :credit
305       get :search
306       get :list
307     end
308     member do
309       get :credit
310       get :browse
311     end
312   end
313   resources :speech_balloon_templates do
314     collection do
315       get :index
316       get :show
317       get :list
318     end
319     member do
320       get :browse
321       delete :destroy
322     end
323   end
324   resources :licenses do
325     collection do
326       get :index
327       get :show
328       get :search
329       get :list
330     end
331     member do
332       get :browse
333     end
334   end
335   resources :license_groups do
336     collection do
337       get :index
338       get :show
339       get :list
340     end
341     member do
342       get :browse
343       delete :destroy
344     end
345   end
346   resources :original_picture_license_groups do
347     new do
348       post :new
349     end
350     collection do
351       post :create
352     end
353   end
354   resources :system_pictures do
355     collection do
356       get :index
357       get :show
358       get :list
359     end
360     member do
361       get :browse
362       delete :destroy
363     end
364   end
365   resources :provider_sources do
366     collection do
367       get :index
368       post :import
369       get :list
370       get :browse
371     end
372     member do
373     end
374   end
375   resources :providers do
376     collection do
377       get :index
378       get :show
379       get :list
380       get :browse
381     end
382     member do
383       delete :destroy
384     end
385   end
386   resources :provider_statuses do
387     collection do
388       get :index
389       get :show
390       get :list
391       get :browse
392     end
393     member do
394       get :edit
395       put :update
396       delete :destroy
397       post :licenses_import
398       post :artists_import
399       post :original_pictures_import
400       post :import
401     end
402   end
403   resources :demanders do
404     new do
405       get :new
406     end
407     collection do
408       get :index
409       get :show
410       post :create
411       get :list
412       get :browse
413       post :req
414       get :licenses_export
415       get :artists_export
416       get :original_pictures_export
417       get :pictures_export
418       get :export
419     end
420     member do
421       get :edit
422       put :update
423       delete :destroy
424     end
425   end
426   resources :demander_statuses do
427     collection do
428       get :index
429       get :show
430       get :list
431       get :browse
432     end
433     member do
434       get :edit
435       put :update
436       delete :destroy
437     end
438   end
439   # The priority is based upon order of creation:
440   # first created -> highest priority.
441
442   # Sample of regular route:
443   #   match 'products/:id' => 'catalog#view'
444   # Keep in mind you can assign values other than :controller and :action
445   match 'resource_pictures/:subdir/:id(.:format)/' => 'resource_pictures#show'
446   match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
447   #match 'scroll_panels/scroll/:id(.:format)' => 'scroll_panels#scroll'
448   match 'top/(:action)', :controller => 'top'
449   match 'home/(:action)', :controller => 'home'
450   match 'system/(:action)', :controller => 'system'
451   #match 'authors/(:action(/:id))', :controller => 'authors'
452   
453   # Sample of named route:
454   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
455   # This route can be invoked with purchase_url(:id => product.id)
456
457   # Sample resource route (maps HTTP verbs to controller actions automatically):
458   #   resources :products
459
460   # Sample resource route with options:
461   #   resources :products do
462   #     member do
463   #       get 'short'
464   #       post 'toggle'
465   #     end
466   #
467   #     collection do
468   #       get 'sold'
469   #     end
470   #   end
471
472   # Sample resource route with sub-resources:
473   #   resources :products do
474   #     resources :comments, :sales
475   #     resource :seller
476   #   end
477
478   # Sample resource route with more complex sub-resources
479   #   resources :products do
480   #     resources :comments
481   #     resources :sales do
482   #       get 'recent', :on => :collection
483   #     end
484   #   end
485
486   # Sample resource route within a namespace:
487   #   namespace :admin do
488   #     # Directs /admin/products/* to Admin::ProductsController
489   #     # (app/controllers/admin/products_controller.rb)
490   #     resources :products
491   #   end
492
493   # You can have the root of your site routed with "root"
494   # just remember to delete public/index.html.
495   root :to => 'top#index'
496
497   # See how all your routes lay out with "rake routes"
498
499   # This is a legacy wild controller route that's not recommended for RESTful applications.
500   # Note: This route will make all actions in every controller accessible via GET requests.
501   match ':controller(/:action(/:id(.:format)))'
502 end