OSDN Git Service

t#31653:add scenario
[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 :panels 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 :catch
107       get :edit
108       put :update
109       delete :destroy
110       get :browse
111     end
112   end
113   resources :panel_pictures do
114     new do
115       get :new
116     end
117     collection do
118       get :index
119       get :show
120       post :create
121       get :list
122     end
123     member do
124       get :edit
125       put :update
126       delete :destroy
127       get :browse
128     end
129   end
130   resources :speech_balloons do
131     new do
132       get :new
133     end
134     collection do
135       get :index
136       get :show
137       post :create
138       get :list
139     end
140     member do
141       get :edit
142       put :update
143       delete :destroy
144       get :browse
145     end
146   end
147   resources :balloons do
148     collection do
149       get :index
150       get :show
151       get :list
152     end
153     member do
154       get :browse
155     end
156   end
157   resources :speeches do
158     collection do
159       get :index
160       get :show
161       get :list
162     end
163     member do
164       get :browse
165     end
166   end
167   resources :ground_colors do
168     new do
169       get :new
170     end
171     collection do
172       get :index
173       get :show
174     end
175     member do
176       get :edit
177       put :update
178       delete :destroy
179       get :browse
180     end
181   end
182   resources :ground_pictures do
183     new do
184       get :new
185     end
186     collection do
187       get :index
188       get :show
189     end
190     member do
191       get :edit
192       put :update
193       delete :destroy
194       get :browse
195     end
196   end
197   resources :original_pictures do
198     new do
199       get :new
200     end
201     collection do
202       get :index
203       get :show
204       post :create
205       get :list
206     end
207     member do
208       get :edit
209       put :update
210       delete :destroy
211       get :history
212       get :browse
213     end
214   end
215   resources :resource_pictures do
216     collection do
217       get :index
218       get :show
219       get :new
220       post :create
221       get :count
222       get :list
223     end
224     member do
225       delete :destroy
226       get :credit
227       get :browse
228     end
229   end
230   resources :pictures do
231     collection do
232       get :show
233       get :credit
234       get :search
235       get :list
236     end
237     member do
238       get :credit
239       get :browse
240     end
241   end
242   resources :speech_balloon_templates do
243     collection do
244       get :index
245       get :show
246       get :list
247     end
248     member do
249       get :browse
250       delete :destroy
251     end
252   end
253   resources :licenses do
254     collection do
255       get :index
256       get :show
257       get :search
258       get :list
259     end
260     member do
261       get :browse
262     end
263   end
264   resources :license_groups do
265     collection do
266       get :index
267       get :show
268       get :list
269     end
270     member do
271       get :browse
272       delete :destroy
273     end
274   end
275   resources :original_picture_license_groups do
276     new do
277       post :new
278     end
279     collection do
280       post :create
281     end
282   end
283   resources :system_pictures do
284     collection do
285       get :index
286       get :show
287       get :list
288     end
289     member do
290       get :browse
291       delete :destroy
292     end
293   end
294   resources :provider_sources do
295     collection do
296       get :index
297       post :import
298       get :list
299       get :browse
300     end
301     member do
302     end
303   end
304   resources :providers do
305     collection do
306       get :index
307       get :show
308       get :list
309       get :browse
310     end
311     member do
312       delete :destroy
313     end
314   end
315   resources :provider_statuses do
316     collection do
317       get :index
318       get :show
319       get :list
320       get :browse
321     end
322     member do
323       get :edit
324       put :update
325       delete :destroy
326       post :licenses_import
327       post :artists_import
328       post :original_pictures_import
329       post :import
330     end
331   end
332   resources :demanders do
333     new do
334       get :new
335     end
336     collection do
337       get :index
338       get :show
339       post :create
340       get :list
341       get :browse
342       post :req
343       get :licenses_export
344       get :artists_export
345       get :original_pictures_export
346       get :pictures_export
347       get :export
348     end
349     member do
350       get :edit
351       put :update
352       delete :destroy
353     end
354   end
355   resources :demander_statuses do
356     collection do
357       get :index
358       get :show
359       get :list
360       get :browse
361     end
362     member do
363       get :edit
364       put :update
365       delete :destroy
366     end
367   end
368   # The priority is based upon order of creation:
369   # first created -> highest priority.
370
371   # Sample of regular route:
372   #   match 'products/:id' => 'catalog#view'
373   # Keep in mind you can assign values other than :controller and :action
374   match 'resource_pictures/:subdir/:id(.:format)/' => 'resource_pictures#show'
375   match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
376   #match 'stories/comic/:id(.:format)' => 'stories#comic'
377   match 'top/(:action)', :controller => 'top'
378   match 'home/(:action)', :controller => 'home'
379   match 'system/(:action)', :controller => 'system'
380   #match 'authors/(:action(/:id))', :controller => 'authors'
381   
382   # Sample of named route:
383   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
384   # This route can be invoked with purchase_url(:id => product.id)
385
386   # Sample resource route (maps HTTP verbs to controller actions automatically):
387   #   resources :products
388
389   # Sample resource route with options:
390   #   resources :products do
391   #     member do
392   #       get 'short'
393   #       post 'toggle'
394   #     end
395   #
396   #     collection do
397   #       get 'sold'
398   #     end
399   #   end
400
401   # Sample resource route with sub-resources:
402   #   resources :products do
403   #     resources :comments, :sales
404   #     resource :seller
405   #   end
406
407   # Sample resource route with more complex sub-resources
408   #   resources :products do
409   #     resources :comments
410   #     resources :sales do
411   #       get 'recent', :on => :collection
412   #     end
413   #   end
414
415   # Sample resource route within a namespace:
416   #   namespace :admin do
417   #     # Directs /admin/products/* to Admin::ProductsController
418   #     # (app/controllers/admin/products_controller.rb)
419   #     resources :products
420   #   end
421
422   # You can have the root of your site routed with "root"
423   # just remember to delete public/index.html.
424   root :to => 'top#index'
425
426   # See how all your routes lay out with "rake routes"
427
428   # This is a legacy wild controller route that's not recommended for RESTful applications.
429   # Note: This route will make all actions in every controller accessible via GET requests.
430   match ':controller(/:action(/:id(.:format)))'
431 end