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