OSDN Git Service

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