OSDN Git Service

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