OSDN Git Service

add comic story
[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.engine_resources.each do |engine_resource_name, engine_resource|
8     if engine_resource.add_route?
9       engine_resource.resource_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 :story_sheets_count
183       get :stories_count
184       get :sheet_panels_count
185       get :panels_count
186       get :count_by_story
187       get :count_by_panel
188       get :count_by_author
189       get :play
190       get :edit
191       put :update
192       delete :destroy
193     end
194   end
195   resources :sheet_panels do
196     new do
197       get :new
198     end
199     collection do
200       get :index
201       get :show
202       get :count
203       post :create
204     end
205     member do
206       get :by_sheet
207       get :by_panel
208       get :by_author
209       get :count_by_sheet
210       get :count_by_panel
211       get :count_by_author
212       get :edit
213       put :update
214       delete :destroy
215     end
216   end
217   resources :panels do
218     new do
219       get :new
220     end
221     collection do
222       get :index
223       get :show
224       get :count
225       post :create
226     end
227     member do
228       get :scroll_panels
229       get :scrolls
230       get :sheet_panels
231       get :sheets
232       get :panel_pictures
233       get :speech_balloons
234       get :ground_pictures
235       get :ground_colors
236       get :by_scroll
237       get :by_sheet
238       get :by_author
239       get :scroll_panels_count
240       get :scrolls_count
241       get :sheet_panels_count
242       get :sheets_count
243       get :panel_pictures_count
244       get :speech_balloons_count
245       get :ground_pictures_count
246       get :ground_colors_count
247       get :count_by_scroll
248       get :count_by_sheet
249       get :count_by_author
250       get :catch
251       get :edit
252       put :update
253       delete :destroy
254     end
255   end
256   resources :panel_pictures do
257     new do
258       get :new
259     end
260     collection do
261       get :index
262       get :show
263       get :count
264       post :create
265     end
266     member do
267       get :by_panel
268       get :by_author
269       get :count_by_panel
270       get :count_by_author
271       get :edit
272       put :update
273       delete :destroy
274     end
275   end
276   resources :speech_balloons do
277     new do
278       get :new
279     end
280     collection do
281       get :index
282       get :show
283       get :count
284       post :create
285     end
286     member do
287       get :by_panel
288       get :by_author
289       #get :by_speech_balloon_template
290       get :count_by_panel
291       get :count_by_author
292       get :edit
293       put :update
294       delete :destroy
295     end
296   end
297   resources :balloons do
298     collection do
299       get :index
300       get :show
301       get :count
302     end
303     member do
304       get :by_speech_balloon
305       #get :by_system_picture
306       get :count_by_speech_balloon
307       get :edit
308       put :update
309     end
310   end
311   resources :speeches do
312     collection do
313       get :index
314       get :show
315       get :count
316     end
317     member do
318       get :by_speech_balloon
319       get :by_writing_format
320       get :count_by_speech_balloon
321       get :count_by_writing_format
322       get :edit
323       put :update
324     end
325   end
326   resources :ground_pictures do
327     new do
328       get :new
329     end
330     collection do
331       get :index
332       get :show
333       get :count
334     end
335     member do
336       get :by_panel
337       get :by_author
338       get :count_by_panel
339       get :count_by_author
340       get :edit
341       put :update
342       delete :destroy
343     end
344   end
345   resources :ground_colors do
346     new do
347       get :new
348     end
349     collection do
350       get :index
351       get :show
352       get :count
353     end
354     member do
355       get :by_panel
356       get :by_author
357       get :count_by_panel
358       get :count_by_author
359       get :edit
360       put :update
361       delete :destroy
362     end
363   end
364   resources :original_pictures do
365     new do
366       get :new
367     end
368     collection do
369       get :index
370       get :show
371       get :count
372       post :create
373     end
374     member do
375       get :edit
376       put :update
377       delete :destroy
378       get :history
379     end
380   end
381   resources :pictures do
382     collection do
383       get :index
384       get :show
385       get :count
386       get :credit
387       get :search
388       get :list
389     end
390     member do
391       get :credit
392       get :browse
393     end
394   end
395   resources :resource_pictures do
396     collection do
397       get :index
398       get :show
399       get :count
400       get :new
401       post :create
402       get :count
403     end
404     member do
405       get :by_license
406         get :by_license_group
407       get :by_artist
408       get :count_by_license
409         get :count_by_license_group
410       get :count_by_artist
411       delete :destroy
412       get :credit
413     end
414   end
415   resources :speech_balloon_templates do
416     collection do
417       get :index
418       get :show
419       get :count
420     end
421     member do
422       get :speech_balloons
423       get :panels
424       get :by_system_picture
425       get :speech_balloons_count
426       get :panels_count
427       get :count_by_system_picture
428       delete :destroy
429     end
430   end
431   resources :writing_formats do
432     collection do
433       get :index
434       get :show
435       get :count
436     end
437     member do
438       get :speeches
439       get :by_system_picture
440       get :speeches_count
441       get :count_by_system_picture
442     end
443   end
444   resources :license_groups do
445     collection do
446       get :index
447       get :show
448       get :count
449     end
450     member do
451       get :licenses
452       get :licenses_count
453       delete :destroy
454     end
455   end
456   resources :licenses do
457     collection do
458       get :index
459       get :show
460       get :count
461       get :search
462     end
463     member do
464       get :resource_pictures
465       get :by_license_group
466       get :by_system_picture
467       get :resource_pictures_count
468       get :count_by_license_group
469       get :count_by_system_picture
470     end
471   end
472   resources :authors do
473     new do
474       get :new
475     end
476     collection do
477       get :index
478       get :show
479       get :count
480       post :create
481     end
482     member do
483       get :edit
484       put :update
485       delete :destroy
486     end
487   end
488   resources :artists do
489     new do
490       get :new
491     end
492     collection do
493       get :index
494       get :show
495       get :count
496       post :create
497     end
498     member do
499       get :edit
500       put :update
501       delete :destroy
502     end
503   end
504   resources :system_pictures do
505     collection do
506       get :index
507       get :show
508       get :count
509     end
510     member do
511       #get :balloons
512       get :speech_balloon_templates
513       get :licenses
514       get :speech_balloon_templates_count
515       get :licenses_count
516       delete :destroy
517     end
518   end
519   resources :original_picture_license_groups do
520     new do
521       post :new
522     end
523     collection do
524       post :create
525     end
526   end
527   resources :provider_sources do
528     collection do
529       get :index
530       post :import
531       get :list
532       get :browse
533     end
534     member do
535     end
536   end
537   resources :providers do
538     collection do
539       get :index
540       get :show
541       get :list
542       get :browse
543     end
544     member do
545       delete :destroy
546     end
547   end
548   resources :provider_statuses do
549     collection do
550       get :index
551       get :show
552       get :list
553       get :browse
554     end
555     member do
556       get :edit
557       put :update
558       delete :destroy
559       post :licenses_import
560       post :artists_import
561       post :original_pictures_import
562       post :import
563     end
564   end
565   resources :demanders do
566     new do
567       get :new
568     end
569     collection do
570       get :index
571       get :show
572       post :create
573       get :list
574       get :browse
575       post :req
576       get :licenses_export
577       get :artists_export
578       get :original_pictures_export
579       get :pictures_export
580       get :export
581     end
582     member do
583       get :edit
584       put :update
585       delete :destroy
586     end
587   end
588   resources :demander_statuses do
589     collection do
590       get :index
591       get :show
592       get :list
593       get :browse
594     end
595     member do
596       get :edit
597       put :update
598       delete :destroy
599     end
600   end
601   # The priority is based upon order of creation:
602   # first created -> highest priority.
603
604   # Sample of regular route:
605   #   match 'products/:id' => 'catalog#view'
606   # Keep in mind you can assign values other than :controller and :action
607   
608   # resource_pictures/1.png?subdir=full
609   # match 'resource_pictures/full/:id(.:format)/' => 'resource_pictures#show'
610   # match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
611   #match 'scroll_panels/scroll/:id(.:format)' => 'scroll_panels#scroll'
612   match 'top/(:action)', :controller => 'top'
613   match 'home/(:action)', :controller => 'home'
614   match 'system/(:action)', :controller => 'system'
615   #match 'authors/(:action(/:id))', :controller => 'authors'
616   
617   # Sample of named route:
618   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
619   # This route can be invoked with purchase_url(:id => product.id)
620
621   # Sample resource route (maps HTTP verbs to controller actions automatically):
622   #   resources :products
623
624   # Sample resource route with options:
625   #   resources :products do
626   #     member do
627   #       get 'short'
628   #       post 'toggle'
629   #     end
630   #
631   #     collection do
632   #       get 'sold'
633   #     end
634   #   end
635
636   # Sample resource route with sub-resources:
637   #   resources :products do
638   #     resources :comments, :sales
639   #     resource :seller
640   #   end
641
642   # Sample resource route with more complex sub-resources
643   #   resources :products do
644   #     resources :comments
645   #     resources :sales do
646   #       get 'recent', :on => :collection
647   #     end
648   #   end
649
650   # Sample resource route within a namespace:
651   #   namespace :admin do
652   #     # Directs /admin/products/* to Admin::ProductsController
653   #     # (app/controllers/admin/products_controller.rb)
654   #     resources :products
655   #   end
656
657   # You can have the root of your site routed with "root"
658   # just remember to delete public/index.html.
659   root :to => 'top#index'
660
661   # See how all your routes lay out with "rake routes"
662
663   # This is a legacy wild controller route that's not recommended for RESTful applications.
664   # Note: This route will make all actions in every controller accessible via GET requests.
665   match ':controller(/:action(/:id(.:format)))'
666 end