OSDN Git Service

fix manifest
[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 :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_speech_balloon
292       #get :by_system_picture
293       get :count_by_speech_balloon
294       get :edit
295       put :update
296     end
297   end
298   resources :speeches do
299     collection do
300       get :index
301       get :show
302       get :count
303     end
304     member do
305       get :by_speech_balloon
306       get :by_writing_format
307       get :count_by_speech_balloon
308       get :count_by_writing_format
309       get :edit
310       put :update
311     end
312   end
313   resources :ground_pictures do
314     new do
315       get :new
316     end
317     collection do
318       get :index
319       get :show
320       get :count
321     end
322     member do
323       get :by_panel
324       get :by_author
325       get :count_by_panel
326       get :count_by_author
327       get :edit
328       put :update
329       delete :destroy
330     end
331   end
332   resources :ground_colors do
333     new do
334       get :new
335     end
336     collection do
337       get :index
338       get :show
339       get :count
340     end
341     member do
342       get :by_panel
343       get :by_author
344       get :count_by_panel
345       get :count_by_author
346       get :edit
347       put :update
348       delete :destroy
349     end
350   end
351   resources :original_pictures do
352     new do
353       get :new
354     end
355     collection do
356       get :index
357       get :show
358       get :count
359       post :create
360     end
361     member do
362       get :edit
363       put :update
364       delete :destroy
365       get :history
366     end
367   end
368   resources :pictures do
369     collection do
370       get :index
371       get :show
372       get :count
373       get :credit
374       get :search
375       get :list
376     end
377     member do
378       get :credit
379       get :browse
380     end
381   end
382   resources :resource_pictures do
383     collection do
384       get :index
385       get :show
386       get :count
387       get :new
388       post :create
389       get :count
390     end
391     member do
392       get :by_license
393         get :by_license_group
394       get :by_artist
395       get :count_by_license
396         get :count_by_license_group
397       get :count_by_artist
398       delete :destroy
399       get :credit
400     end
401   end
402   resources :speech_balloon_templates do
403     collection do
404       get :index
405       get :show
406       get :count
407     end
408     member do
409       get :by_panel
410       get :by_system_picture
411       get :count_by_system_picture
412       get :count_by_panel
413       delete :destroy
414     end
415   end
416   resources :writing_formats do
417     collection do
418       get :index
419       get :show
420       get :count
421     end
422     member do
423       get :speeches
424       get :by_system_picture
425       get :speeches_count
426       get :count_by_system_picture
427     end
428   end
429   resources :license_groups do
430     collection do
431       get :index
432       get :show
433       get :count
434     end
435     member do
436       get :licenses
437       get :licenses_count
438       delete :destroy
439     end
440   end
441   resources :licenses do
442     collection do
443       get :index
444       get :show
445       get :count
446       get :search
447     end
448     member do
449       get :resource_pictures
450       get :by_license_group
451       get :by_system_picture
452       get :resource_pictures_count
453       get :count_by_license_group
454       get :count_by_system_picture
455     end
456   end
457   resources :authors do
458     new do
459       get :new
460     end
461     collection do
462       get :index
463       get :show
464       get :count
465       post :create
466     end
467     member do
468       get :edit
469       put :update
470       delete :destroy
471     end
472   end
473   resources :artists do
474     new do
475       get :new
476     end
477     collection do
478       get :index
479       get :show
480       get :count
481       post :create
482     end
483     member do
484       get :edit
485       put :update
486       delete :destroy
487     end
488   end
489   resources :system_pictures do
490     collection do
491       get :index
492       get :show
493       get :count
494     end
495     member do
496       #get :balloons
497       get :speech_balloon_templates
498       get :licenses
499       get :speech_balloon_templates_count
500       get :licenses_count
501       delete :destroy
502     end
503   end
504   resources :original_picture_license_groups do
505     new do
506       post :new
507     end
508     collection do
509       post :create
510     end
511   end
512   resources :provider_sources do
513     collection do
514       get :index
515       post :import
516       get :list
517       get :browse
518     end
519     member do
520     end
521   end
522   resources :providers do
523     collection do
524       get :index
525       get :show
526       get :list
527       get :browse
528     end
529     member do
530       delete :destroy
531     end
532   end
533   resources :provider_statuses do
534     collection do
535       get :index
536       get :show
537       get :list
538       get :browse
539     end
540     member do
541       get :edit
542       put :update
543       delete :destroy
544       post :licenses_import
545       post :artists_import
546       post :original_pictures_import
547       post :import
548     end
549   end
550   resources :demanders do
551     new do
552       get :new
553     end
554     collection do
555       get :index
556       get :show
557       post :create
558       get :list
559       get :browse
560       post :req
561       get :licenses_export
562       get :artists_export
563       get :original_pictures_export
564       get :pictures_export
565       get :export
566     end
567     member do
568       get :edit
569       put :update
570       delete :destroy
571     end
572   end
573   resources :demander_statuses do
574     collection do
575       get :index
576       get :show
577       get :list
578       get :browse
579     end
580     member do
581       get :edit
582       put :update
583       delete :destroy
584     end
585   end
586   # The priority is based upon order of creation:
587   # first created -> highest priority.
588
589   # Sample of regular route:
590   #   match 'products/:id' => 'catalog#view'
591   # Keep in mind you can assign values other than :controller and :action
592   
593   # resource_pictures/1.png?subdir=full
594   # match 'resource_pictures/full/:id(.:format)/' => 'resource_pictures#show'
595   # match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
596   #match 'scroll_panels/scroll/:id(.:format)' => 'scroll_panels#scroll'
597   match 'top/(:action)', :controller => 'top'
598   match 'home/(:action)', :controller => 'home'
599   match 'system/(:action)', :controller => 'system'
600   #match 'authors/(:action(/:id))', :controller => 'authors'
601   
602   # Sample of named route:
603   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
604   # This route can be invoked with purchase_url(:id => product.id)
605
606   # Sample resource route (maps HTTP verbs to controller actions automatically):
607   #   resources :products
608
609   # Sample resource route with options:
610   #   resources :products do
611   #     member do
612   #       get 'short'
613   #       post 'toggle'
614   #     end
615   #
616   #     collection do
617   #       get 'sold'
618   #     end
619   #   end
620
621   # Sample resource route with sub-resources:
622   #   resources :products do
623   #     resources :comments, :sales
624   #     resource :seller
625   #   end
626
627   # Sample resource route with more complex sub-resources
628   #   resources :products do
629   #     resources :comments
630   #     resources :sales do
631   #       get 'recent', :on => :collection
632   #     end
633   #   end
634
635   # Sample resource route within a namespace:
636   #   namespace :admin do
637   #     # Directs /admin/products/* to Admin::ProductsController
638   #     # (app/controllers/admin/products_controller.rb)
639   #     resources :products
640   #   end
641
642   # You can have the root of your site routed with "root"
643   # just remember to delete public/index.html.
644   root :to => 'top#index'
645
646   # See how all your routes lay out with "rake routes"
647
648   # This is a legacy wild controller route that's not recommended for RESTful applications.
649   # Note: This route will make all actions in every controller accessible via GET requests.
650   match ':controller(/:action(/:id(.:format)))'
651 end