OSDN Git Service

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