OSDN Git Service

698ec18e42e7fe5cf848c140ec3c1c45746a0f2f
[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   Manifest.manifest.system_resources.templates.each do |template_name, template|
8     if template.add_route?
9       template.template_items.each do |klass, name|
10         mount Module.const_get(klass)::Engine => "/#{name}"
11       end
12     end
13   end
14   
15   resources :folders do
16     new do
17       get :new
18     end
19     collection do
20       get :root
21       get :index
22       get :show
23       get :count
24       post :create
25     end
26     member do
27       get :edit
28       put :update
29       delete :destroy
30     end
31   end
32   resources :scrolls do
33     new do
34       get :new
35     end
36     collection do
37       get :index
38       get :show
39       get :count
40       post :create
41     end
42     member do
43       get :by_author
44       get :by_panel
45       get :count_by_author
46       get :count_by_panel
47       get :play
48       get :edit
49       put :update
50       delete :destroy
51       get :browse
52     end
53   end
54   resources :scroll_panels do
55     new do
56       get :new
57     end
58     collection do
59       get :index
60       get :show
61       get :count
62       post :create
63     end
64     member do
65       get :by_panel
66       get :by_scroll
67       get :by_author
68       get :count_by_panel
69       get :count_by_scroll
70       get :count_by_author
71       get :edit
72       put :update
73       delete :destroy
74     end
75   end
76   resources :comics do
77     new do
78       get :new
79     end
80     collection do
81       get :index
82       get :show
83       get :count
84       post :create
85     end
86     member do
87       get :by_author
88       get :by_story
89       get :count_by_author
90       get :count_by_story
91       get :play
92       get :edit
93       put :update
94       delete :destroy
95     end
96   end
97   resources :comic_stories do
98     new do
99       get :new
100     end
101     collection do
102       get :index
103       get :show
104       get :count
105       post :create
106     end
107     member do
108       get :by_comic
109       get :by_story
110       get :by_author
111       get :count_by_comic
112       get :count_by_story
113       get :count_by_author
114       get :edit
115       put :update
116       delete :destroy
117     end
118   end
119   resources :stories do
120     new do
121       get :new
122     end
123     collection do
124       get :index
125       get :show
126       get :count
127       post :create
128     end
129     member do
130       get :by_comic
131       get :by_sheet
132       get :by_author
133       get :count_by_comic
134       get :count_by_sheet
135       get :count_by_author
136       get :play
137       get :edit
138       put :update
139       delete :destroy
140     end
141   end
142   resources :story_sheets do
143     new do
144       get :new
145     end
146     collection do
147       get :index
148       get :show
149       get :count
150       post :create
151     end
152     member do
153       get :by_story
154       get :by_sheet
155       get :by_author
156       get :count_by_story
157       get :count_by_sheet
158       get :count_by_author
159       get :edit
160       put :update
161       delete :destroy
162     end
163   end
164   resources :sheets do
165     new do
166       get :new
167     end
168     collection do
169       get :index
170       get :show
171       get :count
172       post :create
173     end
174     member do
175       get :story_sheets
176       get :stories
177       get :sheet_panels
178       get :panels
179       get :by_story
180       get :by_panel
181       get :by_author
182       get :count_by_story
183       get :count_by_panel
184       get :count_by_author
185       get :play
186       get :edit
187       put :update
188       delete :destroy
189     end
190   end
191   resources :sheet_panels do
192     new do
193       get :new
194     end
195     collection do
196       get :index
197       get :show
198       get :count
199       post :create
200     end
201     member do
202       get :by_sheet
203       get :by_panel
204       get :by_author
205       get :count_by_sheet
206       get :count_by_panel
207       get :count_by_author
208       get :edit
209       put :update
210       delete :destroy
211     end
212   end
213   resources :panels do
214     new do
215       get :new
216     end
217     collection do
218       get :index
219       get :show
220       get :count
221       post :create
222     end
223     member do
224       get :by_scroll
225       get :by_sheet
226       get :by_author
227       get :by_speech_balloon_template
228       get :count_by_scroll
229       get :count_by_sheet
230       get :count_by_author
231       get :count_by_speech_balloon_template
232       get :catch
233       get :edit
234       put :update
235       delete :destroy
236     end
237   end
238   resources :panel_pictures do
239     new do
240       get :new
241     end
242     collection do
243       get :index
244       get :show
245       get :count
246       post :create
247     end
248     member do
249       get :by_panel
250       get :by_author
251       get :count_by_panel
252       get :count_by_author
253       get :edit
254       put :update
255       delete :destroy
256     end
257   end
258   resources :speech_balloons do
259     new do
260       get :new
261     end
262     collection do
263       get :index
264       get :show
265       get :count
266       post :create
267     end
268     member do
269       get :by_panel
270       get :by_author
271       get :by_speech_balloon_template
272       get :count_by_panel
273       get :count_by_author
274       get :count_by_speech_balloon_template
275       get :edit
276       put :update
277       delete :destroy
278     end
279   end
280   resources :balloons do
281     collection do
282       get :index
283       get :show
284       get :count
285     end
286     member do
287       get :by_author
288       get :count_by_author
289       get :edit
290       put :update
291     end
292   end
293   resources :speeches do
294     collection do
295       get :index
296       get :show
297       get :count
298     end
299     member do
300       get :by_author
301       get :count_by_author
302       get :edit
303       put :update
304     end
305   end
306   resources :ground_pictures do
307     new do
308       get :new
309     end
310     collection do
311       get :index
312       get :show
313       get :count
314     end
315     member do
316       get :by_panel
317       get :by_author
318       get :count_by_panel
319       get :count_by_author
320       get :edit
321       put :update
322       delete :destroy
323     end
324   end
325   resources :ground_colors do
326     new do
327       get :new
328     end
329     collection do
330       get :index
331       get :show
332       get :count
333     end
334     member do
335       get :by_panel
336       get :by_author
337       get :count_by_panel
338       get :count_by_author
339       get :edit
340       put :update
341       delete :destroy
342     end
343   end
344   resources :original_pictures do
345     new do
346       get :new
347     end
348     collection do
349       get :index
350       get :show
351       get :count
352       post :create
353     end
354     member do
355       get :edit
356       put :update
357       delete :destroy
358       get :history
359     end
360   end
361   resources :pictures do
362     collection do
363       get :index
364       get :show
365       get :count
366       get :credit
367       get :search
368     end
369     member do
370       get :by_artist
371       get :count_by_artist
372       get :credit
373     end
374   end
375   resources :resource_pictures do
376     collection do
377       get :index
378       get :show
379       get :count
380       get :new
381       post :create
382       get :count
383     end
384     member do
385       get :by_license
386       get :by_artist
387       get :count_by_license
388       get :count_by_artist
389       delete :destroy
390       get :credit
391     end
392   end
393   resources :speech_balloon_templates do
394     collection do
395       get :index
396       get :show
397       get :count
398       post :create
399     end
400     member do
401       get :by_panel
402       get :by_system_picture
403       get :count_by_system_picture
404       get :count_by_panel
405       put :update
406       delete :destroy
407     end
408   end
409   resources :writing_formats do
410     collection do
411       get :index
412       get :show
413       get :count
414       post :create
415     end
416     member do
417       get :speeches
418       get :by_system_picture
419       get :speeches_count
420       get :count_by_system_picture
421       put :update
422       delete :destroy
423     end
424   end
425   resources :license_groups do
426     collection do
427       get :index
428       get :show
429       get :count
430       post :create
431     end
432     member do
433       get :licenses
434       get :licenses_count
435       put :update
436       delete :destroy
437     end
438   end
439   resources :licenses do
440     collection do
441       get :index
442       get :show
443       get :count
444       get :search
445       post :create
446     end
447     member do
448       get :resource_pictures
449       get :by_license_group
450       get :by_system_picture
451       get :resource_pictures_count
452       get :count_by_license_group
453       get :count_by_system_picture
454       put :update
455       delete :destroy
456     end
457   end
458   resources :authors do
459     new do
460       get :new
461     end
462     collection do
463       get :index
464       get :show
465       get :count
466       post :create
467     end
468     member do
469       get :edit
470       put :update
471       delete :destroy
472     end
473   end
474   resources :artists do
475     new do
476       get :new
477     end
478     collection do
479       get :index
480       get :show
481       get :count
482       post :create
483     end
484     member do
485       get :edit
486       put :update
487       delete :destroy
488     end
489   end
490   resources :system_pictures do
491     collection do
492       get :index
493       get :show
494       get :count
495     end
496     member do
497       #get :balloons
498       get :speech_balloon_templates
499       get :licenses
500       get :speech_balloon_templates_count
501       get :licenses_count
502       delete :destroy
503     end
504   end
505   resources :original_picture_license_groups do
506     new do
507       post :new
508     end
509     collection do
510       post :create
511     end
512   end
513   resources :provider_sources do
514     collection do
515       get :index
516       post :import
517       get :list
518       get :browse
519     end
520     member do
521     end
522   end
523   resources :providers do
524     collection do
525       get :index
526       get :show
527       get :list
528       get :browse
529     end
530     member do
531       delete :destroy
532     end
533   end
534   resources :provider_statuses do
535     collection do
536       get :index
537       get :show
538       get :list
539       get :browse
540     end
541     member do
542       get :edit
543       put :update
544       delete :destroy
545       post :licenses_import
546       post :artists_import
547       post :original_pictures_import
548       post :import
549     end
550   end
551   resources :demanders do
552     new do
553       get :new
554     end
555     collection do
556       get :index
557       get :show
558       post :create
559       get :list
560       get :browse
561       post :req
562       get :licenses_export
563       get :artists_export
564       get :original_pictures_export
565       get :pictures_export
566       get :export
567     end
568     member do
569       get :edit
570       put :update
571       delete :destroy
572     end
573   end
574   resources :demander_statuses do
575     collection do
576       get :index
577       get :show
578       get :list
579       get :browse
580     end
581     member do
582       get :edit
583       put :update
584       delete :destroy
585     end
586   end
587   # The priority is based upon order of creation:
588   # first created -> highest priority.
589
590   # Sample of regular route:
591   #   match 'products/:id' => 'catalog#view'
592   # Keep in mind you can assign values other than :controller and :action
593   
594   # resource_pictures/1.png?subdir=full
595   # match 'resource_pictures/full/:id(.:format)/' => 'resource_pictures#show'
596   # match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
597   #match 'scroll_panels/scroll/:id(.:format)' => 'scroll_panels#scroll'
598   match 'top/(:action)', :controller => 'top'
599   match 'home/(:action)', :controller => 'home'
600   match 'system/(:action)', :controller => 'system'
601   #match 'authors/(:action(/:id))', :controller => 'authors'
602   
603   # Sample of named route:
604   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
605   # This route can be invoked with purchase_url(:id => product.id)
606
607   # Sample resource route (maps HTTP verbs to controller actions automatically):
608   #   resources :products
609
610   # Sample resource route with options:
611   #   resources :products do
612   #     member do
613   #       get 'short'
614   #       post 'toggle'
615   #     end
616   #
617   #     collection do
618   #       get 'sold'
619   #     end
620   #   end
621
622   # Sample resource route with sub-resources:
623   #   resources :products do
624   #     resources :comments, :sales
625   #     resource :seller
626   #   end
627
628   # Sample resource route with more complex sub-resources
629   #   resources :products do
630   #     resources :comments
631   #     resources :sales do
632   #       get 'recent', :on => :collection
633   #     end
634   #   end
635
636   # Sample resource route within a namespace:
637   #   namespace :admin do
638   #     # Directs /admin/products/* to Admin::ProductsController
639   #     # (app/controllers/admin/products_controller.rb)
640   #     resources :products
641   #   end
642
643   # You can have the root of your site routed with "root"
644   # just remember to delete public/index.html.
645   root :to => 'top#index'
646
647   # See how all your routes lay out with "rake routes"
648
649   # This is a legacy wild controller route that's not recommended for RESTful applications.
650   # Note: This route will make all actions in every controller accessible via GET requests.
651   match ':controller(/:action(/:id(.:format)))'
652 end