OSDN Git Service

add lg_id in resource picture
[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 :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 :count_by_story
183       get :count_by_panel
184       get :count_by_author
185       get :play
186       get :edit
187       put :update
188       delete :destroy
189     end
190   end
191   resources :sheet_panels do
192     new do
193       get :new
194     end
195     collection do
196       get :index
197       get :show
198       get :count
199       post :create
200     end
201     member do
202       get :by_sheet
203       get :by_panel
204       get :by_author
205       get :count_by_sheet
206       get :count_by_panel
207       get :count_by_author
208       get :edit
209       put :update
210       delete :destroy
211     end
212   end
213   resources :panels do
214     new do
215       get :new
216     end
217     collection do
218       get :index
219       get :show
220       get :count
221       post :create
222     end
223     member do
224       get :by_scroll
225       get :by_sheet
226       get :by_author
227       get :by_speech_balloon_template
228       get :count_by_scroll
229       get :count_by_sheet
230       get :count_by_author
231       get :count_by_speech_balloon_template
232       get :catch
233       get :edit
234       put :update
235       delete :destroy
236     end
237   end
238   resources :panel_pictures do
239     new do
240       get :new
241     end
242     collection do
243       get :index
244       get :show
245       get :count
246       post :create
247     end
248     member do
249       get :by_panel
250       get :by_author
251       get :count_by_panel
252       get :count_by_author
253       get :edit
254       put :update
255       delete :destroy
256     end
257   end
258   resources :speech_balloons do
259     new do
260       get :new
261     end
262     collection do
263       get :index
264       get :show
265       get :count
266       post :create
267     end
268     member do
269       get :by_panel
270       get :by_author
271       get :by_speech_balloon_template
272       get :count_by_panel
273       get :count_by_author
274       get :count_by_speech_balloon_template
275       get :edit
276       put :update
277       delete :destroy
278     end
279   end
280   resources :balloons do
281     collection do
282       get :index
283       get :show
284       get :count
285     end
286     member do
287       get :by_author
288       get :count_by_author
289       get :edit
290       put :update
291     end
292   end
293   resources :speeches do
294     collection do
295       get :index
296       get :show
297       get :count
298     end
299     member do
300       get :by_author
301       get :count_by_author
302       get :edit
303       put :update
304     end
305   end
306   resources :ground_pictures do
307     new do
308       get :new
309     end
310     collection do
311       get :index
312       get :show
313       get :count
314     end
315     member do
316       get :by_panel
317       get :by_author
318       get :count_by_panel
319       get :count_by_author
320       get :edit
321       put :update
322       delete :destroy
323     end
324   end
325   resources :ground_colors do
326     new do
327       get :new
328     end
329     collection do
330       get :index
331       get :show
332       get :count
333     end
334     member do
335       get :by_panel
336       get :by_author
337       get :count_by_panel
338       get :count_by_author
339       get :edit
340       put :update
341       delete :destroy
342     end
343   end
344   resources :original_pictures do
345     new do
346       get :new
347     end
348     collection do
349       get :index
350       get :show
351       get :count
352       post :create
353     end
354     member do
355       get :edit
356       put :update
357       delete :destroy
358       get :history
359     end
360   end
361   resources :pictures do
362     collection do
363       get :index
364       get :show
365       get :count
366       get :credit
367       get :search
368     end
369     member do
370       get :by_artist
371       get :count_by_artist
372       get :credit
373     end
374   end
375   resources :resource_pictures do
376     collection do
377       get :index
378       get :show
379       get :count
380       get :new
381       post :create
382       get :count
383     end
384     member do
385       get :by_license_group
386       get :by_license
387       get :by_artist
388       get :count_by_license_group
389       get :count_by_license
390       get :count_by_artist
391       delete :destroy
392       get :credit
393     end
394   end
395   resources :speech_balloon_templates do
396     collection do
397       get :index
398       get :show
399       get :count
400       post :create
401     end
402     member do
403       get :by_panel
404       get :by_system_picture
405       get :count_by_system_picture
406       get :count_by_panel
407       put :update
408       delete :destroy
409     end
410   end
411   resources :writing_formats do
412     collection do
413       get :index
414       get :show
415       get :count
416       post :create
417     end
418     member do
419       get :speeches
420       get :by_system_picture
421       get :speeches_count
422       get :count_by_system_picture
423       put :update
424       delete :destroy
425     end
426   end
427   resources :license_groups do
428     collection do
429       get :index
430       get :show
431       get :count
432       post :create
433     end
434     member do
435       get :resource_pictures
436       get :resource_pictures_count
437       get :licenses
438       get :licenses_count
439       put :update
440       delete :destroy
441     end
442   end
443   resources :licenses do
444     collection do
445       get :index
446       get :show
447       get :count
448       get :search
449       post :create
450     end
451     member do
452       get :resource_pictures
453       get :by_license_group
454       get :by_system_picture
455       get :resource_pictures_count
456       get :count_by_license_group
457       get :count_by_system_picture
458       put :update
459       delete :destroy
460     end
461   end
462   resources :authors do
463     new do
464       get :new
465     end
466     collection do
467       get :index
468       get :show
469       get :count
470       post :create
471     end
472     member do
473       get :edit
474       put :update
475       delete :destroy
476     end
477   end
478   resources :artists do
479     new do
480       get :new
481     end
482     collection do
483       get :index
484       get :show
485       get :count
486       post :create
487     end
488     member do
489       get :edit
490       put :update
491       delete :destroy
492     end
493   end
494   resources :system_pictures do
495     collection do
496       get :index
497       get :show
498       get :count
499     end
500     member do
501       #get :balloons
502       get :speech_balloon_templates
503       get :licenses
504       get :speech_balloon_templates_count
505       get :licenses_count
506       delete :destroy
507     end
508   end
509   resources :original_picture_license_groups do
510     new do
511       post :new
512     end
513     collection do
514       post :create
515     end
516   end
517   resources :original_picture_licenses do
518     new do
519       post :new
520     end
521     collection do
522       post :create
523     end
524   end
525   resources :provider_sources do
526     collection do
527       get :index
528       post :import
529       get :list
530       get :browse
531     end
532     member do
533     end
534   end
535   resources :providers do
536     collection do
537       get :index
538       get :show
539       get :list
540       get :browse
541     end
542     member do
543       delete :destroy
544     end
545   end
546   resources :provider_statuses do
547     collection do
548       get :index
549       get :show
550       get :list
551       get :browse
552     end
553     member do
554       get :edit
555       put :update
556       delete :destroy
557       post :licenses_import
558       post :artists_import
559       post :original_pictures_import
560       post :import
561     end
562   end
563   resources :demanders do
564     new do
565       get :new
566     end
567     collection do
568       get :index
569       get :show
570       post :create
571       get :list
572       get :browse
573       post :req
574       get :licenses_export
575       get :artists_export
576       get :original_pictures_export
577       get :pictures_export
578       get :export
579     end
580     member do
581       get :edit
582       put :update
583       delete :destroy
584     end
585   end
586   resources :demander_statuses do
587     collection do
588       get :index
589       get :show
590       get :list
591       get :browse
592     end
593     member do
594       get :edit
595       put :update
596       delete :destroy
597     end
598   end
599   # The priority is based upon order of creation:
600   # first created -> highest priority.
601
602   # Sample of regular route:
603   #   match 'products/:id' => 'catalog#view'
604   # Keep in mind you can assign values other than :controller and :action
605   
606   # resource_pictures/1.png?subdir=full
607   # match 'resource_pictures/full/:id(.:format)/' => 'resource_pictures#show'
608   # match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
609   #match 'scroll_panels/scroll/:id(.:format)' => 'scroll_panels#scroll'
610   match 'top/(:action)', :controller => 'top'
611   match 'home/(:action)', :controller => 'home'
612   match 'system/(:action)', :controller => 'system'
613   #match 'authors/(:action(/:id))', :controller => 'authors'
614   
615   # Sample of named route:
616   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
617   # This route can be invoked with purchase_url(:id => product.id)
618
619   # Sample resource route (maps HTTP verbs to controller actions automatically):
620   #   resources :products
621
622   # Sample resource route with options:
623   #   resources :products do
624   #     member do
625   #       get 'short'
626   #       post 'toggle'
627   #     end
628   #
629   #     collection do
630   #       get 'sold'
631   #     end
632   #   end
633
634   # Sample resource route with sub-resources:
635   #   resources :products do
636   #     resources :comments, :sales
637   #     resource :seller
638   #   end
639
640   # Sample resource route with more complex sub-resources
641   #   resources :products do
642   #     resources :comments
643   #     resources :sales do
644   #       get 'recent', :on => :collection
645   #     end
646   #   end
647
648   # Sample resource route within a namespace:
649   #   namespace :admin do
650   #     # Directs /admin/products/* to Admin::ProductsController
651   #     # (app/controllers/admin/products_controller.rb)
652   #     resources :products
653   #   end
654
655   # You can have the root of your site routed with "root"
656   # just remember to delete public/index.html.
657   root :to => 'top#index'
658
659   # See how all your routes lay out with "rake routes"
660
661   # This is a legacy wild controller route that's not recommended for RESTful applications.
662   # Note: This route will make all actions in every controller accessible via GET requests.
663   match ':controller(/:action(/:id(.:format)))'
664 end