OSDN Git Service

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