OSDN Git Service

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