OSDN Git Service

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