OSDN Git Service

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